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.
Do you have any experience at all with microcontrollers ?
What you suggest is likley to be possible, but this is a very ambitious project for a complete beginner, given the potential safety and insurance issues with modifying a vehicle.
Very little experience with microcontrollers. I'm an experienced automotive tech and understand vehicle systems. All i'm after is for the Arduino to output the incoming frequency at 2.5X the rate.
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.
But please, not a UNO! Very inconvenient mount and connect. A Nano for frequent re-programming, a Pro Mini - for wchih you need a separate USB interface module - for compactness.
You could do this pretty easily with an Arduino, but it seems like overkill - you can do much the same thing with discrete components - search for a frequency doubler circuit.
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.