capacitator powered arduino

Hey there, i need to know if i can power my arduino after i disconnect it from external voltage, i want to do one command after its disconnected, can i use capacitator.
Arduino mega will provide power thrue diode andcapacitator to arduino nano and after disconect nano has to move stepper motor and turn off. Thanks and sorry for my english

Yes, you can run a Arduino on a capacitor for some time (and even a pretty long time on a super cap). But that would exclude more power hungry things like a the steppers or even the led!

So in this case, the stepper needs it's own power supply and you have to remove the leds from the Nano.

I just need to move it for 90 degres and turn off

Like I said, the Arduino without leds is going to be fine. You can forget about powering the stepper from a capacitor unless you want to use a bank of super caps for that... Because turning that "just" 90 degree isn't a light task, even with a small stepper.

So have u got any other idea? Please its only option i found.

Then you have to explain the whole situation into more detail.

Only answer I can give you now is don't cut the power if you want to move it...

Use a Lipo battery instead of a capacitor with a blocking diode in the main supply line to prevent the Lipo backfeeding your power supply

But that would include adding charging circuitry if you want to be able to keep doing it (aka, not run the battery flat).

And it kind of falls under "don't cut the power" :smiley:

Supercaps or battery are the only ways to hold enough energy for a stepper motor. Both require some
careful design of charging circuitry, there is no simple solution.

Can you have a software controlled power switch that puts things into a power down state before cutting the actual power? Like a computer shutdown command?

Why not use a spring and an end stop?

Allan

KeithRB:
Can you have a software controlled power switch that puts things into a power down state before cutting the actual power? Like a computer shutdown command?

You can use a RS latch with a n channel mosfet to keep the arduino in the reset position and when you want to turn the system back on you just need to pull the reset pin of the RS latch to ground which will close the mosfet and reset the system. And this way you do not have to use supercaps or an externel power supply

Why mess with the reset? Just turn everything off.

Or, because that would already assume you can control the power, don't turn the Arduino off and just put it to sleep and let the Arduino cut the power to all external parts. Easiest way, both power up and power down fully under software control and an Arduino in sleep barely consumes power.

But if you can't control the power (for example something else controls it or you want to pull the plug) then you have two options:

  1. Indeed make a complicated design with a battery or a supercap
  2. Don't pull the plug or let something else control the power. Simply signal the Arduino if it needs to turn on or off.

Have you considered a couple ultracaps? Something like these. They should be able to run a small stepper motor for a couple minutes.

sight

Will this work? Arduino will read power value and after low value it will move the motor.

septillion:
sight

Do you mean "sigh", as in ... "I just said that!"?

I know this, but it didn't seem like the OP got what you've been saying since reply #1. So I provided a link to a capacitor that would likely turn a stepper motor. Maybe they are looking for a schematic as well?

Like this?

Yes, mainly because OP didn't really respond and MarkT mentioned it as well (at which I commented).

The schematic is a useful addition but I'm not a fan of it. There is no balancing so the caps can go out of balance which, so close to there max rating, isn't really ideal... Also, the current when it's turned on is going to be huge....

As I said, some careful design of charging circuitry is needed.

septillion:
...
The schematic is a useful addition but I'm not a fan of it. There is no balancing so the caps can go out of balance which, so close to there max rating, isn't really ideal... Also, the current when it's turned on is going to be huge....

How would I improve it? My circuit only uses a single cap (this one), rated at 1F and 5.5v.

Here's my circuit, it's an 'analog' rtc for a technology teaching toy:

The capacitor is there to prevent loss of the time if the magnetic connectors are accidentally disconnected.