In the last blog, I briefly explained the objectives of the project. Numbers 1 to 3 can be seen as being the ‘Arduino-side’ of the project; data input, processing, and output. No 4 is the ‘display-hardware’ side of the project. So we have two main areas to design.
1) The Arduino side
This part of the project takes the output of the RC timing program as an input via the Arduino’s serial communications port (USB). It then processes the information (deciding whether the information relates to time elapsed, or round number, or heat number etc) then passing the information to a process which will then convert the information into a form that the display hardware can use. Lastly, it pushes the processed information out via the Arduino’s output pins.
Looking at this closer, there are several things for me to find out.
a) How do I get information into the Arduino via USB?
b) Once I’ve done that, how do I get information into the Arduino from a RC timing program?
c) What does the display board output of an RC timing program look like?
d) How do I process the information received by the Arduino?
e) How often do I process it and how do I code the frequency at which I process it?
f) What form should my processed information take? (i.e. what are the requirements of my display hardware?)
g) How do I push the information to the display hardware via the output pins? And how often do I do this?
2) The Display Hardware side
Assuming I can code the Arduino correctly, I should be looking at dealing with the processed information coming out towards my display hardware on the Arduino’s output pins. As mentioned previously the initial objective is to design and construct a board that displays:
Round Number (1 digit)
Heat Number (2 digits – although the second (tens) digit only needs to display the number 1 when required)
Time Elapsed in race / Time remaining to next heat (4 digits)
In the interests of (mainly) keeping the project as cheap as possible, I’m looking at use an array of standard high brightness LEDs to mimic the operation of a 7-segment display. Each 7-segment display will be around 8 inches high, and each of the 7 segments will use 4 LEDs. So we’re looking at 28 LEDs for each digit. Looking at our initial requirement, we need 7 digits, plus 2 segments to show the number 1 for heat numbers.
Doing the math for a second – 28 LEDs per digit, 7 digits required = 28 x 7 = 196 LEDs + 8 LEDs (2 segments @ 4 LEDs each for the second digit of Heat Numbers) = 204 LEDs
This brings up the next point to consider – these LEDs consume 20mA of current each, so 204 LEDs are going to consume just over 4A between them. This is way beyond the output capabilities of an Arduino output pin, so a power supply external to the Arduino will be needed to drive the LEDs. This brings me to a choice in my circuit design, do I drive the LEDs in each segment in series or parallel? If I drive them in parallel, I need lots of resistors to give current protection, whereas as a series circuit would enable me to use one resistor in series with the 4 LEDs. I’ve decided to drive the LEDs in series, this saves time, expense and simplifies the circuit. This means I need a power supply higher than 8.4V
Having looked online for what power supplies are available, it seems 12v power supplies are pretty commonplace and also cheap, so I’ll be using a 12V supply in this project and will therefore base my calculations on 12V.
7 digits = 7 x 7 segments = 49 individual segments. The Arduino cannot support switching this many individual components with the pin headers it has, so we need to look at how to achieve switching these segments without using as many wires! I’ve decided to use the 74HC595 shift register to achieve this. It allows me to drive an entire digit on the display, at the cost of 3 output pins on the Arduino. But it gets better still – it’s possible to daisy-chain the shift registers together to drive more digits for the same pin cost at the Arduino. So our time elapsed display (4-digits) will use 4 shift registers daisy-chained together all whilst using only 3 pins on the Arduino. More on the 74HC595 shift register in a later post.
Coming back to the power all those LEDs are consuming. We know the Arduino can’t output the power we need to drive the LEDs, and neither can the shift registers. That’s why we’re using an external supply. Well, we still need a way to have the Arduino switch the LED segments on and off as required. To do this, I’ve decided to use a NPN transistor (PN2222) to switch the LED segments on. So the voltage that the Arduino (and hence the shift register) supplies on the output pins will switch the transistor to allow 12v through the segments and the collector to the emitter and ground, lighting the segment.
Anyway, I realise this post is quite long and quite haphazard in it’s structure – this has been more about me putting my thoughts down about how the implementation looks in my head. In later posts I will explore all these individual areas seperately and in better detail (with circuit diagrams!)