Led clock out of single 3mm leds - Page 1
Forum section: electronics / projects

author: LinkZ
author_rank: Contributor
timestamp: April 09, 2015, 09:58:25 am
content: After having seen mike's video () i'm now obsessed to build one too (CURSE YOU MIKE!). But i want mine to look something like this:. Unfortunately i don't have mike's knowledge about PIC's etc. so i need to use the circuit of an old alarm clock to drive a display i will made out of 3mm leds. Is this possible? of course i need more voltage to drive the leds in series. So how to amplify this voltage (and possibly current)? Please give me some usable info & calculations.

author: firehopper
author_rank: Frequent Contributor
timestamp: April 09, 2015, 11:32:39 am
content: lets see, first the donor clock is prolly using multiplexed display, so you will need to wire your display up the same way, (not hard just time consuming) then will probably need transistor drivers to actually drive your segments from the clock. it would probably be easier to just learn how to code a pic or some other sort of microcontroller to do the same thing

author: LinkZ
author_rank: Contributor
timestamp: April 09, 2015, 01:05:23 pm
content: Thanks. I think using an existing clock circuit will make it not only easier, but also cheaper. Can I also use a standard LCD digital clock and amplify the signal of each segment to drive the leds?

author: DanielS
author_rank: Frequent Contributor
timestamp: April 09, 2015, 01:18:55 pm
content: Quote from: LinkZ on April 09, 2015, 01:05:23 pmYou do not want to "amplify" here, what you need is level-shifting to make the high-side drive requirements compatible with your CMOS/TTL logic.The low-side drivers are usually open-collector/drain logic which has no special requirements other than checking that leakage current through the LEDs keeps the off-state voltage within tolerances.

author: LinkZ
author_rank: Contributor
timestamp: April 09, 2015, 02:37:28 pm
content: Sorry but didn't understand. I don't want to make CMOS/TTL, i just want to drive DIRECTLY the leds via an amplifying transistor. I want to take the output signal (of each segment) provided by the clock and feed the transistor, which will amplify the current and voltage, thus lighting the leds

author: rdl
author_rank: Super Contributor
timestamp: April 09, 2015, 07:46:41 pm
content: You should be able to do what you want. Whether it's worth the trouble is up to you. What you need are switches for each segment. Some kind of transistor switches will probably be best. The exact way you implement these switches is dependent on the clock that you use as source and the LEDs you use for your display and how they are wired. Beyond that it is not possible to be more specific. I do think that you'll find it's easier if you start with an LED clock and not LCD.

author: mariush
author_rank: Super Contributor
timestamp: April 10, 2015, 12:50:56 pm
content: You can put the leds for each segment in series, so you can power the leds directly from a cheap ac-dc adapter, like 12v for example. You have 5 red leds per segment, so about 5 x 2v per led, gives you 10v ... so just figure out the resistor to get 10-20mA into each segment.To make it nice and simple, instead of 7 transistors or mosfets you could use one ULN2003A darlington array for each digit, as each digit has 7 segments it's a perfect match. There is some voltage drop inside each darlington so you'd need to take that into account when calculating resistor value (for current limit) but it's painless and simple.That leaves you with 7 x 4 pins required, plus what you need for the dots... 28 pins + something for dots... you could use a microcontroller with lots of io or you could use 4 shift registers chained together giving you 32 outputs out of just 2-3 inputs, in which case even a 10-14 pin microcontroller would work.

author: German_EE
author_rank: Super Contributor
timestamp: April 10, 2015, 03:47:19 pm
content: The chip driving your alarm clock display will have two sets of outputs, which way around depends on whether you have a common anode or common cathode display.Outputs type one will be voltage sources and will probably output 5VOutputs type two will be current sinks to groundSo, an example, you might have 4 voltage source outputs (one for every digit) and 7 current sink outputs (one for every segment).The voltage source outputs can be increased by adding a base resistor and an NPN power transistor to each line. The current sink outputs will need a similar arrangement using PNP transistors.

author: LinkZ
author_rank: Contributor
timestamp: April 10, 2015, 05:36:26 pm
content: Quote from: mariush on April 10, 2015, 12:50:56 pmThanks, but as i said i don't have any microcontroller or shift register knowledge. The idea of the ULN2003A is cool, but can you draw a schematic "ready to use" assuming that the sourge voltage for the leds is 12V ?

author: LinkZ
author_rank: Contributor
timestamp: April 10, 2015, 05:39:12 pm
content: Quote from: German_EE on April 10, 2015, 03:47:19 pmDoes this mean that i will need 7x2 transistors for each segment? Now i'm a bit confused

author: mariush
author_rank: Super Contributor
timestamp: April 10, 2015, 05:57:47 pm
content: QuoteEach segment made out of 5 leds is connected to 12v through a resistor meant to limit the current. The other end, instead of going to ground, goes into the collector pin of one of the 7 darlington transistors inside the chip. The emitters of all those 7 transistors are connected together inside the chip and come out through just one Emitter pin, so that's what we connect to ground.So now, when we send voltage through one of the base pins, a connection is made between the corresponding collector pin and the common emitter pin ( which is ground), so the circuit is complete and the leds in that segment all light up.The voltage in the base pin can be something like 3.3v or 5v from a microcontroller or a shift register and the chip has inside resistors on each base pin so that the individual darlington transistors don't burn up (like it would happen if you'd use a npn transistor without resistor on the base pin)What's important to remember is there is some voltage lost in the darlingtons, about 1v (it's listed in datasheet), and that counts when figuring the resistor value for current limiting. If you have 5 red leds, each with a forward voltage of about 2v, and there's 1v lost in the uln2003a chip, then the formula becomes12v - 5 x 2v (led forward voltage) - 1v (in darlington) = current x resistor so1v = 0.01 x r (for 10mA or 0.01A current for a segment)so resistor is 100 ohm.But you generally use a bit less resistance because most leds can work just fine with up to 15-20mA and some leds can have a higher forward voltage, i guess you can try several resistor values and stick to what you like more.

author: LinkZ
author_rank: Contributor
timestamp: April 10, 2015, 07:10:24 pm
content: Quote from: mariush on April 10, 2015, 05:57:47 pmThank you so much for the REALLY CLEAR explanation! For the leds I've chosen, I think 5mA are enough, otherwise making impossible to use in a bedroom.

author: German_EE
author_rank: Super Contributor
timestamp: April 10, 2015, 08:42:14 pm
content: OK, I will have another attempt. Your existing clock will have either a common anode or common cathode display:Here is the common anode displayhttp://embedded-lab.com/blog/wp-content/uploads/2011/03/Lab11_Circuit_SevenSegmentMultiplexing.jpgPort RA switches the 5V supply to the displays one at a time and port RB connects the 7 segments to ground one at a time.Here is the common cathode displayhttps://electrosome.com/wp-content/uploads/2012/05/mss.pngPort RB switches the 5V supply to each of the 7 segments one at a time and port RD connects each display to ground in turn.Once we know how your existing clock talks to the display (common anode or common cathode) we can advise you further on driving your large display.

author: Evil Lurker
author_rank: Regular Contributor
timestamp: April 10, 2015, 11:56:30 pm
content: I've been working on some clock displays myself here lately and let me tell you they can be a real PITA to design. For a non-multiplexed 4 digit clock, each digit is composed of seven segments and you have one colon.... 4 x 7 + 1 = 29 things to control. Oh yeah, and you need at least one button to set it for a total of 30 dedicated input/output pins on your microcontroller. And since each segment is composed of multiple LEDS you will need at least 29 discrete NPN transistors along with 54 resistors for the bases and current limiting.In a multplexed display however each digit's segments shares either a common voltage supply or common ground and are referred to as common anode or common cathode displays. The idea is to drive each segment or digit sequentially depending on how the display is wired up. If you switch between digits/segments fast enough human persistence of vision kicks in and the display will appear to be normally lit when in fact the entire display is being refreshed so many times per second, just like any other monitor or television work. Generally speaking low power displays that don't draw much power and are driven by shift registers which are active low are common anode with higher current displays being common cathode. With a direct driven multiplexed display you would need only 7 pins for the segments, one for the colon, and 4 additional pins (one for each digit). Generally speaking though it is much easier to use a dedicated IC such as the MAX7219 or one of the Holtek chips which run off a 2 or 3 wire serial interface. This has many other advantages as it greatly simplifies wiring, the IC is handles all the refreshing so your MCU is free to devote processing cycles to other tasks, you can adjust the brightness of your display via software, an in the case of the Holtek drivers they also are capable of handling a key matrix simultaneously. That is good deal for plunking several dollars down on a chip because if you opt not to go that route you will need one PNP transistor for each digit and seven NPN transistors for the segments... plus you can't drive the display at more than 5V when using PNP transistors without damaging your MCU.Anyways I have looked into both options and have a junk parts box full of 2 digit 0.56" common anode displays that I have been looking to put to work, but it is almost too much effort to design the PCB and wire them all up. Each segment at full current draw of 20ma which when an "8" is displayed is close to or exceeds the ratings of most common small switching transistors. The 2N3906 would work but would be pushing it's limits, the PN2907a would definitely work, but the Vf is nonlinear over the full current draw range, others simply could not drive the display at full current... the only thing I have found is like a BC108 or a 2N4403. It wouldn't be too bad if resistor arrays instead of discretes were used and the transistors were SOT-23.Eh I have just given up though for now and am focusing on VFD's which are a whole other ball of wax... LCDs are even worse to drive, especially bare ones.