I would like to have an Arduino, that can switch itself off. Once, the button is pressed for two seconds, the Arduino will power itself via PIN #9. As soon as PIN #9 is set to LOW, the Arduino switches off and saves power.
Here is the circuit:
But sadly this doesn't work. The darlington transistor should be strong enough for the Arduino, I can switch another Arduino on and off. But the Arduino can't switch itself.
One mistake is connecting an output pin to a voltage way bigger than the supply voltage.
Another mistake is not limiting the current in the base.
Another mistake is saying Darlington in the title and drawing a FET , which is it?
Another mistake is the whole concept of the circuit.
And you are trying to turn on a high-side switch using a logic HIGH, when it needs a logic LOW -
switching uses common-emitter, not emitter-follower.
The easiest way I've devised is to use a CMOS flip-flop to control the high-side switch,
the flip-flop is continuously powered (no problem, CMOS gates take only nano-amps).
The flip-flop has set input and reset input, one can be controlled from a switch, the other
from the Arduino.
However note the max voltage limits for this and the Pololu module. If you have 12V power
it gets more complicated.
I build that functionality using a $1 e-bay 5vdc latching relay. One manually powers the board on and the first code in the setup function turns a output pin high to latch the power relay on. Then anytime the program wants to shut off power it just brings the output pin low.
Yes very wrong. In electronics the schematic is king. If you go telling lies in it it is just like telling lies in words, even worse.
Now you have drawn a FET, you have used a darlington transistor. This MUST have a resistor in the base.
This can not be used as a top switch. The maximum voltage you can get out of it in that configuration is 2V less than the base signal which is a maximum of 5V. So all you can get out of it is 3V. That is enough to light an LED but not enough to power an Arduino.
You need to read a lot, lot more about electronics before you touch the hardware for the safety of all components.
I still don't understand the mistake in my circuit.
Grumpy_Mike:
The maximum voltage you can get out of it in that configuration is 2V less than the base signal which is a maximum of 5V.
I thought, a transistor is able to switch more voltage from collector to emitter than from base to emitter. Isn't that the purpose of a transistor?
If I connect base to 9V from the battery, the transistor switches the Arduino on.
I thought, a transistor is able to switch more voltage from collector to emitter than from base to emitter. Isn't that the purpose of a transistor?
Only if the load is in the collector not the emitter.
You seem to have it in a common collector mode known as an emitter follower, although as you drew a FET rather that what you have actually got then who knows how you have actually connected it. In this mode the voltage on the emitter follows the voltage on the base only 0.7 to 2 V lower.