Wiring diagram for vehicle WSS/ABS sensor

Hello,

I need advices in electronics. I am working on a motorcycle data logger and I need to acquire the wheel speed. I would like use the native wheel speed sensor (WSS). I have no data sheet and very few information about it (no manufacturer write on the sensor).

It is a two wire sensor whose one wire is connected to the 12 Vdc and by deduction the other is the signal.
I have put a 120 Ohm resistance in series with the output pin and then measured the voltage across the resistance. While I was rotating the wheel I saw voltage moving from 0.8 V to 1.6 V. Then I removed the sensor from the vehicle to work on the desk:


After some readings about WSS I saw a technology of sensor which gives current square signal whose the frequency is proportional to the wheel speed. For most of them current value are 7mA or 14mA. In my case I_low=0.8/120=6,6 mA and I_high=1.6/120=13,3 mA so it seems to be this kind of sensor.

I have found a datasheet of the KMI15/16 which seems to approximately correspond to my sensor and I have realized the wiring diagram :


When I study output signal with oscillo, the diagram seems working and gives square signal between 0 and 5V but I am sceptic because there is no stable state. It means that when you remove the sensor from any magnetic or iron sources one time the constant state is 0V the other it 5V :confused:

Have you any suggestion about my wiring diagram ? Any idea about the constant state?
Should I try another wiring diagram ?

Thank you,
Pm

Why is the constant state a problem?
If it is then fit a monostable on the end so that you get a fixed width pulse on a level change. You can make one with a 555 timer chip.

Hi,

It means that when you remove the sensor from any magnetic or iron sources one time the constant state is 0V the other it 5V :confused:

This should not be a problem, when you are measuring speed you will be measuring time between CHANGES in state, just like the ABS does.

Tom.... :slight_smile:

Hello,

Thank you for your help. Someone gave me the answer it is due to hysteresis. I was so convinced about a wiring diagram problem that I didn't remember the basics of the electromagnetism... :confused:

No suggestion about the diagram?

Thank you,

No suggestion about the diagram?

Can't see anything wrong with it.

Hello,

I have performed some tests with the previous discussed circuit.

The results are interesting but noisy. Considering that the datalogger is around one meter from the sensor and that the circuit is independent not fixed to the Arduino, I wonder what is the best configuration among to reduce noise:

  1. sensor - 1 meter wires - Designed circuit - 0.05 meter wires - Arduino
  2. sensor - 0.5 meter wires - Designed circuit - 0.5 meter wires - Arduino

Any other suggestion? Maybe use adequate wires?

Thanks,
Pm

Any other suggestion?

Post a photograph of your setup.

Hi,

First to perform the previous test I have plugged the board directly on the vehicle battery. But according to my post about the power architecture, it seems not to be a good idea because of power disturbances.


About the code, first I read wheel speed sensor (WSS) pulses every 10 ms (10000 us) then I compute the wheel rpm and finally I can obtain the speed.

ppr = 40 // pulse per evolution
radiusWheel  = 0.25 
wheelRPM     = WSSpulses*6E7 / (ppr*(WSStime(t+1)-WSStime(t)) ); // To be sure of the period. WSStime is in micros.
wheelSpeed   = 0.8*3.6*radiusWheel*wheelRPM*2*pi/60 // 0.8 is a factor due to longitudinal sleep

Regarding the previous graph,
The recording pulses,


The computed wheel rotational speed:

The vehicle speed:

I am sceptic when I see the peak at around 40 s :-\

Thank you,
Pm

Hi,
Can you verify the pin numbers that you have used with the LM393, I have labeled them on the circuit diagram?
Can you measure the voltages V1, V2 and V3 with respect to gnd, with the sensor connected but without any signal?
It will show us the DC conditions around your circuit.

Thanks.. Tom. :slight_smile:
PS, Have you checked all your resistor values with a DMM?

It looks like C2 is not a ceramic capacitor. This is vital when using them as decoupling.

Here is an example of where using ceramic ones instead of mylar ones made a difference
http://forum.arduino.cc/index.php?topic=343563.10

Hi,

PS, Have you checked all your resistor values with a DMM?

The only thing is that it is a 47 kOhm instead of the 43 which is not normalized.

It looks like C2 is not a ceramic capacitor. This is vital when using them as decoupling.

If I understand, it is better to change the capacitor C2 for a ceramic one. Should I change the other ones?

Thanks,
Pm

Can you verify the pin numbers that you have used with the LM393, I have labeled them on the circuit diagram?
Can you measure the voltages V1, V2 and V3 with respect to gnd, with the sensor connected but without any signal?
It will show us the DC conditions around your circuit.

I use I/O 1 on the LMI 393.

With Vbat = 12.05 V and Vlm393 = 4.89 V I get:
V1 = 11.36
V2 = 1.68 V
V3 = 1.18 V

Thank you in advance,
Pm

Should I change the other ones?

No.
But I would solder another ceramic capacitor across pins 8 and 4 of the LM393 on the underside of the board.

But I would solder another ceramic capacitor across pins 8 and 4 of the LM393 on the underside of the board.

To summarize:
1/ change C2 for a ceramic capacitor
2/ add another ceramic capacitor across pins 8 and 4 of the LM393. Which value?

Thank you again,
Pm

2/ add another ceramic capacitor across pins 8 and 4 of the LM393. Which value?

0.1uF

Hi,

Ceramic Condensator
This is what I need?

Have a good weekend,
Pm

Yes but those are a hell of a price. You should be paying €0.1 tops, and you are being done at that.

Hello,

Finally I bought ceramic capacitor.
I was reviewing the circuit before change the capa and I wonder if there is not a mistake with this diode:

There is nothing to limit the current ? So I have checked the other diode and it is damaged :-\

Change the first diode for a 2Kohm resistance should work?

The weird is that this wiring diagram comes from a sensor datasheet (p28)

Thank you,
Pm

There is nothing to limit the current ?

True but it depends on what you want to protect against. That circuit is protecting against short spikes of over voltage. The idea is that the capacitors absorb the spike. It is not designed as a fixed over voltage protection, or regulator.
Have a read of this:- DigiKey - Electronic Components Distributor

True but it depends on what you want to protect against. That circuit is protecting against short spikes of over voltage. The idea is that the capacitors absorb the spike. It is not designed as a fixed over voltage protection, or regulator.

The problem with the actual circuit is that as soon as I power it with 12 V the second diode (BZT) breaks.

What should I do ?

Thank you for the reference I will read it tomorrow :slight_smile:

Thanks,
Pm