Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Hall sensor problems.

fil

New Member
Hello first post and electronics know nothing person here trying to learn with 'useful' lil projects.

My 'project' /plan is to add some extra security to my e-bike.
The motor control system uses hall sensors in a number of places notably within the brake cut off sensors detecting the state of the brake levers.
My solution is/was to add an additional hall sensor into the shared brake signal line and hide that within the body of the bike. Therefore providing a secret key to turn on off the bikes motor by placing a magnet over the sensor or not.

I bought these sensors via ebay.. ON arrival i looked for the pinout, finding it elsewhere online (with the lettering facing forward, Vcc,Gnd, and output from left to right.) Then quickly soldered some test wires on and tested with 5v, and on moving a weak magnet close by i got a 5v output and when moved away 0v Great.. the bike controller cuts the motor when the brake signal goes low.-so i have my secret magnet key..

HOWEVER. when it came to on bike testing, things went sideways. I had sourced a Y splitter cable designed to add a hall sensor into a sensor lineand test one was the sensor with its wires poked into the spare female socket in the splitter cable in the bikes loop and it was as if nothing was attached.

On removal and retesting the sensor With no magnet near the output was low 0v and when a magnet was close the output kinda varied up to 0.3v remaining floating with the magnet removal.

confused i sat and tested 3 more hall sensors with the same result a vague fractional floating signal of up to 0.4v when a strong magnet held close to the sensor.. (front back left right top and bottom of the sensor exposed to magnets)

So my initial test with virtual input voltage for a positive output was a mis read of 0.5v by me? and if so is an opamp needed here?

I didnt fry them soldering on connecting wires, i only wired the first the subsequent 3 x tests i bent the legs to clip on power/meter


If i have the wrong item can someone point me at hall sensors that operate at 5v with a close to 5v output when magnetically stimulated? and if i am missing the point completely a link to help me learn would be very useful.


All help appreciated thanks.
 
Welcome to ETO!
You need to check the datasheet of the sensor. There are various types and some have an 'open drain/collector' output which needs a pull-up resistor.
 
Welcome to ETO!
You need to check the datasheet of the sensor. There are various types and some have an 'open drain/collector' output which needs a pull-up resistor.
Sorry I thought the datasheet was linked to the words ebay sensor above.
I can find data sheets but thats just the start of the decoding..

Vsat at 15 mA Vsupply = 12 Vdc, Bop >170 0.4v

4th entry in the characteristics list is saying 0.4v is the max signal output @ 12v in. ??

I read this and am unsure of its meaning..

V (sat ) = signal/output voltage?? But is it ???????????????


If so sensors are fine.. and the on bike test failure was either due to dodgy connections ramming dupont pins in smaller socket receptors (probable) Or the bikes bike sensors being more complex and include circuitry to boost the signal to logic level?
- This i can test, Chop of the spare socket from the Y cable and read the wire voltages with brakes open and closed..
So if I get a logic level high on the signal wire i need more bits..
 
The important thing to understand about the Hall sensor is that the output does not generate a voltage. The Hall sensor output is like a switch that connects to ground or doesn't connect to ground. To get a voltage, you need a high value resistor (more than 2000 Ohms is safe) between the +ve supply and the output. With that in place, the output will be at a high voltage when the switch is turned off and at a low voltage when the switch is turned on.

If you connect the outputs of two Hall switches together, the output voltage will be low when either output is turned on.

Different Hall sensors turn on in different conditions. Some turn on when the magnetic field is one way, some when it is the other way, and some turn on when there is no magnetic field.
 
  • Like
Reactions: fil
V (sat ) = signal/output voltage??
That just means that the output switch isn't perfect. If the output switch is on, and you have 20 mA (the maximum current) flowing through the switch, the voltage is not exactly zero, like it would be if it were a perfect switch. The output voltage in those conditions could be anywhere from 0 to 0.4 V.

That parameter is stated to make sure that users don't connect the Hall sensor output to an input that sees 0.4 V as a high voltage.
 
  • Like
Reactions: fil
That sensor is an open-collector type, requiring a pull-up resistor.
From the datasheet it looks to me as though the sensor is intended to operate (output goes low) in a magnetic field of at least +40 gauss and to release (output is pulled high by the resistor) in a field of at least -40 gauss, i.e it needs alternating magnetic fields.
It may not operate as you want if a unipolar magnetic field is just present or absent.
 
Thank you for the kind direction, some more reading and googling examples ahead..

So my hall switch testing detailed above was a waste of time, -:) Ha!
 
That sensor is an open-collector type, requiring a pull-up resistor.
From the datasheet it looks to me as though the sensor is intended to operate (output goes low) in a magnetic field of at least +40 gauss and to release (output is pulled high by the resistor) in a field of at least -40 gauss, i.e it needs alternating magnetic fields.
It may not operate as you want if a unipolar magnetic field is just present or absent.

Which makes sense since they were brought to originally fix an ebike motor with blown sensors last year and were sat in the box waiting to inspire this 'genius' plan..
the penny slowly drops - so not all hall sensors are the same, i want the 'arduino module type' in this role

Again the generosity with which the message is delivered is very much appreciated..
 

Latest threads

New Articles From Microcontroller Tips

Back
Top