Shop OBEX P1 Docs P2 Docs Learn Events
are resistors needed for 3v signals? — Parallax Forums

are resistors needed for 3v signals?

Hey guys,
I'm going to use a 7-segment LED for this project that involves the Propeller chip.
I've seen a few people who drive LED at 3V signals without any resistors, saying that it's safe to do so.
Is that true? Can you guys show me de wey?

Thanks.

Comments

  • I would definitely not drive an LED from 3V without current-limiting resistors. Use values of around 220 ohms per segment. BTW, how many digits are you planning to drive?

    -Phil
  • how many digits are you planning to drive?

    -Phil

    just one. so 7 leds.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2018-01-16 23:52
    Depending upon the chip itself, some output stages may have lower drive capability, meaning that they have higher channel resistance. Perhaps it is possible to drive LEDs directly without resistors because of this higher resistance but that resistance varies greatly and neither is it designed for handling continuous power especially over eight I/O. The chip may work but some segments may seem brighter than others and over time the stress can degrade the chip. Is it worth it? If saving a few cents is important and reliability and consistency is not, then yes, it is worth it. Is that what you think too? Why would you want to?

    Two 4-terminal SMD resistor networks take up hardly any board space and cost only a few cents and can handle all 8 segments continuously without being stressed.
  • Regarding the common lead: you will want to drive it with a transistor to handle the extra current when all seven segments are lit up at once. For a common cathode, use an NPN; common anode, PNP.

    -Phil
  • Propeller pins have an inherent series resistance of around 40 ohms. If you dead short the output this allows around 80 milliamps, which is well beyond the Propeller spec, but if you put it to an LED the LED's voltage drop limits current draw to fairly safe limits; a red LED drops about 2V, leaving around 30 milliamp draw, and colored LED's have higher drops leaving even less current draw. That said, you ALSO have to watch total power dissipation, because while it is safe to draw 40 milliamps from a pin it's not safe to draw 40 milliamps from all of them at the same time.

    TL;DR while it is probably safe to hook up one or even two or three discrete LED's without series resistors, hooking up an entire 7-segment display (especially if more than 1 digit) is likely to exceed the power dissipation limit of the entire chip. Also, while discrete LED's tend to be fine with 20 or more milliamps of drive, 7-segment displays are meant for a bit less, and you might be overdriving the display too.
  • The reason I don't want any resistors is because I don't want to solder smd resistors; I have very little experience in SMD soldering and I'm planning to make a PCB and everything. I don't want to mess it up. Also, I don't want the routing on my PCB to be super messy because more components mean more vias.
  • roglohrogloh Posts: 5,787
    edited 2018-01-17 01:07
    Another option is to time division multiplex the LED pins to keep the current in check. I've used that method before on AVR parts with LED displays. Requires more complicated driver software than just doing simple pin IO from Spin etc but it can be used to limit the average current to the LEDs. Being a real time operation you may have to dedicate another COG to doing this (or added to part of an existing COG already doing some timing stuff).

    If you ensure only some maximum number of the 7 segment LEDs are ever lit at the same time so you don't overload the Propeller's total pin current you might be able to somewhat "safely" drive your LED display without resistors. However if you are ever exceeding the LED segment current limits temporarily you want to make sure your program doesn't hang and keep too many outputs on when they shouldn't be or you could degrade the LED life or burn it out. With an AVR micro I would also use a watchdog interrupt and turn off the LEDs if it triggered (just to be sure). Prop doesn't have that capability so be sure to debug your LED loop code first so you know it won't hang and wreck your display.

    The TDM method can be used effectively to dim the LEDs and the brightness then depends on the duty cycle you use. Just keep the frequency high enough to stop flicker. Like a few hundred Hz or more.
  • Use through-hole resistor arrays, like this one:

    https://www.digikey.com/product-detail/en/bourns-inc/4608X-102-221LF/4608X-2-221LF-ND/1089124

    They're both tidy and easy to solder.

    -Phil

  • Those who say driving leds with no resistor is ok, have never had a led short on them at random due to semiconductor failure. (heat, emi, lifetime, bad manufacture, etc)

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2018-01-17 01:51
    pico wrote: »
    The reason I don't want any resistors is because I don't want to solder smd resistors; I have very little experience in SMD soldering and I'm planning to make a PCB and everything. I don't want to mess it up. Also, I don't want the routing on my PCB to be super messy because more components mean more vias.

    You do realize that the reason you have little experience is due to your own attitude. You had no experience with the Prop chip before you gained experience, it is the same with everything and so you shouldn't hold back for that reason excuse.

    There's nothing super messy about smd resnets and they are so easy to solder, even manually with an iron as long as you have flux available, the whole process is nice and clean and smooth. I don't know why you would need vias if the top track goes from the Prop to the resnet and then to the display.

    A word of warning about the use of TDM/PWM to limit the average current to LEDs in general, it is all very good and well when the software is running, but if there is a glitch and the outputs are left on at 100% especially when multiple outputs are driven, this can lead to something far more messy.

    I haven't used 7-segment LEDs in a long time but here's the track layout of a resnet that is driving LEDS. As you can see, it is straight and clean.

    btw, the trick to achieving a clean layout is sometimes due to being in control of the software. For instance you many find that to drive the 7 segments in proper order that you need to crossover and use vias. However the 7-segment decode is usually done by table lookup. By rearranging the bits in each character you can run the tracks directly to a segment and simply remap that in software.


    1497 x 654 - 17K
  • You do realize that the reason you have little experience is due to your own attitude. You had no experience with the Prop chip before you gained experience, it is the same with everything and so you shouldn't hold back for that reason excuse.

    Well, sounds right. I'll go with the SMD resistors. I've tried soldering a TQFP package AVR and that was a scary experience, since I am a student and PCB manufacturing in low quantities can go up to 40-ish dollars.
  • Or you can use 0805 resistors but resnets are just as easy and way more compact. Even with an iron you can tack it down, flux it, and simply flow solder along the terminals and if you don't overdo it then the flux will keep the solder flowing so that the excess solder sticks to the tip as you run it down the side and off. Just flick it off somewhere safe and not on your leg!
  • Just flick it off somewhere safe and not on your leg!
    Bear in mind that everyone in Oz wears shorts year-round. If you're wearing jeans, it doesn't matter! :)

    -Phil
  • rogloh wrote: »
    Another option is to time division multiplex the LED pins to keep the current in check. I've used that method before on AVR parts with LED displays. Requires more complicated driver software than just doing simple pin IO from Spin etc but it can be used to limit the average current to the LEDs. Being a real time operation you may have to dedicate another COG to doing this (or added to part of an existing COG already doing some timing stuff).

    If you ensure only some maximum number of the 7 segment LEDs are ever lit at the same time so you don't overload the Propeller's total pin current you might be able to somewhat "safely" drive your LED display without resistors. However if you are ever exceeding the LED segment current limits temporarily you want to make sure your program doesn't hang and keep too many outputs on when they shouldn't be or you could degrade the LED life or burn it out. With an AVR micro I would also use a watchdog interrupt and turn off the LEDs if it triggered (just to be sure). Prop doesn't have that capability so be sure to debug your LED loop code first so you know it won't hang and wreck your display.

    The TDM method can be used effectively to dim the LEDs and the brightness then depends on the duty cycle you use. Just keep the frequency high enough to stop flicker. Like a few hundred Hz or more.

    You could drive the common line to the display from a IO line as well,and tie it to reset through with resistor and a capacitor. The capacitor,discharges when low and charges when high. The cog is responsible for making sure that the duty cycle is such that it is not active long enough to trip the reset. If it is, then the cog resets,all the lines go low and the propeller restarts. Simple watchdog timer.

  • Something I've always wonder is what happens if you put an LED between two propeller pins without a resistor, then drive one high and the other low? Can one pin source enough current to burn another one out, sink enough current to burn the other one out, burn both out, or have no effect?

    I haven't tried it because I don't want to cross the streams, or burn out a propeller. But I am curious.
  • Martin_H wrote: »
    I don't want to cross the streams

    Are you trying to stop all life as you know it instantaneously, and explode every molecule in your body at the speed of light?
  • kwinnkwinn Posts: 8,697
    Could be any one of your options depending on the led forward voltage and the actual resistance and power dissipation capability of that output circuitry. In most cases I suspect the pins would be fine.
  • Martin_H wrote: »
    Something I've always wonder is what happens if you put an LED between two propeller pins without a resistor, then drive one high and the other low? Can one pin source enough current to burn another one out, sink enough current to burn the other one out, burn both out, or have no effect?

    I haven't tried it because I don't want to cross the streams, or burn out a propeller. But I am curious.
    Possibly. Remember, the amount of current that will flow depends upon the resistance of the circuit. Its quite possible that the input will draw more current than IT is rated at,AND draw more current than the OUTPUT is rated at damaging both. Then again, it may be that there is enough resistance in the two circuits to limit it to a safe value. Or perhaps there's enough to limit the current enough that it does not destroy the part instantly, but still draws more than the circuit was rated at, causing a slow degradation and eventual failure. Its the slow failure that is really a pain. I have parts here that I test for as much as a year at elevated voltage and temperature. I can watch how the parts degrade over time. For example, I've seen output signals that start out fine, but after months of stress, you can see the degradation on an oscilloscope. Sometimes it only happens at a voltage extreme. A new part might operate down to 2v while an old stressed part might only operate down to 2.8v. Another thing to keep in mind (I never really thought about it) is that integrated circuits have a life expectancy. I always thought of their failure as purely random before I did this sort of testing. Sort of like half life where half the atoms decay, but any particular remaining one is no more or less likely to decay over the next half life than they were in the previous half lives. It's not like that. The parts themselves degrade over time. The choice of operating voltages and temperatures is made such that you have a reasonable expectation that the part will remain within the required specifications over its service life n(for suitable values of "reasonable") .


    Back to the topic at hand. For the seven segment display, its not really worth the potential trouble to leave it out,as you can put the resistor on the common lead if your not trying to save pins. If you ARE trying to save pins then there are tricks where you can reduce the needed pins. There was a post on it a few months ago. Do a search for "Charlieplexing"
  • Two words/phrases:

    Electromigration
    Absolute Maximum Rating
  • In a space constrained application I once did something similar: I put a single current limiting resistor on the common positive leads of all LEDs, The microcontroller was programmed to only turn on one LED at a time (by pulling the pin low). The update sequence (via interrupt, this was on another microcontroller because I needed it in a 3x3 mm package) was to increment my rotation index, clear all LEDs, check if the indexed LED was supposed to be lit, and turn it on if so.

    Sorry if that was unclear...it was actually easier to program than to explain.

    thanks,
    Jonathan
  • You can use a single resistor on the common pin of the display if you time-multiplex the segments. Without the multiplexing, though, the brightness will vary, depending upon how many segments are lit at one time.

    -Phil
  • With the common resistor, it should be possible to light all of the desired segments at once and adjust the duty cycle to compensate for the brightness. I'm not sure how the performance compares to the time multiplex method. Just make sure that leaving one LED on continuously does not exceed the absolute maximum ratings.
  • With the common resistor, it should be possible to light all of the desired segments at once and adjust the duty cycle to compensate for the brightness.
    That's a valid point!

    -Phil
  • The trouble with one common resistor turning on all leds at the same time is that not all leds share current equally etc. Frankly, this whole thing about doing without resistors for the sake of doing without resistors as if there was a chronic shortage of resistors of if they were expensive etc is a waste of bandwidth. If it was about getting "Apollo 13" back safely then it would matter, but only in that instance.
  • Thanks for the responses to my thought experiment.
  • kwinnkwinn Posts: 8,697
    The trouble with one common resistor turning on all leds at the same time is that not all leds share current equally etc. Frankly, this whole thing about doing without resistors for the sake of doing without resistors as if there was a chronic shortage of resistors of if they were expensive etc is a waste of bandwidth. If it was about getting "Apollo 13" back safely then it would matter, but only in that instance.

    +1, and the higher peak currents, power dissipation, and more complex scan timing required to get near equal brightness from the leds make this approach more trouble than the few pennies saved are worth.
Sign In or Register to comment.