Introduction: How to Make a LED 7-segment Display With Arduino
How the project works:
All the anodes of one row are connected together. There are 3 LEDs in one row. See picture. When you supply voltage to the row, the whole row lights up.
So, connecting all the cathodes together, I used Arduino to program each row to turn on and off. In the picture above, here are the rows that Arduino is turning on: Row 1, 2, 4, 5, 6, 7,
Remember, the way instrucables is set up, the pictures come first, then the explanation.
If you are interested in making this project, please read over this whole instrucable BEFORE you start and get confused! And, please, don't forget too look at ALL the pictures and the boxes for them.
Here is a video of my the display using numbers. The next is it displaying the word, ALPHA.
1. What did you make?
The idea started when I was getting frustrated because I couldn't get my 7 segment display to work with one of my ICs, so I decided upon making my own, so that I'd could control it in basically any way I wanted, including simple text.
2. How did you make it?
The very first thing I did was get out my sketchbook and draw down my ideas, and how I would connect them together.
I started working on this project at 11:30 pm, and kept on going until about 4:30 A.M.. I kept on running into obstacles, such accidentally soldering the negative and positive leads of 3 LEDs together! I made it with 27 LEDs, a small piece of perf board, some basic tools, wires, and most importantly my newly-bought Arduino. I did this project by myself.
3. Where did you make it?
Well. . . I made this project all in my room, on my makeshift desk,and downstairs in our office (for programming Arduino). The more I programmed, the more problems arose, so I had to keep on running back and forth between my soldering un upstairs and the computer down stairs! I wore a path through my carpet, down the creaking wooden stairs, across the tile, over the wooden floor in my office to the computer. How did the project connect to other activities in my life? I was able to count this for my schoolwork! I aslo used this project as a show-off to Bravo, (another group in my activities, I'm ALPHA)
4. What did you learn?
- Where do I start? I learned that I should have used a resistor for each LED, instead of one resistor
- The BIGGEST thing I learned was how to program my Arduino!
- I learned some more techniques about soldering
- I also learned a little bit more about LEDs themselves
If I could do anything differently i would have bought 27 resistors and soldered them to each LED!
What am I proudest of? My success! I would have never thought it woudbe such an interest with my friends!
Step 1: Ingredients:
TOOLS:
1x Wire strippers & snipers
1x Solder
1x Soldering pencil
1x Wire strippers & snipers
1x Needle-nose pliers
1x Solder
1x Soldering pencil
You may need some wire cutters other than the ones on the stripper. See step 5.
Something to cut perf board
PARTS:
1x Perf Board (http://www.radioshack.com/product/index.jsp?productId=2104052)
1x Smaller strip of perf (not necessary, but recommended)
ELECTRONICS:
21x White (or other color) LEDs
1x 50k pot (potentiometer)
1x Arduino & USB cable & power (optional)
Various jumper wires, MAX, 9
Step 2: Getting Familiar With the Design
Step 3: Prepping the Perf Board
[1/21/13 UPDATE]
I added some photos of how the LEDs fit. The first picture is of them vertically, and the second is of them sideways(horizontally).
Step 4: Putting in the First Set of LEDs
Step 5: Soldering the First Set
1. Now, this step might be a little tricky. Using some needle-nose pliers, bend the cathode lead at the end at a right angle, facing the other negative leads. See picture.
2. Bend the other leads to form an X over a hole. Sorry, I forgot to take a picture of the first one (hey, I was trying to figure this out!). Just look at the second one.
3. Take a 4-8 inch insulated jumper. Using needle-nose pliers, make a small 90 degree angle at the very tip. The key to this is to make sure the bend part is not bigger than the thickness of your pert, or else it will be sticking out the other end, and you don't want to see that.
4. Now insert the pre-stripped insulated jumper wire into the hole you made an X over. Make sure the jumper goes under the X.
5. Now fill with solder.
6. Trim the leads if necessary.
[PLEASE NOTE, THIS ONLY APPLIES TO THE ANODE (positive) LEADS OF THE LEDs. YOU WILL ONLY NEED TO DO THIS WITH ONE CATHODE]
Step 6: Finish All the Soldering
Step 7: The Out Wires
In the second photo, you can see that I cut and stripped all the wires to about the same length.
Step 8: Converting to Solid Core Wire
1. Cut a small piece of perf.
2. Bend a 45 degree angle at the end of a jumper.
3. Insert into perf.
4. Push the end of the angled part of the jumper into the whole behind it. See picture.
5. Repeat, until all 8 jumpers are done.
6. Cover the backside in hot glue.
7. Solder the wires onto the top.
8. Cover them in hot glue.
Step 9: Reordering the Out Wires
Using some alligator clips, I tested each wire. Then, I put it in the correct order. You can see all the twists in the picture.
Step 10: [UPDATE] Adding Resistors for the LEDs
Instead of adding a resistor to each LED, I'll just add a resistor to each row. I'll use a 100 ohm resistor. (do that math, it equals to 83.33--)
See the drawing I made for where the resistors should go.
Step 11: Soldering the Potentiometer
Solder the ground wire to the far right terminal of the pot. Then solder a small jumper to the middle connection on the pot. This is the wire that will go into the Arduino.
Please note: This IS NOT the potentiometer I used. My pot was in the mail at the time. The one shown in the picture is for illustrational purposes. This type of pots don't seem to work well- get the guitar amp type. Sorry the picture is focused on the Arduino and not the pot. Dumb auto-focus!
Step 12: Hooking It Up!
https://dl.dropbox.com/u/22807091/Arduino/LED_7_segment_display.ino
Again, I am a Arduino beginner, but this code seems to be pretty good. This is probably the hardest thing I've done with my Arduino, so you can see where I'm at. Still stuck on digitalWrite, HIGH AND LOW!
Now, if you don't have and Arduino, you can simply hook up each segment to a different on/off switch. Since I didn't have 7 switches, I couldn't do this. This would make your project more pocket-sized then with an Arduino, but, my stock of parts always seem to be limiting my projects!
Use the potentiometer to control the brightness of your sequence!
Step 13: Closing Thoughts
Modify the code so that it is a timer! Each number starting from 9 and lasts 10 seconds, and use it in your next game of Scattergories! Hit a reset button and go again!
Please! post your pics of your project! I'd love to see them!
If I made mistakes, please let me know!
Questions? Comment below or PM me!