Okay so I found the Bar Graph LED breakout kit on sparkfun(https://www.sparkfun.com/products/10936) and I was wanting to use it as a tachometer for a racecar my college makes for Formula SAE. I know the ECU outputs a tachometer signal that you define to a degree, you tell how many pulses per rpm that the signal sends out, which I set to 1 pulse per rpm. The issue is the signal sent out, it is a square wave with a duty cycle of 30% for the wave at battery voltage(can vary usually at 14.3v - 14.4v if the battery is charged by the stater when the engine is running), while 100% duty cycle is wave plus space before next wave. This is how it was described in the manual, I emailed the company and was sent a small sketch of what they were meaning.
Is there a way to reduce the voltage to a usable voltage for an UNO? Would a voltage regulator work? or would it create issues with the wave? Also I would like for each LED to represent a range of rpm(since not all ten on each bar is usable, I would have 24 steps if I count correctly, seeing as the last 4 on each bar are coupled) of about 438rpm per LED(10,500 rpm redline divided by 24 LED’s). Now when it gets to about 10,000 rpm I would like the LED’s that are currently on to start flashing to alert the driver that they need to shift. I have seen a small snippet of code to allow the LED’s to blink but I am not sure if it will work for my purpose, anyways here it is:
for (int i = 0; i <= 8; i++) {
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, 255);
digitalWrite(latchPin, HIGH);
delay(150);
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, 0);
digitalWrite(latchPin, HIGH);
delay(150);
}
^^^^^put into the code format, Thanks to Mee_n_Mac, I hadn’t realized that the code button was for that.
Not sure if there is a way to just make all flash while at or above that rpm, or lower the voltage of the signal so that an arduino can use it without frying. Thank you for any help given!