Introduction: Dual 7 Segment Bit Shift Display
I created a dual 7 segment led display controlled by an Arduino through two 8-bit shift registers. The bonus is that it only uses 3 of the Arduino's pins. Instead of using 14 resistors for the leds I used a voltage regulator to drop the voltage to 2.1v mostly so I would't have to solder all those resistors.
1 x small breadboard
1 x lm317 voltage regulator
2 x common cathode 7 segment led display
2 x 74hc595 8-bit shift register
1 x 240 ohm resistor
1 x 160 ohm resistor
1 x .1μF capacitor
2 x 1μF capacitro
A bunch of wire
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Setup Your Lm317 for Proper Voltage
We'll be running our leds and our shift registers off of 2.1 volts from our lm 317. This means we wont need to use resistors on the leds. I used a calculator I found here to get the resistor values. R1 is 240ohm and R2 is 160ohm. You can use the calculator to find other resistor combinations. You also need to put a .1μF capacitor on the Vin and a 1μF capacitor on the Vout. I soldered these components in the corner of the breadboard and left wire leads from the Vin and Ground.
Step 2: Wire Everything Up
This is the schematic. I soldered everything to a perf board. My shift registers outputs were labeled A through H so I connected them A to A on the 7 segment display, B to B and so on. I didn't use H, I may connect this later though. I believe it's for the decimal point but these displays have two decimal points so I'm not sure how that works. Each shift register controls it's own 7 segment display. The serial output from the first shift register goes to the serial input on the second. Both clock pins and both latch pins get tied together. I soldered 3 leads on the edge of the board for serial, clock and latch.
Step 3: Find Hex Values for Digits
To find the values for the digits I made a chart for H through A as this is the order they will be sent to the shift register.
Each digit must have a 0 or 1 assigned for each section H through A. For example a 2 would be 01011011. Then you split the code into 4 bit sets, 0101 and 1011. Then I used the chart to convert this to a hex value. So the hex code for the digit 2 is 0x5B. I did this for all the digits 0 through 9. This is included in the code in the next step.
Step 4: The Code
The first sketch simply counts from 00 through 99 in a loop. Connect the two power leads from the board to +5v and Ground on the Arduino and the Seral, Clock and Latch pins from the board to pins 2, 3 and 4 on the Arduino.
Step 5: Make It Do Something Useful
I added a DHT11 connected to pin 7 and used the display to show the temperature and humidity. You'll notice there's some tricky math to separate the two digits of each value before sending them to the display. I also added values to display an F, h and -.
Participated in the