Hall sensor with 2 wires

Hello

I'm trying to measure wheel speed in a car with a hall sensor with 2 wires. This sensor has an integraded magnet and is placed a head of a toothed wheel. One wire is connected to 12V, and the other to ground. The ground wire is also the signal wire. The current trough the sensor changes when there is a tooth or a gap.

So what I have done now is placed a 500R resister in series with the ground wire so I can measure the voltage over the resistor. When I measure this with a scope I get a nice block signal.

Next I have connected a digital pin from the arduino in front of the 500R resistor to measure the length of the pulse using the PulseIn function. This works fine.

Now I would like to power the arduino using the car battery and a voltage converter. That also means that the arduino and the sensor are connected to the same ground. This is where my problem begins. When I connect the arduino and the sensor to the same ground, my voltage of my block signal drops about 500mV and the pulseIn function doesn't measure a thing. As soon as I disconect the ground of the arduino from the ground of the car de PulseIn function does its job again.

It seems that there is flowing a little current trough the arduino when its connected to the ground of the car.

Does someone know this problem? Or how I can fix this?

Excuse me for my bad English.

Thanks in advance

Tom Van Rooy

Change the resistor to 390 ohms, I think its just too large and the voltages are clipping against the Arduino pin
protection diode.

Looking at your images; your block wave amplitude is 1.2V resp. 1.8V? That's too little for reliable detection, especially if the low voltage is at GND potential. Add a comparator to make it a 0V/5V block wave.

But for better answers, please post schematics & link to the data sheet of your specific sensor.

wvmarle:
Looking at your images; your block wave amplitude is 1.2V resp. 1.8V? That's too little for reliable detection, especially if the low voltage is at GND potential. Add a comparator to make it a 0V/5V block wave.

No, those are the rms values, the voltage scale it 1V/div and you can count the divisions against the scale.
Its clear the second graph shows the voltage clipped to 5.4V or so by the input diodes, so there's scope to
reduce the voltages by a modest factor to be closer to nominal logic values.

So the image ...350.jpg shows a block wave between 2.1V and 5.4V (3.3V amplitude), image ...341.jpg a block wave between 2.8V and 5.1V (2.3V amplitude).

Neither bodes well for a reliable detection. The first may just work, the second quite certainly not. I still see a job for a comparator here.

What I mostly don't understand (a schematic may clear this up) is how it even works without a shared ground. With shared ground, and the lowest level of this block wave at 0V (ground potential), it would be a 0 and 3.3V resp. 0 and 2.3V block wave - the first should be reliably detected, the second probably not.

Hello

I've changed the 500R resistor to a 330R resistor. And this works fine. Now my voltage changes between 2.2V and 4.8V.

Now I have to look for a way to read the frequency of the signal.

Thank you verry much for your help!

2.2V is too high for a guaranteed low detection, really borderline - see data sheet for the exact numbers. So while it works for testing, it's not a good idea for permanent deployment.