Menu

VUE32_SPEED

Back to the VUE32 Main Page

Speed sensor

[-img src=Vue32 sch spd.png: missing =-]

The sensor

The vehicle has magnetic speed sensors on all four wheels. A magnet and a coil are used to sense a metal gear’s 42 teeth. The wheel’s diameter is 0.55m. The sensor’s output is a sine-like waveform whose voltage and frequency are proportional to speed.

The electronics

To convert the sensor’s output to 3.3V digital pulses, we use a precision full-wave rectifier followed by a comparator. V(vin) is the simulated input voltage, with noise, V(vrec) is the output of the rectifier and V(vout) is the logic output. The pulses are captured with the PIC’s Change Notification peripheral. A 800ns timer measures the pulse width and the value is converted to kilometers per hour according to the following equations. To get additional precision while using fixed point numbers, 1.0kph is represented as 10.

1kph/3.6 = 0.277m/s

C = piD = pi0.55m = 1.729m/turn

(0.277m/s)/(1.729m/turn) = 0.160 turn/s

42 poles * 0.16 turn/s = 6.75Hz


Related

OpenECoSys-Wiki: VUE32

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.