The end goal of the project is a digital countdown timer which will be soldered, placed in a case and mounted to the wall. It will use multiple 7-segment digit displays.
Firstly we are working on simply getting one of the 7-Segment Timers to display numbers from 1 to 9 in sequence. After this is achieved we can think of how to connect multiple 7-Segment Timers using a single Arduino.
https://asset.re-in.de/add/160267/c1/-/en/001618981DS00/DA_TRU-Components-7-Segment-Anzeige-Rot-38.1mm-2V-Ziffernanzahl-1-TRU-7S1-150RAG.pdf
What’s missing on the datasheet is some clarity about the pinout. I tried to add that here! With the display oriented normally (decimal point to the bottom right) the pins run from 1 at bottom left to 10 at the top left, as follows:
10 | 9 | 8 | 7 | 6 |
---|---|---|---|---|
g | f | dp | a | b |
CA | e | d | c | CA |
1 | 2 | 3 | 4 | 5 |
Where:
a-f are the 8 segments and dp is the decimal point
(these correspond to the segments marked on the datasheet)
CA stands for common anode, this means that:
For more details and code, see: https://www.engineersgarage.com/seven-segment-display-with-arduino/
Should be wired on a breadboard as follows:
Take a wire from 5V VCC on the Arduino to a resistor (I used 330Ohm)
From the other end of the resistor we go one of the common anode pins on the display
(e.g. pin 1)
Now we wire the pins according to the segments specified in the Arduino code i.e.
And finally we wire the display pin 8 (dp) to GND on the Arduino
There are two approaches, the first works by addressing the individual Arduino pins one by one, which requires a lot more code, while the second uses ports and hex to simplify the code significantly.