Motorcycle gear changer using hall sensors

ajcgkm

New Member
http://www.youtube.com/watch?v=QvcJKPHmFQQ

This is my second project using the 08m2 to output a clock signal to a cmos 4026 counter.

Took a bit of brain bashing to work this one out. The sneaky hall sensor just keeps sending out a positive voltage so the picaxe goes mentl and the counter is all over the place.

So I used a cmos 4011 to cancel that signal to 0 volts so the the 08m2 is unaware anything is there. Then when the magnet passes it reverses the negative to a positive and the 08m2 wakes up and sends a pulse to the cmos 4026.

But wait you say the 4026 is a up counter so how is it counting down. It's not I used a sneaky bit of programming to trick it ( a simple for next loop )

That bit of code in the 3rd user manual to run a 7 segment display is all I used to go up or down. It simply wipes out the number and puts new number in but looks like it counts down as well as up.


Code:
display_gear_routine:
 pulsout 4,5
 if b1 =0 then endclk  ' if its a zero return
 for b8 = 1 to b3        ' b3 holds the gear value 
  pulsout 0,5              ' pulse out to value to pin 0
 next b8 ' 
 endclk:
 return
 

ajcgkm

New Member
Iron Jungle thank you and it seems funny but I added your page to my favourites last night. I have not put it onto the bike yet but was thinking of using the neutral light as some sort of calibration and reset. I think your way is very clever just mine may be easier to implement just a matter of fitting the hall senser's onto the frame and the magnet on the gear lever. I own a 98 R1 and Im always forgetting what gear Im in :eek:
 

IronJungle

Senior Member
I really don't need a readout to tell me if I am in the right gear, but I did want an accurate air temperature reading. Plus, I could not resist combining two hobbies (motorcycle and PICAXE).

I think my way is only better if.... You have a modern bike with a GPI signal that you can digitize. The nice thing about your design is that if would work on older bikes and not require tapping into the ECM. I think that your method is very clever!

I like your cal plan as well. Provided you have a working NEUTRAL light, it would not be difficult to use that signal to calibrate your design. Basically every time the NEUTRAL light turns on you route that signal to the PICAXE. The PICAXE monitors for that input and when it "sees" it, re calibrates to NEUTRAL. Effectively re-calibrating at each stop sign, etc. BTW- I am sure you know this, but don't pump 12V from the NEUTRAL light straight into the PICAXE.

Mine is rock solid. I look forward to hearing about your results after some testing.
 

ajcgkm

New Member
yeah got my 5v regulator ready, just programmed in a quick self start diagnostics and then programmed in th pin3 to receive the neutral signal. Tested it but few gremlins so will have to play about with it. Probably run the signal through an op amp or use some pull up or down resistor. Looks like I'm getting false readings from pin3. Had the same problem with the hall sensors so run them through the 4011
 

booski

Senior Member
Why don't you use a voltage divider?
I'm assuming your using a 5V regulator to reg the 12V neutral light down to 5V correct? You could use a voltage divider (or a trim pot) and use that to get a 5V signal. Saves additional circuitry and is just the case of either a 3 pin pot or a pair of resistors.
 

ajcgkm

New Member
yeah thought about the voltage divider option but got quite a few 7805's so may as well use em up, also sorted out the gremlins so the 4011 has gone out of the circuit just using the 08m2 and the 4026. But now I am removing the 4026 and the 08m2 out of the circuit as well and changing the program a little and will use a 18m2 instead I could use the 14m2 but I dont have one spare so will run the 7 segment and the hall sensors and the neutral switch from the 18m2. Circuit board is designed so print it off iron it on to the clad board use the ferric chloride and bobs your uncle.
 

Captain Haddock

Senior Member
I did a switch for a gear indicator a while back by buying a spare neutral light switch off ebay (£5) and adding extra contacts by drilling and pressing short lengths of braising rod through and epoxying over the outside after soldering extra wires on, I've yet to finish the display end due to other projects, it all tested fine on a multimeter, could be checked by either a resistor array and readadc or direct to seperate pins.
Sometimes the simlper approach can be more reliable.
 
Top