Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/26/08 04:37
Read: times


 
#161133 - add up the forward voltages, adjust the resistors ...
Responding to: ???'s previous message
Cuenta Chocula said:
The display is from an alarm clock and the IC that drove it was a complete alarm clock on a chip. I just want to use the display on its own with an 8051 driving it. I decoded it so I could use a lookup table, but in the end even to use a single segment I have a fundamental question.

Let's say you've got a board with two LED's on it but the LEDs have separate anodes and a common cathode. In order to control each LED separately you'll need to use the micro-controller to supply current to the correct anode. This is my first problem because I'm a beginner at this, I've only used the micro-controller ports to connect ground, not voltage to a device. Usually I have the voltage connected to the anode on an LED and then just have a port on the 8051 connect to ground and that's how I control it.

You'll find that the MCU generally can't supply enough current to drive the segment to full brightness. Depending on the LED, it can require anywhere from 4mA to about 20 mA for typical-size LED. Now, I don't know what sort of LED's these are, so I wouldn't hazard a guess. If you start with a decent current mirror, e.g. a pair of NPN transistors with their bases connected together and to the collector of one of the two, and a pretty large-value (a current mirror is intended to be a high-impedance device) fixed resistor to GND from the emitter of the one the collector of which is connected to the two bases, a pot connected as a variable resistor to Vcc will set the current in that diode-connected transistor. Since the current is (Vb-Vbe)/R, and since Vb is the same for both transistors, you can then limit the current in the second transistor by means of an emitter resistor to GND, or following any other path so long as it's constant. If that path happens to be through an LED, and from there through another transistor or open-collector driver, it won't matter so long as the open-collector driver can sink the combined current from as many as seven segments. Another set of transistors can control whether the current flows or not, as it will switch each control transistor on or off in accordance with a port bit driving its base through a resistor, the function of which is simply to protect the base-emitter junction. If that seems complicated to you, and it is, a bit, then perhaps you should consider a high-side driver or a resistor to Vcc pulled down with a low-side driver, e.g. ULN2003A, which has seven darlingtons.

Then, assuming the above is possible and I can supply voltage to at least two pins via software, I already know how to connect the other pins to ground and can get it to work.

Eric's suggestion that I use a high side driver is probably a little over my head. But since he mentioned transistors I was also thinking that I could use a transistor as a relay to turn on voltage to each anode. Then I could use a port/pin on the micro to control the voltage to the correct anode via a transistor and use other ports to connect the correct cathode pin to ground. I've never used a transistor before except when plugging it into someone else's design, but maybe I could figure it out.


No ... you can't use a transistor as a relay. You can, however, use it as a switch. If you prepare a wiring diagram of the display and the configuration in which you intend to use it, perhaps I can be of some help. A bipolar transistor, e.g. 2N2222A or even 2N3904, might serve but it has a forward voltage of about what a silicon diode has, typically ~0.68 volts.

The MCU can't source enough to drive just any LED individual anode, nor can the MCU sink enough to drive most common cathodes, as they often have 8x the current of a single segment (consider '8' with decimal point or colon). A current sink on a common cathode isn't appropriate because the amount of current required is dependent on the number of segments driven. A current mirror will give you a well-controlled current. A simple switch, e.g. ULN2003A to GND will serve to sink however many segments it has to sink. Likewise, you can use a ULN2003A to sink the current to each anode, knowing that it will "light up" only when you turn the current sink at the anode OFF. Your switch to GND, on the "common" (meaning common to all segments) cathode, can be a bipolar transistor, which will then inject a voltage loss of about 0.68 volts, or a MOSFET, which will behave as, in many cases, a VERY small value resistor, e.g. 0.03 ohms or less.

You probably ought to think about the voltages and currents you need to control, and empirically determine what the appropriate current per segment for your device is. Ohm's law is your friend.

RE


List of 40 messages in thread
TopicAuthorDate
Help with 4 digit LED 7 segment display            01/01/70 00:00      
   common cathode            01/01/70 00:00      
   Maybe it is a standard display            01/01/70 00:00      
      It's standard, but I can't find a spec sheet            01/01/70 00:00      
         an old-time part, perhaps?            01/01/70 00:00      
            The 8650 is a standard alarm clock IC            01/01/70 00:00      
               add up the forward voltages, adjust the resistors ...            01/01/70 00:00      
                  Diagram            01/01/70 00:00      
                     It's all up to you ...            01/01/70 00:00      
                        Too soon to start worrying about voltage            01/01/70 00:00      
                           Be careful ... you only have one of these ... right?            01/01/70 00:00      
                     beware            01/01/70 00:00      
                        Interesting concept            01/01/70 00:00      
                        Don't think so            01/01/70 00:00      
                           make a FULL schematic            01/01/70 00:00      
                              Of course            01/01/70 00:00      
                           Careful, now!            01/01/70 00:00      
                     Diagram mis-labeled, sorry            01/01/70 00:00      
   Please consider that....            01/01/70 00:00      
      Lookup table            01/01/70 00:00      
         'Ohm" it out            01/01/70 00:00      
            I don't see how            01/01/70 00:00      
               then forget transistors            01/01/70 00:00      
         2-Anode 12-Cathode Drive Diagram            01/01/70 00:00      
            Thanks            01/01/70 00:00      
   It works like this....            01/01/70 00:00      
      Vbe, not Vce            01/01/70 00:00      
         that was probably I who did that ... and you're right            01/01/70 00:00      
            Well...            01/01/70 00:00      
               take a close look            01/01/70 00:00      
               I doubt it            01/01/70 00:00      
                  Possibly a radio section too            01/01/70 00:00      
                  Crystals            01/01/70 00:00      
                     That C### is a capacitor number, I think            01/01/70 00:00      
      How about this?            01/01/70 00:00      
         use PNP at the high side            01/01/70 00:00      
         ...And get rid of the extra resistor in the...            01/01/70 00:00      
            Thanks. Time to test and draw            01/01/70 00:00      
               multimeter solution            01/01/70 00:00      
                  Similar to what I did            01/01/70 00:00      

Back to Subject List