Big Digit Clock Finished (Was Transistors for Multiplexed leds) - Page 1
Forum section: electronics / beginners

author: kolbep
author_rank: Frequent Contributor
timestamp: March 22, 2015, 09:11:15 pm
content: Hi allI am putting this under the noob category, as I still have a lot to learn about transistors.I want to make a big digit clock. So far I have the ds1337 Rtc and pic communicating fine. For the digits I will be making 7 segment displays out of 12v led striplights.Basically I will need to multiplex them, by joining all the same segments gnds together and to the pic through transistors, and each digit will have the +12v for all its segments joined together, and run from another pic pin through a transistor.I need the transistors for the current, and because the led strips have built in resistors for 12v operation.Can I use npn transistors for both the digit and segment selections, or do the digit selections need to have pnps?Eg for npn only+12v - C of Npn for digitsE of that npn goes to all of that digits segments positive-ve of the commoned segments then goes into the collector of another npn transistor.The emitter of that npn then goes to gndWill that be fine?P

author: kolbep
author_rank: Frequent Contributor
timestamp: March 23, 2015, 05:48:52 am
content: Ok,Now that I am awake,I have drawn up what I was thinking.With the All NPN solution work, or must I use the PNP / NPN method

author: kolbep
author_rank: Frequent Contributor
timestamp: March 30, 2015, 06:03:59 pm
content: Thanks Blueskull.Please just check if I have translated your sketch correctly.I am planning on using ULN2803's for the LED to ground connections.The Resistors are part of the LED strips.I have trouble even understanding what Base resistor to use to pull the transistor to Saturation,now with the PNP/NPN combo, it is more confusing because there are now 2 base resistors to calculate. Any hints on how to do that?

author: bson
author_rank: Unknown
timestamp: March 31, 2015, 02:34:37 am
content: You could use an SN75468 7-way common-emitter darlington driver for the cathode side sinks (one IC) and a quad darlington like a 2068 for the anode side. This would let you drive 4x7 segments with two ICs and 7+4 = 11 I/O pins. Don't worry too much about the confusing "buffer" type symbol used in the data sheets; they're really darlington pairs and can be used for all sorts of EF and switching purposes.http://www.ti.com/lit/ds/symlink/sn75468.pdfhttp://datasheet.octopart.com/ULN2068B-STMicroelectronics-datasheet-8191523.pdf

author: kolbep
author_rank: Frequent Contributor
timestamp: March 31, 2015, 05:27:39 am
content: Quote from: blueskull on March 30, 2015, 08:42:16 pmYep, the Mplexing was to have 1 digit on at a time. But then when it shows '8' it will be drawing too much current for the small transistor......

author: kolbep
author_rank: Frequent Contributor
timestamp: March 31, 2015, 06:01:08 am
content: QuoteSo, does the 2068 do the level shifting inside?In other words, I will not need transistors, and can just connect it as follows?Will I need resistors between the PIC pins and the ULN2083/ULN2068's input, or is it handled internal to the ULN's?I have used a symbol for 7 segment LED displays, because it is easier to understand. But I will be making the digits out of LED Striplight that runs on 12v, and has 3 LED's in series with a resistor.

author: bson
author_rank: Unknown
timestamp: March 31, 2015, 05:47:05 pm
content: Quote from: kolbep on March 31, 2015, 06:01:08 amThey have internal resistors, and come in variants with different resistors for different logic families/uses. The 2068 is for TTL/CMOS (2.7kOhm) while if I remember correctly the 2074 is for CMOS (10kOhm).Edit: sorry for being terse above... was in a bit of a hurry. In concept what you have looks right. But a logic high may not be sufficient to fully saturate the 2068 - depends on your LED forward voltages. If not, you will need to lift RA0-RA3 up a little (by adding a voltage divider to the 12V rail for each signal). I'd breadboard it to get it all dialed in...

author: kolbep
author_rank: Frequent Contributor
timestamp: April 05, 2015, 08:08:34 pm
content: Ok,I have had time to sit down, and play around.Using the transistors I have on hand, I am working on a high-side driver circuit (for a single digit at the moment).You can see from the attached schematic how I have wired it up on the breadboard.Each Segment of the display currently has 3 white led's in series with the resistor. So I have done the measurements based on that (the readings are what I measured).If I have done the maths right [but I dont think so], then the whole digit currently draws 1020mW (or 1,2 Watts) through the Darlington Array Transistor (BC516). The Maximum Pd for this device is 625mW, so even with what I have at the moment, I am exceeding the transistors spec, but the transistor is not heating up (and I am not even multiplexing yet, just having it run constant).I plan to double the size of the segments, which means that each digit will then pull 2040 mW through the transistor (Again not sure of the maths).So does this (and the sums look right). The circuit is fine.If I am to exceed this transistors spec for Pd (ie 2040mW instead of the 625mW), will the fact that I am multiplexing them make it ok to run like this?the Max Jtemp in the datasheet is +150degrees centigrade, if that makes a difference but at the moment the transistor still feels room temperature.I am learning so much about transistor theory from this excercise, that I only got to sleep just before 4am the other morning, because it was all churning around in my brain, processing everything that I had youtubed and googled about Gains, Beta, etc,.Much appreciated.P

author: JohnnyBerg
author_rank: Frequent Contributor
timestamp: April 05, 2015, 08:16:07 pm
content: If Vdrop over the transistor =0,7V and I3 (= current through the transistor) = 83 mA then dissipation in the transistor = 0,7 * 83 mA = 58mW. No .. transistor does not get very hot from this!

author: kolbep
author_rank: Frequent Contributor
timestamp: April 05, 2015, 08:25:33 pm
content: Ok, so my mistake was using the total vdrop instead of just the transistors vdrop.?The 83mA is for seven sets of (3 white LEDs in series with a 150r resistor for each set)So each string of LEDs in series then draws just over 10mA... Hey, imGine how bright those strips will be if I change all the resistors to that each set gets 20mA (too bad the white smd Leds do not have a number on them. Would be interesting to see their data sheet.These are the usual Chinese flexible led strips..

author: SeanB
author_rank: Super Contributor
timestamp: April 05, 2015, 09:07:03 pm
content: They will not be much brighter, but if you are multiplexing them you will need to have around 50mA per led, and then the multiplexing will drop it down to a much lower level by averaging. For 4 displays it will be 1/4 of the current, or around 12mA. Plenty bright, though those OHL led strips are not exactly the best for long life in any case, even at 10mA they are overdriving the LED chips, as they likely are only really rated for full life at 5mA or so, and driving them at 10mA constantly will give them a life of about 2 years. In a clock though they probably will do a decade before you notice the different segments are different brightness during the day.

author: kolbep
author_rank: Frequent Contributor
timestamp: April 06, 2015, 10:47:11 am
content: So far, Work in progress (as Usual, I ran out of board space at the bottom right (for the NPN/PNP combos):

author: kolbep
author_rank: Frequent Contributor
timestamp: April 14, 2016, 07:51:46 pm
content: Ok, So the Clock that I was designing is finally complete (if you can call it that).It uses an Atmega328p (Running Arduino Code), and a DS1307 Realtime Clock Module,for the output it uses 2 x Max 6971's which are LED Driving Shift Registers (16 Channel, Max 50mA per Channel, 35v Maximum, Constant Current settable with a resistor).The Shift Registers run pieces of 12v LED Strip Light, layed out in a typical 7 segment fashion.It also has a DHT11 Temp/Humidity Sensor to show (you guessed it, Temperature and Humidity).It also has an IR Receiver to operate modes with a standard TV remote control (and to set the time).For fun I also put an ESP8266 Wifi Module in it (to later sync with NTP automatically, and to have a web interface for more interesting functions)and it runs off a repaired 12v SwitchMode Powersupply taken from a customers gate motor when it failed.The Segments are stuck on a piece of Perspex (which is painted black on the back),and then in front, there is another piece of brown Perspex as a diffuserThe wooden box is the part I did not like doing, I am not mechanically minded, and lack patience, so it is not as neat as I pictured it would be (and the garage and everything in it is coated with pine dust and sawdust from doing the woodwork on my Electronics bench.But the slight roughness of the cabinet (ok, it looks rustic), matches the rest of the wooden trim in the building, so now that it is there, it does not look too bad.The Reason I say that (if you can call it that), is because it does what a clock does, it tells the time, but it can be so much more, and I just need time to sit down and program it to do everything I want. (Maybe I must get one of those WIFI coffee makers, then I can get the clock to make the coffee??)But anyway, here are some pics.Comments anyone? Please be Brutal/Honest..

author: SeanB
author_rank: Super Contributor
timestamp: April 14, 2016, 08:00:19 pm
content: No, I think it fits in well there, and should be good for a long time.Only question is if you programmed the display to flash 88:88 on first power on with no valid time set?

author: linux-works
author_rank: Super Contributor
timestamp: April 14, 2016, 09:16:51 pm
content: blinking "12:00" is the standard, lol(in fact, I do that on my clocks when they have not been 'fed' an NTP or GPS time).nice job on the clock, btw.

author: Falcon69
author_rank: Super Contributor
timestamp: April 15, 2016, 12:56:46 am
content: Pretty neat. Big Clock. Well done.