I have been asked to make an add-on to my race car predictive lap timer. Currently the sector deltas are displayed on an LCD and there are just 2 LEDS to indicate if you are quicker to this point this lap. One led lights up if you are at all quicker, the other if you are quicker by more than a preset value usually quarter sec.
The new addition is to add on a 10 led bargraph which is split say 7 leds indicating faster, 3 leds indicating slower. The leds have to be of the superbright variety for outdoor use and will consume up to 20ma each.
One challenge is the project as it stands only has serial ports and power bought out to connectors.
My initial thought was to use an external 328 paired with led drivers and simply send a delimited integer over a serial interface with each bit representing one led in the cluster. This would give ultimate flexibility but it feels like the hard way to solve this issue.
Any thoughts much appreciated.
Advice please - building a high intensity led bargraph
Hi,
You can use one an LM3916 and used the pwm to send an output voltage proportional to the speed or you can use a two line LED serial display, write a program to display it as a bar graph and the second line to display slow fast too fast. You can use the Mouser LED display 763-0216K3ZFSRGBFBWV . The display it is serial and used only one TTL line to send data to the display and it is 3 color display. Last suggestion why do not use a display like the above suggested.
You can use one an LM3916 and used the pwm to send an output voltage proportional to the speed or you can use a two line LED serial display, write a program to display it as a bar graph and the second line to display slow fast too fast. You can use the Mouser LED display 763-0216K3ZFSRGBFBWV . The display it is serial and used only one TTL line to send data to the display and it is 3 color display. Last suggestion why do not use a display like the above suggested.
thanks for the reply. Had thought of using PWM but the issue there is that the mid point is between led 3 & 4. In other words, if you are running slower by a tenth then I would light say led 3, if by 2 tenths led 2&3 etc
If faster then led 4, led 4&5 etc so not a trad bargraph.
The mouser display is interesting but only 3 colours so hard to display the granularity needed. The main point here is that the driver of the car is aware if they are up or down without actually looking at the display, and 3 colours wouldn't cover this. Plus the backlight colour wouldn't be obvious in sunshine.
thanks for the suggestions.
If faster then led 4, led 4&5 etc so not a trad bargraph.
The mouser display is interesting but only 3 colours so hard to display the granularity needed. The main point here is that the driver of the car is aware if they are up or down without actually looking at the display, and 3 colours wouldn't cover this. Plus the backlight colour wouldn't be obvious in sunshine.
thanks for the suggestions.
I think your original idea is pretty close to the most straightforward method. You could use a SIPO shift register to receive 2 bytes from the timer and display up to 16 LEDs. There are devices available that do exactly what you need, including LED current regulation, such as the STP16DPS05.
the shift register looks like a good plan - seems better than mine as its simpler and fewer components meaning I may be able to build the logic into the led bar rather than a separate control box.
I'd need to read the datasheet, but any advice or sample code on how to make this work would be welcome. I have only 3 io lines to play with on this connector.
I'd need to read the datasheet, but any advice or sample code on how to make this work would be welcome. I have only 3 io lines to play with on this connector.
If you use a shift register, make sure to check its current rating on both a per pin and a per chip (Vcc, Gnd), basis. Lots of AVRs can drive a bank of 20 mA LEDs, so that wasn't a bad option.
How far is the display from the main box?
The car will be an electrically noisy environment, (RF wise, and power wise, if you get power from the vehicle).
Although an RS-232 driver at each end adds size, it also adds significant noise immunity with its undefined, no-man's-land, mid voltage range.
Additionally, of course, if you use the serial output and uC then you can add some error detecting or correcting software to the packet receiver.
Regardless of design, logic level USART, logic level pulses, or RS-232, I'd run the signals in a twisted wire pair inside a shield.
JC
How far is the display from the main box?
The car will be an electrically noisy environment, (RF wise, and power wise, if you get power from the vehicle).
Although an RS-232 driver at each end adds size, it also adds significant noise immunity with its undefined, no-man's-land, mid voltage range.
Additionally, of course, if you use the serial output and uC then you can add some error detecting or correcting software to the packet receiver.
Regardless of design, logic level USART, logic level pulses, or RS-232, I'd run the signals in a twisted wire pair inside a shield.
JC
I've been reading the datasheet for STP16DPS05 and it seems I can make this work using the three io lines I have available. Without a fourth I can not make it enter error detection mode but that's not really an issue.
what isn't clear is if I can tie LE/DM1 high and only use the clock and serial line.
I've ordered a couple to play with so we'll see shortly.
what isn't clear is if I can tie LE/DM1 high and only use the clock and serial line.
I've ordered a couple to play with so we'll see shortly.