Totally new to Arduino. I have an problem and have been advised Arduino might be my solution.
I've recently installed an air suspension into a vehicle. This system has a ECU which taps into an ABS wheel speed sensor. At 50km/hr the system returns the suspension to normal. I need to trick the system to drop the suspension back to normal at 20km/hr. As such i'm hoping someone could give me guidance on how I can use an Arduino to read the signal, increase it's frequency by 2.5x. It's a 1V digital signal.
The output can either be 2.5 times the input or output 50km/hr at any speed above 20km/hr.
First it would be good for you to know the signals you are working with are very slow compared to what the Arduino is capable of.
Your biggest problem will be "hardening" the Arduino to survive in the automotive electrical environment. Not that difficult but needs to be considered when you start to plan your packaging.
I'm assuming absolute time is not critical. By that I mean if the Arduino senses 20km/hr and 1 second later, this would be acceptable.
You probably also want some hysteresis so if the vehicle is going from 19 to 20 to 19 etc the suspension doesn't try to follow. Perhaps going to normal at 20 km/hr and reverting at 15 or 18 kmh.
I think the easiest way is to count the incoming signal using one of the Arduino pins that runs a specific bit of code when the input pin changes from low to high. This is called an interrupt and may sound daunting but is real easy.
Then next step is to create your output signal. This can be done in code with a function called millis() to toggle an output pin on and off.
You also might want to set an LED output on or off when the suspension changes.
First step is to purchase an Arduino. Any version will work. If you get one with a USB input it will make programming it easier.
If you know the input waveform is a Square wave you need only measure the ontime and multiply by 2 to get the frequency. If it is not a square wave yo must measure the on time and the off time then add them together.