Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

75%
+4 −0
Q&A Driving LED with NPN transistor from I/O pin

I'm trying to understand a circuit for driving a LED found on a board I purchased. Below is the circuit driven by an I/O pin (HS2) of a small 3.3V processor. The HS2 pin is driven by the I/O wi...

4 answers  ·  posted 4y ago by eric‭  ·  last activity 1y ago by TonyStewart‭

#11: Post edited by user avatar Lorenzo Donati‭ · 2023-08-09T19:02:01Z (over 1 year ago)
Retagged.
#10: Post edited by user avatar Lorenzo Donati‭ · 2023-07-28T20:46:35Z (over 1 year ago)
Reformatted for better readability. Some minor grammar and wording adjustments.
  • Trying to understand a circuit for driving a LED found on a board I purchased.
  • Below is a circuit driven by an I/O pin (HS2) of a small 3.3V processor.
  • ![Image alt text](https://electrical.codidact.com/uploads/b4zaLBC1Bwb8jkoHMZdsbeBE)
  • The HS2 pin is driven by the I/O with specs of V(high) = .8(Vsupply) = 2.64V, and V(low) = .1(Vsupply) = .33V . The I/O pin can be set to drive up to 28 ma, but I am guessing the design of the circuit would rather pull the current from Vsupply rather than the I/O controlling pin (HS2), and that is the reason for using the npn transistor (S8050) to drive the LED.
  • The LED is a SMD 3528 white that I do not have specs on, but testing shows it lights up nicely at 40ma, and does fine at 11ma, with 3.24v across the LED.
  • I am wondering if the reason for this design is because this bright white LED is typically looking for a 3V drop, and if they used a current limiting resistor in series with the LED, then maybe the resistor would drop too much voltage and bring the volts across the LED to less than 3?
  • How is the 1K / 10K voltage divider working to set the current through the flash? Does this circuit seem like a good one to duplicate if I wanted to create additional LED's driven by other pins on the processor? When the transistor is on, is it setting the current, or will the current vary per the gain of the transistor? I see how this circuit is acting as a switch, but is also fixing the current through the led, or is the current through the led dependent on the gain of the transistor.
  • I'm trying to understand a circuit for driving a LED found on a board I purchased.
  • Below is the circuit driven by an I/O pin (HS2) of a small 3.3V processor.
  • ![led driver schematic](https://electrical.codidact.com/uploads/b4zaLBC1Bwb8jkoHMZdsbeBE)
  • The HS2 pin is driven by the I/O with these specs:
  • **V(high) = 0.8 &centerdot; V<sub>supply</sub> = 2.64&#x2009;V**
  • **V(low) = 0.1 &centerdot; V<sub>supply</sub> = 0.33&#x2009;V**
  • The I/O pin can be set to drive up to 28&#x2009;mA, but I am guessing the design of the circuit would rather pull the current from V<sub>supply</sub> rather than the I/O controlling pin (HS2), and that is the reason for using the NPN transistor (S8050) to drive the LED.
  • The LED is a SMD 3528 white LED for which I do not have specs, but testing shows it lights up nicely at 40&#x2009;mA, and does fine at 11&#x2009;mA, with 3.24&#x2009;V across.
  • I am wondering if the reason for this design is because this bright white LED is typically looking for a 3&#x2009;V drop, and if they used a current limiting resistor in series with the LED, then maybe the resistor would drop too much and bring the voltage across the LED to less than 3&#x2009;V.
  • How is the 1k/10k voltage divider working to set the current through the flash?
  • Does this circuit seem like a good one to duplicate if I wanted to create additional LEDs driven by other pins on the processor?
  • When the transistor is on, is it setting the current, or will the current vary per the gain of the transistor?
  • I see how this circuit is acting as a switch, but is it also fixing the current through the LED? Or is the current through the LED dependent on the gain of the transistor?
#9: Post edited by user avatar Olin Lathrop‭ · 2020-06-16T13:08:30Z (over 4 years ago)
  • Trying to understand a circuit for driving a LED found on a board I purchased.
  • Below is a circuit driven by an I/O pin (HS2) of a small 3.3V processor.
  • ![Image alt text](https://electrical.codidact.com/uploads/b4zaLBC1Bwb8jkoHMZdsbeBE)
  • The HS2 pin is driven by the I/O with specs of V(high) = .8(Vsupply) = 2.64V, and V(low) = .1(Vsupply) = .33V . The I/O pin can be set to drive up to 28 ma, but I am guessing the design of the circuit would rather pull the current from Vsupply rather than the I/O controlling pin (HS2), and that is the reason for using the npn transistor (S8050) to drive the LED.
  • The LED is a SMD 3528 white that I do not have specs on, but testing shows it lights up nicely at 40ma, and does fine at 11ma, with 3.24v across the LED.
  • I am wondering if the reason for this design is because this bright white LED is typically looking for a 3V drop, and if they used a current limiting resistor in series with the LED, then maybe the resistor would drop too much voltage and bring the volts across the LED to less than 3?
  • How is the 1K / 10K voltage divider working to set the current through the flash? Does this circuit seem like a good one to duplicate if I wanted to create additional LED's driven by other pins on the processor? When the transistor is on, is it setting the current, or will the current vary per the gain of the transistor? I see how this circuit is acting as a switch, but is also fixing the current through the led, or is the current through the led dependent on the gain of the transistor.
  • (also, I wanted to use different tags, but currently I think I can only select among 3 drop-down choices)
  • Trying to understand a circuit for driving a LED found on a board I purchased.
  • Below is a circuit driven by an I/O pin (HS2) of a small 3.3V processor.
  • ![Image alt text](https://electrical.codidact.com/uploads/b4zaLBC1Bwb8jkoHMZdsbeBE)
  • The HS2 pin is driven by the I/O with specs of V(high) = .8(Vsupply) = 2.64V, and V(low) = .1(Vsupply) = .33V . The I/O pin can be set to drive up to 28 ma, but I am guessing the design of the circuit would rather pull the current from Vsupply rather than the I/O controlling pin (HS2), and that is the reason for using the npn transistor (S8050) to drive the LED.
  • The LED is a SMD 3528 white that I do not have specs on, but testing shows it lights up nicely at 40ma, and does fine at 11ma, with 3.24v across the LED.
  • I am wondering if the reason for this design is because this bright white LED is typically looking for a 3V drop, and if they used a current limiting resistor in series with the LED, then maybe the resistor would drop too much voltage and bring the volts across the LED to less than 3?
  • How is the 1K / 10K voltage divider working to set the current through the flash? Does this circuit seem like a good one to duplicate if I wanted to create additional LED's driven by other pins on the processor? When the transistor is on, is it setting the current, or will the current vary per the gain of the transistor? I see how this circuit is acting as a switch, but is also fixing the current through the led, or is the current through the led dependent on the gain of the transistor.
#8: Post edited by user avatar Olin Lathrop‭ · 2020-06-16T13:07:02Z (over 4 years ago)
#7: Post edited by user avatar Olin Lathrop‭ · 2020-06-16T13:06:27Z (over 4 years ago)
#6: Post edited by user avatar Olin Lathrop‭ · 2020-06-16T13:06:14Z (over 4 years ago)
#5: Post edited by user avatar Olin Lathrop‭ · 2020-06-16T13:04:43Z (over 4 years ago)
#4: Post edited by user avatar Monica Cellio‭ · 2020-06-16T01:26:00Z (over 4 years ago)
adding tags requested by OP
#3: Post edited by user avatar eric‭ · 2020-06-16T00:43:12Z (over 4 years ago)
  • Trying to understand a circuit for driving a LED found on a board I purchased.
  • Below is a circuit driven by an I/O pin (HS2) of a small 3.3V processor.
  • ![Image alt text](https://electrical.codidact.com/uploads/b4zaLBC1Bwb8jkoHMZdsbeBE)
  • The HS2 pin is driven by the I/O with specs of V(high) = .8(Vsupply) = 2.64V, and V(low) = .1(Vsupply) = .33V . The I/O pin can be set to drive up to 28 ma, but I am guessing the design of the circuit would rather pull the current from Vsupply rather than the I/O controlling pin (HS2), and that is the reason for using the npn transistor (S8050) to drive the LED.
  • The LED is a SMD 3528 white that I do not have specs on, but testing shows it lights up nicely at 40ma, and does fine at 11ma, with 3.24v across the LED.
  • I am wondering if the reason for this design is because this bright white LED is typically looking for a 3V drop, and if they used a current limiting resistor in series with the LED, then maybe the resistor would drop too much voltage and bring the volts across the LED to less than 3?
  • How is the 1K / 10K voltage divider working to set the current through the flash? Does this circuit seem like a good one to duplicate if I wanted to create additional LED's driven by other pins on the processor? When the transistor is on, is it setting the current, or will the current vary per the gain of the transistor? I see how this circuit is acting as a switch, but is also fixing the current through the led, or is the current through the led dependent on the gain of the transistor.
  • Trying to understand a circuit for driving a LED found on a board I purchased.
  • Below is a circuit driven by an I/O pin (HS2) of a small 3.3V processor.
  • ![Image alt text](https://electrical.codidact.com/uploads/b4zaLBC1Bwb8jkoHMZdsbeBE)
  • The HS2 pin is driven by the I/O with specs of V(high) = .8(Vsupply) = 2.64V, and V(low) = .1(Vsupply) = .33V . The I/O pin can be set to drive up to 28 ma, but I am guessing the design of the circuit would rather pull the current from Vsupply rather than the I/O controlling pin (HS2), and that is the reason for using the npn transistor (S8050) to drive the LED.
  • The LED is a SMD 3528 white that I do not have specs on, but testing shows it lights up nicely at 40ma, and does fine at 11ma, with 3.24v across the LED.
  • I am wondering if the reason for this design is because this bright white LED is typically looking for a 3V drop, and if they used a current limiting resistor in series with the LED, then maybe the resistor would drop too much voltage and bring the volts across the LED to less than 3?
  • How is the 1K / 10K voltage divider working to set the current through the flash? Does this circuit seem like a good one to duplicate if I wanted to create additional LED's driven by other pins on the processor? When the transistor is on, is it setting the current, or will the current vary per the gain of the transistor? I see how this circuit is acting as a switch, but is also fixing the current through the led, or is the current through the led dependent on the gain of the transistor.
  • (also, I wanted to use different tags, but currently I think I can only select among 3 drop-down choices)
#2: Post edited by user avatar eric‭ · 2020-06-16T00:41:31Z (over 4 years ago)
  • Trying to understand a circuit for driving a LED found on a board I purchased.
  • Below is a circuit driven by an I/O pin (HS2) of a small 3.3V processor.
  • ![Image alt text](https://electrical.codidact.com/uploads/b4zaLBC1Bwb8jkoHMZdsbeBE)
  • The HS2 pin is driven by the I/O with specs of V(high) = .8(Vsupply) = 2.64V, and V(low) = .1(Vsupply) = .33V . The I/O pin can be set to drive up to 28 ma, but I am guessing the design of the circuit would rather pull the current from Vsupply rather than the I/O controlling pin (HS2), and that is the reason for using the npn transistor (S8050) to drive the LED.
  • The LED is a SMD 3528 white that I do not have specs on, but testing shows it lights up nicely at 40ma, and does fine at 11ma, with 3.24v across the LED.
  • I am wondering if the reason for this design is because this bright white LED is typically looking for a 3V drop, and if they used a current limiting resistor in series with the LED, then maybe the resistor would drop too much voltage and bring the volts accross the LED to less than 3?
  • How is the 1K / 10K voltage divider working to set the current through the flash? Does this circuit seem like a good one to duplicate if I wanted to create additional LED's driven by other pins on the processor?
  • Trying to understand a circuit for driving a LED found on a board I purchased.
  • Below is a circuit driven by an I/O pin (HS2) of a small 3.3V processor.
  • ![Image alt text](https://electrical.codidact.com/uploads/b4zaLBC1Bwb8jkoHMZdsbeBE)
  • The HS2 pin is driven by the I/O with specs of V(high) = .8(Vsupply) = 2.64V, and V(low) = .1(Vsupply) = .33V . The I/O pin can be set to drive up to 28 ma, but I am guessing the design of the circuit would rather pull the current from Vsupply rather than the I/O controlling pin (HS2), and that is the reason for using the npn transistor (S8050) to drive the LED.
  • The LED is a SMD 3528 white that I do not have specs on, but testing shows it lights up nicely at 40ma, and does fine at 11ma, with 3.24v across the LED.
  • I am wondering if the reason for this design is because this bright white LED is typically looking for a 3V drop, and if they used a current limiting resistor in series with the LED, then maybe the resistor would drop too much voltage and bring the volts across the LED to less than 3?
  • How is the 1K / 10K voltage divider working to set the current through the flash? Does this circuit seem like a good one to duplicate if I wanted to create additional LED's driven by other pins on the processor? When the transistor is on, is it setting the current, or will the current vary per the gain of the transistor? I see how this circuit is acting as a switch, but is also fixing the current through the led, or is the current through the led dependent on the gain of the transistor.
#1: Initial revision by user avatar eric‭ · 2020-06-15T23:31:47Z (over 4 years ago)
Trying to understand a circuit for driving a LED found on a board I purchased.  

Below is  a circuit driven by an I/O pin (HS2) of a small 3.3V processor.

![Image alt text](https://electrical.codidact.com/uploads/b4zaLBC1Bwb8jkoHMZdsbeBE)
  
The HS2 pin is driven by the I/O with specs of V(high) = .8(Vsupply) = 2.64V, and V(low) = .1(Vsupply) = .33V  .  The I/O pin can be set to drive up to 28 ma, but I am guessing the design of the circuit would rather pull the current from Vsupply rather than the I/O controlling pin (HS2), and that is the reason for using the npn transistor (S8050) to drive the LED.

The LED is a SMD 3528 white that I do not have specs on, but testing shows it lights up nicely at 40ma, and does fine at 11ma, with 3.24v across the LED.

I am wondering if the reason for this design is because this bright white LED is typically looking for a 3V drop, and if they used a current limiting resistor in series with the LED, then maybe the resistor would drop too much voltage and bring the volts accross the LED to less than 3?

How is the 1K / 10K voltage divider working to set the current through the flash?  Does this circuit seem like a good one to duplicate if I wanted to create additional LED's driven by other pins on the processor?