Hello all! Trying to read a Borg Warner turbo rpm sensor on a digital pin but ran into trouble due to the voltage provided by the sensor, in basic it's spitting out a square 50% wave from 0 to + 5V at a maximum frequency of 6Hz buuuuut it's not 5V.
In low rpm it starts as 0.1V and at 200Krpm it's 4.5V so with the treshold of a digital pin it doesn't read below 80Krpm.
Does anyone knows a minimalistic way of converting into a clean 0-5V wave?
Greetings Jaap
Why? Your Arduino will not be able to do anything with the signal at such high frequency? Why not use the voltage change, if it is linear?
The RPM should be derived from the pulse frequency, but the voltage output varies, so it is not suitable for direct connection to a digital pin. I think you will need some external circuit to amplify the circuit, and possibly divide the frequency down to a manageable frequency.
Howdid you measure that. Hopefully with a scope, not with a volt meter (that averages a PWM signal).
Leo..
The -12V connection may not be very easily available...
that data is from the sensors datasheet
That is a nice solution but like build_1971 wrote I don't have a minus 12V available
I like the idea but I used all my analogue inputs so none left
The LM311 will work without a - 12V. As far as the output it is a comparator so it is a digital 1 or zero. The output is also open collector so you will need a pull up to your processor VCC. That allows you to run it at 12V but only get 5V out.
Hello guys, thank you all for thinking along!
While waiting for my parts I did a few small tests and the sensor is showing signal at low rpm even the datasheet says otherwise, also the wave coming out is excactly what it is not devided by 8 so it looks like the datasheet is rubbish.
Thanks all
The datasheet sheets says 'max 5V" output, not 5V all the time and has embedded 8 pulse divider. The issue I see is that at 200krpm and with (for simplicity) 10 blades, even with the 8 divider that's a pulse every 4us.
I might be wrong but that's possibly a little too quick for an Arduino.
Maybe using a timer interrupt would work. Not sure.
Ages ago I built a tacho using an ATtiny84 that easily read up to 60krpm using a hall sensor. But that's a lot slower than what you're looking at.
I'd look at an ESP32. Count the pulses and then use both cores to share the hard work of doing the calculations.
As for the actual voltage issue. As previously mentioned, a comparator could probably do the job. Set the threshold for the lowest output from the sensor with some hysteresis and then Pull up the output of the comparator to 3V3 and should be good to go.
You are right about using a voltage reading for the high rpm's, will try to add a reading for it and lett it run simultaniously so I can calculate a formula and use voltage instead of an interrupt counter.
I have a 7 blade wheel and drilled the sensor on those so it has 7 pulses per rotation (at a BW turbo it would also count the lower blades so 14) at 120Krpm that would mean 71uS interval.
The turbo is mounted on a small diesel tractor puller so testing isn't as easy as on a driveable car so I have to do that during the pulling season, did a small test yesterday and if I forget the 8/divider it's starting to build 32Kpa pressure at 9475rpm which sounds reasonable for a HX50 with 73.5mm turbine wheel, multiplied by 8 would mean 75Krpm and with that speed halfway the compressormap it would make a whole lot more air then 32Kpa on a 2liter engine.
I did look at a faster cpu then the Mega but it's a complete datalogger based on automotive 5V sensors so using another platform at 3.3V it would mean a redesign of my extension board, maybe next winter. I have a touchscreen attached and had to build my screen data refresh rate in blocks so it doesn't interfere with my data collection rate, for those who is interested: