Hi guys,
I'm trying to connect an 8-element LED, but it looks like I can use only pins 3, 5, 6, 9, 10, 11 ( 6 in total ) for analogWrite, but I need 8 ( or at least 7 without the dot ).
Are there any ways around it? Thanks!
Hi guys,
I'm trying to connect an 8-element LED, but it looks like I can use only pins 3, 5, 6, 9, 10, 11 ( 6 in total ) for analogWrite, but I need 8 ( or at least 7 without the dot ).
Are there any ways around it? Thanks!
I'm confused and a little scared.
I hope there are some transistors on the far side of that perf board, or you could get 8 x 20mA through one pin for the common anode / cathode (which has a max of 40mA total)
Why do you need PWM outputs? Is this instead of resistors?
Are you trying to set a 4 digit number on the display using the pot?
Hmm... well, I'm just starting with arduino and such, so I didn't think of using transistors...
Thanks for the tip! ![]()
Hi,
If you draw too much current from an Arduino pin, you can kill the microcontroller, so be careful.
A common approach is to use transistors to control the common pins and series resistors (270?) to limit the current to the individual segments.
If you have a look around, you will find schematics.
For a sketch to set the segments, download the sketches from here http://www.arduinoevilgenius.com and have a look at project 30 which is a 4 digit 7 segment LED countdown timer.
You may even decide to buy the book ![]()
I bought the book and it has a lot of interesting examples in it.
But it's not as Evil as all the TV advertising says...
I bought the book and it has a lot of interesting examples in it.
But it's not as Evil as all the TV advertising says...
Thanks Terry! no, its not very evil, its just part of TAB's Evil Genius series, so it had to be in the title.
Now if you want evil - http://www.dangerouslymad.com and watch the video!
Si.
Artem:
Hi guys,
I'm trying to connect an 8-element LED, but it looks like I can use only pins 3, 5, 6, 9, 10, 11 ( 6 in total ) for analogWrite, but I need 8 ( or at least 7 without the dot ).Are there any ways around it? Thanks!
I found this really helpful http://www.hacktronics.com/Tutorials/arduino-and-7-segment-led.html
but that is for a single digit, you have four.
I do know you probably need a resistor inline with each segment...you don't just go straight from the out pin on the board to the segment pin, you have to resist it down to the right voltage for your particular LED display.
"Use our LED resistor calculator to calculate the resistor value that won't destroy your LED! Connecting these LEDs directly to Arduino IO pins will eventually burn them out! Connect LED pins 3 and 8 to GND. Use a resistor between each of the other connections to your Arduino."
I think I saw a code sample in the playground for doing multi digit LED 7segs, it may have been a library? you can search on the playground for it.
otherwise, they sell a little chip that does this for you.
that one is 8 digit, you can google for a 4 digit one that's probably cheaper
Si:
I bought the book and it has a lot of interesting examples in it.
But it's not as Evil as all the TV advertising says...
Thanks Terry! no, its not very evil, its just part of TAB's Evil Genius series, so it had to be in the title.
Now if you want evil - http://www.dangerouslymad.com and watch the video!
Si.
holy
crap
getting that book IMMEDIATELY
Thanks for the replys guys.
Since I don't have any transistors by hand, I connected an LCD instead. Seems to work! 8)
Well yes - a lot to be said for LCDs, they are certainly a lot easier to use.
However I do like the 'retro' look of 7 segment LEDs.