1

I recently wired up the following ill-advised circuit: A common-anode display is wired with its cathodes connected directly to an LED connected to ground.

A common-anode display is wired with its cathodes connected directly to LEDs connected to ground. But the strange thing is that it worked exactly as intended: when an LED turned on, the corresponding segment turned off.

My first question is, why didn't it burn out all the LEDs (plus maybe my microprocessor)? 3.3V should be passing directly from the chip, through the 7-Segment and the LED, and into the ground rail. One page on the chip's website (https://www.pjrc.com/teensy/techspecs.html) says it emits a max of 9mA, but that's just a warning about their tolerances, and the pins don't actually throttle output, right? But if all that's true, why is nothing fried? (note that the real circuit is doubled up from what you see in the diagram, using daisy-chained shift registers. I realized after drawing it that that might make a difference, since the current would be split 14 ways instead of 7).

My other question is, I added a resistor at the input of the 7-Segment to limit current, and the circuit still works as originally intended. How is that possible? If a segment is being lit up, that means there's current passing through it, but once on the other side, it should be going directly into the ground via the standalone LED, not "swimming upstream" through a resistor to reach ground via the shift register. Multimeter readings at the cathodes of the 7-Segment are emitting 2V and 0.3 mA. If 0.3mA are insufficient to light up the standalone LEDs, why do they suffice to light up the internal LEDs of the 7-Segment? (and as I recall, they weren't turning on when it was running with no resistance, either.)

Finally, all this has made me wonder, if the digitalWrite pins are capable of emitting 3.3V, what's the point of having a 3.3V pin?

1
  • the shift register powers the LEDs, not the Teensy pin
    – Juraj
    Feb 11, 2022 at 6:01

1 Answer 1

1

What you are experiencing here is the forward voltage of diodes. When a diode (here you have light emitting diodes, so LEDs) is places in the forward direction in a circuit, it will only conduct when a certain threshold voltage is reached. This voltage is called forward voltage and is dependent on the individual diode (you can find this info in the diodes datasheet) and on other factors like the temperature. To visualize this you can look at a diodes characteristics curve (plotting current against voltage):

diode characteristics curve

I got this image from the German wikipedia article on diodes. As you can see the current stays minimal until the voltage gets in the range of 0.7V. Then the current rises exponentially.

You yourself measured the forward voltage of the 7-Segment LED. You measured 2V between ground and the LED cathode. With 3.3V power you get a forward voltage of 1.3V.

What's happening? Your other LEDs likely have a higher forward voltage, so that the remaining 2V from the 7 Segment LEDs aren't enough to light them. There might be flowing a small current on the path through both types of LEDs, but it will be very small and cannot burn anything. So that path isn't as favorable for the current as you thought. Then taking into account that the shift register pulls its output to either ground or 3.3V it gets clear, that the shift register still provides the easiest current path.


If 0.3mA are insufficient to light up the standalone LEDs, why do they suffice to light up the internal LEDs of the 7-Segment?

I'm not very sure about that value. Typical LEDs need current in the range of maybe 5mA. For your LEDs we cannot definitely state it (since we don't know what LEDs you have), but 0.3mA seems to low for me. How did you measure it?

One page on the chip's website (https://www.pjrc.com/teensy/techspecs.html) says it emits a max of 9mA, but that's just a warning about their tolerances, and the pins don't actually throttle output, right?

That's only the current range for the digital outputs of the Teensy. Each digital pin has a driver hardware incorporated in the microcontroller. This hardware can only withstand a certain amount of current, until it fails. And it might fail short (shorting to either 3.3V or ground) or disconnected. When you drive the pin near and over its max ratings the voltage will dip on it, since some of the voltage gets lost on the driver components, which are loaded with more current than they were made for. The internal driver can then be killed by the power dissipation in it (voltage lost on the driver multiplied by the current gives you the waste power, which is dissipated as heat there, until something gets fried).

if the digitalWrite pins are capable of emitting 3.3V, what's the point of having a 3.3V pin?

As mentioned the digital output pins can only provide low current. They are meant for doing digital signaling, not for powering devices. The current is enough to drive a single small LED, but not enough to power a motor or other current hungry devices.

The 3.3V pin is not controlled by anything. It is directly connected to the power supply of the whole board. When you power the Teensy via USB it gets 5V from it. A voltage converter regulates that down to 3.3V and feeds it to the Teensys microcontroller to power it and also to the 3.3V pin. In fact you can also use it to connect your own regulated 3.3V power supply and thus power the Teensy through the 3.3V pin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.