Hi all, we are new to the Arduino World and just purchased a starter kit on Amazon.
We are trying to run some electronics test on our race car. Basically we want to test the cluster/speedometer functionality by sending pulses to it. After doing some research, we noticed folks talking about using Arduino to run tests but there wasn't too much info.
Our use case: Send x amount of 12v pulses to our test cluster to simulate speed and make the needle move. This signal is to simulate the differential speed sensor, which sends a 12v signal to the cluster.
What's known: Cluster expects a 12v pulse; every 9 pulses equals 1 wheel revolution.
Some additional info, from research, sending these pulses at 330 hz would simulate 150mph on the cluster. Also read that this can be accomplished with a variable oscillator.
Questions:
Is it possible to send 12v pulses?
How would that be programmed?
Any examples of how I could so something like this?
Thanks for the help!
Hi,
I'm pulsing -37v (at around 11mA) into my jukebox to select records.
Pin 8 on the Uno is set for output, normally held low, and I set it high for 50 mS (milli-seconds), then low for 50 mS = one full cycle. For the highest numbered record I send 21 pulses, then a 180mS pause between streams, followed by 8 pulses.
Pin 8 connects to an opto isolator input lead, with the other opto input connection going to Uno ground.
The -37v is connected to the opto output 'emitter' wire and the jukebox 'ground' wire goes on the opto output 'collector'.
You'd connect 12v there in place of my -37v, allowing for change of polarity, ie you may be using +12v.
And adjust your timing for the required frequency.
void PulsesOut()
{
Number=Pulse1;
SendPulses();
delay(180);
if (LongPulse==1)
{
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(OutPort, HIGH); // turn on OptoIsolator LED
delay(100); // wait for 100 mS
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
digitalWrite(OutPort, LOW); // turn off OptoIsolator LED
delay(50); // wait for 50mS
}
Number=Pulse2;
SendPulses();
}
//============
void SendPulses()
{
for (I = 0; I < Number; I++)
{
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(OutPort, HIGH); // turn on OptoIsolator LED
delay(50); // wait for 50 mS
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
digitalWrite(OutPort, LOW); // turn off OptoIsolator LED
delay(50); // wait for 50mS
}
}
Peter
I'd use an optocoupler to simulate the pulses, with fully isolated Arduino from the testbed.
The tone() function can be used to emit a wide range of frequencies. Or see the TimerOne library for such functionality.