Resend my activation email : Register : Log in 
BCF: Bike Chat Forums


Home made quickshift / Arduino version 2

Reply to topic
Bike Chat Forums Index -> Show & Tell
View previous topic : View next topic  
Author Message

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 12:52 - 12 May 2013    Post subject: Home made quickshift / Arduino version 2 Reply with quote

So anyone who might remember i started doing this some time again using a strain gauge that I cannibalised from a hand held digital scales.

this sort of worked but due to the need for amplifying the tiny signal, lack of 'off the shelf' parts and needing to mess around making a circuit board to suit everything, i gave up. Also would had to have done more than I wanted to on the gear linkage in order to get it going.

So anyway, since moving house and being lazy and not getting around to it, I recently went to the BSB at brands hatch and checked out how those guys do it. They all seemed to have a linear shaft driven sensor attached to, but not part of, the gear linkage. I liked this idea so done some research and found this. It was difficult to find something that wasnt a transducer, didnt need a 'supply voltage' and was small enough for what I wanted. It was however still £20 but this is cheaper than £200+ for a quickshift kit. So i thought fuck it, lets have a go.

the part is from RS and heres the datasheet for anyone who wants to look.
Its effectively a potentiometer but on a shaft linear type, rather than a rotating type.
I was considering doing it with a throttle position sensor, but again, the effort of trying to mount it and actuate it seemed more than i wouldve wanted to do.

https://docs-europe.electrocomponents.com/webdocs/002b/0900766b8002b95d.pdf



So ive written the code for an Arduino. The way I have it working is that it takes 5 readings of the sensors resting position and takes an average. This is just to account for any movement or wear and tear and also accounts for if I were to adjust the linkage. All I have to do it turn it off and on again and then its reset. This saves finding its position, then setting it manually.
This only other part that I wanted to add was the ability to trim the engine cut time by the use of another pot or pair of buttons but at the minute havent done this.
I do plan on simply cutting the power to the arduino if I want to not have the quickshift.

Heres the code

int POT = A0; // select the input pin for the potentiometer
int CutValue = 0; // variable for engine cut sensor value
int RunValue = 0; // variable for engine run sensor value
int PotValueX = 0; // variable for averaging the sensor reading to determine a value to cut the engine
int PotValue = 0; // variable to store current sensor reading
int CutTime = 500; // time to cut engine in milliseconds
int EngineCut = 13; // output for engine cut relay
boolean X = false; // boolean to store cut/run state


void setup() {
Serial.begin(9600);
pinMode(EngineCut, OUTPUT);
pinMode(POT, INPUT);

Serial.println("Hello Steven!");
delay(1000);

//take 5 readings of the current resting sensor position and make an average value
for (int i=0; i <=4 ; i++){
PotValueX = analogRead(POT);
CutValue = (CutValue + PotValueX); //take 5 readings and add them together
delay(50);
}
Serial.print("Pot Reading");
Serial.println(CutValue);
CutValue = (CutValue / 5); //divide the reading by 5 to get an average
CutValue = (CutValue + 50); //current position is the resting position of the sensor
//add a value in order to give room to move the sensor
RunValue = (CutValue - 2); //value below the cut valve to allow sensor to return to
//resting position - also give some hysteresis to the value
Serial.print("CutValue-");
Serial.print(CutValue);
Serial.print(" RunValue-");
Serial.print(RunValue);
Serial.print(" CutTime-");
Serial.println(CutTime);

digitalWrite(EngineCut, LOW);

}

void loop() {

PotValue = analogRead(POT); //read resting sensor value
Serial.print("PotValue - ");
Serial.println(PotValue);

if(PotValue > CutValue){
X = true; //boolean state for engine cut/run
}

if(PotValue < RunValue){
X = false; //CutValue and RunValue provide some hysteresis for enabling/disabling
} //the engine cut


if(X == true){
digitalWrite(EngineCut, HIGH);
delay(CutTime); //delay would normally be CutTime!!!!!!!!!!
}else if(X == false){
digitalWrite(EngineCut, LOW);
}
}

/*
average calculation helps to take a new reading each time the software runs
to account for any movement or wear and tear.

if the sensor value increases +10 above the resting reading, boolean X = true.
If the sensor reading is +8 above the resting reading, X = false.
If X is true, the engine is cut, delayed, then returned to a run state.
*/



and heres a picture of the current set up (not yet on the bike)

https://i1112.photobucket.com/albums/k493/steven_191/strain%20gauge%20quickshifter/2013-05-12132652_zpsc491394b.jpg

I have some ideas on how to mount and actuate it on the bike but the main problem will just be getting it in a fixed position where it has full throw up and down. I also have a few 3mm rose joints to link linkage arm and pot together to allow a slight amount of sideways movement.

(also a few alterations have been made so the descriptions in the software may not be 100% accurate)
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

RhynoCZ
Super Spammer



Joined: 09 Mar 2012
Karma :

PostPosted: 13:00 - 12 May 2013    Post subject: Reply with quote

Looks like a nice project Thumbs Up

I once was thinking of quick shifter, but I wanted it to be a thumb button on the bars. Not the same, but still quicker than cutting the throttle.

I was young and stupid, well I'm still young Laughing
____________________
'87 Honda XBR 500, '96 Kawasaki ZX7R P1, '90 Honda CB-1, '88 Kawasaki GPz550, MZ 150 ETZ
'95 Mercedes-Benz w202 C200 CGI, '98 Mercedes-Benz w210 E200 Kompressor
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 21:55 - 12 May 2013    Post subject: Reply with quote

you mean like a push button kill switch or a button that will make it change gear for you?

one is cheap, the other requires expensive things Laughing
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

Legsy.
Nova Slayer



Joined: 23 Dec 2008
Karma :

PostPosted: 22:50 - 12 May 2013    Post subject: Reply with quote

I've got some experience of fitting electronic/mechanical gear changers to RXV and R6 engined karts, so it'll be good to see how this goes.

What bike are you going to be fitting it to?

Make sure you spend plenty of time getting your actuator rod travel distance/angle just right.. I got these wrong initially and it gave all kinds of problems with changes.
 Back to top
View user's profile Send private message You must be logged in to rate posts

RhynoCZ
Super Spammer



Joined: 09 Mar 2012
Karma :

PostPosted: 08:22 - 13 May 2013    Post subject: Reply with quote

steven_191 wrote:
you mean like a push button kill switch or a button that will make it change gear for you?

one is cheap, the other requires expensive things Laughing


It'd have been in the same position as PASS button for the index finger on the left handlebar,like on modern motorcycles. It was quite stupid idea but I think it could be done. The button would ''turn off'' the ignition just for a couple of milliseconds, it'd be like squeezing the clutch lever. This would completely exclude any sensors.

But hey, lots of things were stupid when someone came with them and now we can't live without them Thumbs Up
____________________
'87 Honda XBR 500, '96 Kawasaki ZX7R P1, '90 Honda CB-1, '88 Kawasaki GPz550, MZ 150 ETZ
'95 Mercedes-Benz w202 C200 CGI, '98 Mercedes-Benz w210 E200 Kompressor


Last edited by RhynoCZ on 08:40 - 13 May 2013; edited 3 times in total
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 08:25 - 13 May 2013    Post subject: Reply with quote

One of the considerations are whether to have the sensor fixed and have less throw to detect movement of have it so the full throw can be sensed but then this would need some sort of soft fixing that can allow for the whole sensor to move in the opposite direction when changing down because it will need to have enough movement in both directions obviously.
If you understand what I mean.

I think ill go with the fixed option because you can increase the resolution of the sensor if needed by altering the circuit reference voltage.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 22:15 - 19 May 2013    Post subject: Reply with quote

so I done a bit of work on mounting the parts up today.

heres the before picture

https://i1112.photobucket.com/albums/k493/steven_191/strain%20gauge%20quickshifter/2013-05-19114323_zpsf4a0be6c.jpg

I got a spare gear linkage before id decided how to fit all of this and ended up going this way.
I used the arm at the gear box end, drilled and reamed it out so that it slotted over the gear select shaft. It turned out a really good fit. All thats left is to cut a slot into the selector shaft for the bolt to go through.

https://i1112.photobucket.com/albums/k493/steven_191/strain%20gauge%20quickshifter/2013-05-19134522_zps4eb37150.jpg

I then sorted out a mount for the sensor and worked out a position for it. I ended up mounting it onto the sprocket cover. I can add extra nuts onto the outside to move the sensor out further if I need to.

https://i1112.photobucket.com/albums/k493/steven_191/strain%20gauge%20quickshifter/2013-05-19151654_zpsad26900b.jpg

https://i1112.photobucket.com/albums/k493/steven_191/strain%20gauge%20quickshifter/2013-05-19151659_zpsc8e2a9eb.jpg

Then I worked out how much throw I needed to move the sensor from fully open to fully closed (12mm in total), worked out how much the original gear linkage moves, then worked out where to fix the linkage to the sensor to get a full range ove motion on the sensor.
Anyway, for anyone who doesnt understand what Im talking about, I drilled the fixing for the linkage about 20mm from the centre which should give me around 11mm of motion on the sensor.

Next, ill need to drill and tap the linkage rod, fit the rose joints I have, and connect the end to the sensor. which may also have a rose joint on but I havent decided completely on that yet. depends how solid it all is but itll probably be fine.

I managed to find a route from the linkage to the sensor that goes between the engine and some sort of mounting bolt so its all hidden away nicely. like so

https://i1112.photobucket.com/albums/k493/steven_191/strain%20gauge%20quickshifter/2013-05-19151713_zps2f6c65c5.jpg
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

Legsy.
Nova Slayer



Joined: 23 Dec 2008
Karma :

PostPosted: 13:49 - 20 May 2013    Post subject: Reply with quote

What is the maximum applied force of the actuator and at what displacement? It looks very small..

Also, your actuator will need to swivel about its mounting bracket a few degrees during the gearchange to avoid lateral loading.
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 16:20 - 20 May 2013    Post subject: Reply with quote

I will set up the linkage so that it is within the limited motion of the sensor. Will also adjust the mount so that it is as straight as possible with the linkage.

I didnt plan on having a loose fixing for it. The linkage will also be rose jointed like the gear linkage rod to stop forcing the sensor sideways. Hopefully.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

Turkish
Crazy Courier



Joined: 09 May 2012
Karma :

PostPosted: 21:57 - 20 May 2013    Post subject: Reply with quote

RhynoCZ wrote:
steven_191 wrote:
you mean like a push button kill switch or a button that will make it change gear for you?

one is cheap, the other requires expensive things Laughing


It'd have been in the same position as PASS button for the index finger on the left handlebar,like on modern motorcycles. It was quite stupid idea but I think it could be done. The button would ''turn off'' the ignition just for a couple of milliseconds, it'd be like squeezing the clutch lever. This would completely exclude any sensors.

But hey, lots of things were stupid when someone came with them and now we can't live without them Thumbs Up


Huh. This comment got me thinking a bit. Here's how it could work.

A N/C DPST relay takes one wire from each coil pack low voltage feed. I'm assuming 2 coils.
Pass button wired to the coil of the relay.
Mode of operation: Push pass, relay opens which cuts ignition & revs. Release pass and normal operation resumes.

Would be interesting to try it Laughing
____________________
ZX-6R G2
CBR125R RW6
 Back to top
View user's profile Send private message You must be logged in to rate posts

ms51ves3
Super Spammer



Joined: 07 Jun 2007
Karma :

PostPosted: 11:48 - 21 May 2013    Post subject: Reply with quote

Turkish wrote:
Huh. This comment got me thinking a bit. Here's how it could work.

A N/C DPST relay takes one wire from each coil pack low voltage feed. I'm assuming 2 coils.
Pass button wired to the coil of the relay.
Mode of operation: Push pass, relay opens which cuts ignition & revs. Release pass and normal operation resumes.

Would be interesting to try it Laughing


Would it not be easier to just rewire the killswitch?
 Back to top
View user's profile Send private message You must be logged in to rate posts

Turkish
Crazy Courier



Joined: 09 May 2012
Karma :

PostPosted: 11:54 - 21 May 2013    Post subject: Reply with quote

ms51ves3 wrote:
Would it not be easier to just rewire the killswitch?


Well that would certainly create the "off" condition - are there any bikes that need an ignition power cycle to allow restart?
____________________
ZX-6R G2
CBR125R RW6
 Back to top
View user's profile Send private message You must be logged in to rate posts

RhynoCZ
Super Spammer



Joined: 09 Mar 2012
Karma :

PostPosted: 12:22 - 21 May 2013    Post subject: Reply with quote

Well well well, it seems that my idea of a cheap version of quick shifter comes back on again Cool

What about just kill the coil for a while, I'm not good at electronics but that's what the proper quick shifter does, right? Thinking

Find the power source to the coil, cut those wires put there a switch Question
____________________
'87 Honda XBR 500, '96 Kawasaki ZX7R P1, '90 Honda CB-1, '88 Kawasaki GPz550, MZ 150 ETZ
'95 Mercedes-Benz w202 C200 CGI, '98 Mercedes-Benz w210 E200 Kompressor
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 16:13 - 21 May 2013    Post subject: Reply with quote

Yeah the ignition will be cut via the kill switch through an option-isolator I think to keep the circuits separate.
I think you can get IC type so it'll be small enough to solder onto a board

Also thinking about how the gearbox actually work I think I could adjust the code and make it more simple and quicker to shift. I've written it so I would move the lever back to he resting position before starting the ignition again but in reality as the engine slows down and the next gear slots in, the selector drum and lever arms actually go into a neutral position so there's no need for me to return the lever to rest. I could hold it up high if I wanted to.

So the only issue is when going 1st neutral 2nd may need a slightly longer delay but I guess it's milliseconds. I could always pickup the neutral sensor and add a delay if it passes neutral.

Ill probably just start with a slightly longer safer delay initially so there's less chance of blowing stuff up.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

lihp
World Chat Champion



Joined: 22 Sep 2010
Karma :

PostPosted: 16:16 - 21 May 2013    Post subject: Reply with quote

The issue you're thinking about is why quickshifters are a bit of a pain on a LOT of bikes where the manufacturers haven't tied them into the ECU, and often only work well at full throttle as that is where the delay is set.

I would consider using a variable pot, then an Analogue -> Digital Converter in your code to set the delay. Go out and ride, then adjust the pot to adjust your delay till you get it set how you want to.
____________________
covent.gardens: lihp is my most favourite member ever
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 21:12 - 22 May 2013    Post subject: Reply with quote

yeah I know what you mean. The variation at different speeds is something to consider and I have thought about adding an input from the engine to determine the engine speed and work out a delay from that but I've had another thought that may take all of this out of the equation.

If I tell the ignition to cut at a given position then start at another position somewhere near the top of the lever throw, then the controller will assume the gear has been selected then start the ignition and reset once the lever is back to the rest position,
That way I dont have to try to change gear as quickly as possible and also safeguard against not getting into gear quick enough.

And I know someone will be thinking, whats the point in a quickshift if you dont want it to be quick. Well I do, but I dont plant on riding full throttle and changing gear at 13Krpm every time.

Ill have a play and see how it goes but I think this might be the best option.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

lihp
World Chat Champion



Joined: 22 Sep 2010
Karma :

PostPosted: 23:01 - 22 May 2013    Post subject: Reply with quote

steven_191 wrote:
Well I do, but I dont plant on riding full throttle and changing gear at 13Krpm every time.
.


That's why quickshifers are pretty useless and wasted on the road. And are generally only fitted to race bikes (apart from the rossi wannabes that spend silly money for something that makes no difference on the road)
____________________
covent.gardens: lihp is my most favourite member ever
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 05:28 - 23 May 2013    Post subject: Reply with quote

PhilDawson8270 wrote:
steven_191 wrote:
Well I do, but I dont plant on riding full throttle and changing gear at 13Krpm every time.
.


That's why quickshifers are pretty useless and wasted on the road. And are generally only fitted to race bikes (apart from the rossi wannabes that spend silly money for something that makes no difference on the road)


I do plan on taking it to the drag strip once its working to see what its like used properly.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

Legsy.
Nova Slayer



Joined: 23 Dec 2008
Karma :

PostPosted: 14:18 - 23 May 2013    Post subject: Reply with quote

steven_191 wrote:
I will set up the linkage so that it is within the limited motion of the sensor. Will also adjust the mount so that it is as straight as possible with the linkage.

I didnt plan on having a loose fixing for it. The linkage will also be rose jointed like the gear linkage rod to stop forcing the sensor sideways. Hopefully.


The problem is that the selector lever will be rotating, and so your linkage will be moving in both the vertical and lateral planes. You need to account for this in your design otherwise you will encounter poor performance.. I made a similar mistake initially.

Again, do you know the maximum applied load and travel of your actuator? It's tiny..
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 15:29 - 23 May 2013    Post subject: Reply with quote

https://docs-europe.electrocomponents.com/webdocs/002b/0900766b8002b95d.pdf

datasheet says operational force 200-750g. doesnt say anything about lateral forces.

The longer the linkage is the less lateral force will be applied. Also if I mount the arm on the shaft at 90degrees to the sensor then this will also reduce the lateral force.

basically going to make do with it as best I can. This is the only sensor of this type to to this job in this way without spending nearly £100 on a transducer and that would need a 24V supply.

The other option, which if this fails I may revisit later, was to use a TPS that is also rotary and either mount it on the shaft or mount it remotely.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

Legsy.
Nova Slayer



Joined: 23 Dec 2008
Karma :

PostPosted: 15:59 - 26 May 2013    Post subject: Reply with quote

You do realise that 200-750g is equivilent to resting half a bag of sugar on the selector lever..?

Also your travel is only 10mm! You'd be limited to a maximum 38mm long selector lever to make that work, which would require around 210N force to change gear.. That actuator is capable of less than 5.0N..

You need a bigger actuator with a longer travel. You need around 25mm travel, capable of at least 120N (12.2kg) force, depending on your gearbox.
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 09:58 - 28 May 2013    Post subject: Reply with quote

Legsy. wrote:
You do realise that 200-750g is equivilent to resting half a bag of sugar on the selector lever..?

Also your travel is only 10mm! You'd be limited to a maximum 38mm long selector lever to make that work, which would require around 210N force to change gear.. That actuator is capable of less than 5.0N..

You need a bigger actuator with a longer travel. You need around 25mm travel, capable of at least 120N (12.2kg) force, depending on your gearbox.


Ok so I think I understand what you're talking about but I think you have the wring idea of how this works. This part isn't changing gear for me. I'm changing gear with my foot as normal. This part is effectively a potentiometer that is sensing the position of the gear lever. I'm telling the controller in the softer at what point to cut the ignition.

This doesn't change gear for me its only a sensor. The only reason I think this has a rated pressure is because it has a spring inside. Which I don't actually need but it should help keep the position stable if nothing else.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts

lihp
World Chat Champion



Joined: 22 Sep 2010
Karma :

PostPosted: 10:12 - 28 May 2013    Post subject: Reply with quote

The issue I think you will have is that the movement of the lever while ridng in gear is very small. I'm not sure how accurate that method will be.

Strain gauges are normally used so that they can measure the resistance of the lever
____________________
covent.gardens: lihp is my most favourite member ever
 Back to top
View user's profile Send private message You must be logged in to rate posts

steven_191
Nearly there...



Joined: 31 May 2009
Karma :

PostPosted: 11:23 - 28 May 2013    Post subject: Reply with quote

PhilDawson8270 wrote:
The issue I think you will have is that the movement of the lever while ridng in gear is very small. I'm not sure how accurate that method will be.

Strain gauges are normally used so that they can measure the resistance of the lever


To a certain extent I agree with you.
The problem with the strain gauge was really getting something suitable, making it fit and work and not look like a piece of crap because I would have to ruin a linkage to get it fitted. Also amplifying the signal was being difficult.

This sensor on the other hand is cheaper and easier to use and off the shelf. The controller has 1024 points of resolution so best case scenario ill have ~500 point of resolution while moving the lever in either direction. 500 points over 5mm is sensing every 100th of a millimeter. I think that's pretty accurate for what I'm doing with it. Even if I have half that it should still be fine.

Also after speaking to some manufacturers of quickshifters they say they don't use strain gauges because they gradualy bend with the stress put on them and end up being out of calibration and useless. To combat that the gauge material would have to be less flexible meaning it won't be as good and need more amplification.
 Back to top
View user's profile Send private message Send e-mail You must be logged in to rate posts
Old Thread Alert!

The last post was made 12 years, 89 days ago. Instead of replying here, would creating a new thread be more useful?
  Display posts from previous:   
This page may contain affiliate links, which means we may earn a small commission if a visitor clicks through and makes a purchase. By clicking on an affiliate link, you accept that third-party cookies will be set.

Post new topic   Reply to topic    Bike Chat Forums Index -> Show & Tell All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Read the Terms of Use! - Powered by phpBB © phpBB Group
 

Debug Mode: ON - Server: birks (www) - Page Generation Time: 0.11 Sec - Server Load: 1.24 - MySQL Queries: 16 - Page Size: 143.51 Kb