linear hall sensor problem

ajcgkm

New Member
Hi all, OK I got a gear indicator working fine , but am using a cmos 4011 to block out the constant voltage coming from the hall sensor. What I want to do now is remove the 4011 and go straight from the hall sensor to the 08m2. The program works by reading whether pin c.1 or pin c.2 are high.

As stated the hall sensor continually pumps out around 2.5v so pin c.1 and pinc.2 would allways be high. Then when a magnet comes near it pumps out the 5v going into it.

So I am open to suggestions as to go about eliminating the 2.5v. I was thinking about a voltage divider to drop the voltage below what the pin deems as high but if that does not work then some other ideas would be welcomed.

I want to make this as small as possible and with the 4011 in the circuit it's just to large, I am limited with room on the bike.

Thanks AJ
 

1968neil

Senior Member
The voltage is correct for a linear hall sensor.
If you try a South polarized magnet the nearer you get to it the higher the voltage
if you try a North polarized magnet the voltage should drop this can be accounted for in software if you used the ReadADC command.

If you only need a straight on/off then you have the wrong sensors you need the switch variety. beware there are also latching versions you need to turn them on and off with opposite poles of the magnet

Regards
Neil
 
Last edited:

SAborn

Senior Member
I use a LM358 opamp (8 pin package) to give a high / low switching filter to the picaxe.

One thought but untested would be to add a couple of series diodes between the hall sensor and picaxe to drop the 2.5 volt to around 0.7 volt on the picaxe input, then when the hall sensor went high (5 volt) the picaxe would see around 3.2 volts on the input pin.
 

ajcgkm

New Member
Cheers for the reply's. Seems I was a bit hasty in my post, I removed the 4011 from the circuit and reversed the magnet and it seemed to work with only a small glitch. Seems to be pulsing (the 7 segment display seems to show a small intermittent flicker) now and wont stay on 6th gear.

I tried putting a 10k resistor after the hall sensor but the 2.5v coming out of the hall sensor was still there after the resistor (to me that is strange or am I missing something here) The resistor should resist but seems to have no effect.
 

hippy

Ex-Staff (retired)
I tried putting a 10k resistor after the hall sensor but the 2.5v coming out of the hall sensor was still there after the resistor (to me that is strange or am I missing something here) The resistor should resist but seems to have no effect.
How exactly have you connected the resistor ? If in parallel it's just a load which won't affect voltage, if in series then the PICAXE is a very high impedance input so it makes a very poor voltage driver, effectively just a current limiter.

You need two resistors to create a voltage divider.
 

ajcgkm

New Member
How exactly have you connected the resistor ? If in parallel it's just a load which won't affect voltage, if in series then the PICAXE is a very high impedance input so it makes a very poor voltage driver, effectively just a current limiter.

You need two resistors to create a voltage divider.
The resistor is in series, I even put 1N4001 diode in there to see if I got any voltage drop and it's as if they dont exist, and yes I know 2 resistors for a voltage divider. am going to try a lm741 op amp if that dont work I'll just have to put the 4011 back in. Gremlins are wonderful creatures they lead to a whole different way of learning.
 

cravenhaven

Senior Member
The resistor is in series, I even put 1N4001 diode in there to see if I got any voltage drop and it's as if they dont exist, and yes I know 2 resistors for a voltage divider.
Try putting the diode between the hall sensor and the picaxe, then put the resistor between the picaxe pin and ground/0v. That should allow a bit of current to flow through the diode and provide a 0.6v decrease.
 

ajcgkm

New Member
just to update I used the readadc command as suggested by a few members and after delving through this forum on what it is and how to really use it I replaced 2 lines of code to read the adc and changed the way the two routines are called, and it's working fine. So the 4011 is now out of the circuit.

Big thanks and pats on the back all round :D
 
Top