Maker Pro
Maker Pro

Please check this for me

This is, I guess, ridiculously simple, but then ... I am just a bumbling beginner. I want to insert an LED into my circuitry so I can tell when it is powered up. I came up with this, but I get all-of-a-tizz when I think of pull-up and pull-down resistors. I want the LED to glow when the power is on:
upload_2018-6-12_14-21-39.png
Is that right?

Thanks
 

Harald Kapp

Moderator
Moderator
Is that right?
Sorry, no. As it is, the LEd will short circuit the 3.3 V supply.
The LED needs a curent limiting resistor in series, not in parallel. Read this resource for details and equations.

I also recommend a pull-up resistor from teh reset pin to 3.3 V to ensure logic high level with switch SW1 open.

Additionally it is always a good technique to add a bypass capacitor (typically 100 nF ceramic) next to the Vcc pin with as short as possible connections to the Vcc pin and GND.

[Edit: As you are using an Arduino (sorry, I saw that only later) the pull-up and the capacitor are probably in place on the arduino board, no neeed for additional components, tehn]
 
Thanks Harald

... the LEd will short circuit the 3.3 V supply.
The LED needs a curent limiting resistor in series, not in parallel. ]
I am not trying to control the light emitted by the LED - I believe that is the case for a current limiting resistor. I am trying to ensure that the LED will stop shining when the power supply is off - I believe that is a pull-down resistor. Is that not what I have.
Might I ask that you draw a schematic of the correct configuration.

I also recommend a pull-up resistor from teh reset pin to 3.3 V to ensure logic high level with switch SW1 open.]
I am assuming that this is taken care of in the Arduino (Pro Mini in this case).
 

Harald Kapp

Moderator
Moderator
I am not trying to control the light emitted by the LED
You need to limit teh current through the LED. Otherwise it will burn out or shut down the power supply, whichever happens first.
I am trying to ensure that the LED will stop shining when the power supply is off
That's a natural consequence of missing power.
I believe that is a pull-down resistor.
Your belief is wrong. Read here.
Might I ask that you draw a schematic of the correct configuration.
Put a resistor in series with the LED, not parallel. Calculate the required value acording to the resource linked in post #2.
 
That's a natural consequence of missing power.

I appreciate that lights usually go off when you turn the power off, but one of the first exercises I did when I started working through an Arduino book involved and LED that blinked (ain't that a surprise o_O ) and after a while the LED stayed on when the power was off. My interpretation was that there was some residual current in the circuit which kept the LED glowing - which, of course, could be dangerously misleading in some circumstances. This, as I recollect was solved by using a draw-down resistor which, I believed, siphoned off any residual current and turned the light out reliably. It's that effect I am trying to replicate here.

I'll go back to that book and your links in the morning.

Thanks
 

Harald Kapp

Moderator
Moderator
after a while the LED stayed on when the power was off.
How so? In that case power obviously was not off, or there was another power source that you didn't take into account.
My interpretation was that there was some residual current in the circuit which kept the LED glowing
There ain't no such thing as residual current.
The only way current can flow without power being applied is in a superconductor - I doubt your arduino was supercooled.
This, as I recollect was solved by using a draw-down resistor which, I believed, siphoned off any residual current and turned the light out reliably. It's that effect I am trying to replicate here.
The way you apply the resistor is to bleed any charge that may remain on capacitors after the main power supply is off. Usually at low voltages such a resistor is not required as the circuit will discharge the capacitors rather quickly. You use bleeder resistors to discharge high voltage circuits e.g. in a tube TV. Not here.

Anyway: the series resistor for teh LED is required.
 
I will just pipe in and agree that the resistor has to be in series rather than in parallel. You'll likely burn out the LED if you leave it in that configuration.

What color is the LED? You should make sure that the resistor matches the forward voltage. If it's red or green the forward voltage is lower thus a 330 ohm resistor makes sense. If it's blue you may need to adjust that resistor.
 

davenn

Moderator
I decided that the tell-tale LED was in the wrong place anyway so I shifted it to the power supply. Then I decided it was better on controlled voltage ('cos at least I'd know what voltage to set it for). This is what I came up with:

so in reality, you haven't changed it's position/function as it is still across your regulated 3.3V rail
 
Wouldn't a more normal place for the power on led be at the power plug inlet to the board with the appropriate resistor
 
so in reality, you haven't changed it's position/function as it is still across your regulated 3.3V rail
Changed its function because it is now in series. :) It's a really small resistor, but that's what the numbers brought up - and it works fine on the breadboard.
 
Top