I have converted my vehicle from gas to electricity, and am working on getting the electronic gauge cluster functioning again.
The car speedo interprets square waves, 0-12v for the MPH and 0-5v for the RPM signal.
Using a small signal generator, I was able to discover that the MPH is interpreted roughly by the function Mph = ((hz - 46.8) / 43.2) .
The electric car has no transmission, so the speed will be linear.
I need the arduino to
- Interpret an incoming RPM signal from the electric motor
- Create TWO new square waves
One signal will be the incoming RPM signal manipulated the function above to display MPH.
The other signal will be the incoming RPM signal from the electric motors, but the arduino will be required to recognize if the RPM signal is less that 100 RPM, and if so create a 500 RPM signal to ‘trick’ the ECU into thinking the car is on, and thus providing power steering.
So here is where I need help:
How would I create code to discern the electric motor’s RPM signal’s frequency?
Second, how would I create a new signal ? I was planning on just using the ‘tone’ function, however I would need to create two tones and the arduino is only capable of running one (as far as I know).
Thanks for the help !