1
\$\begingroup\$

I currently have a simple circuit which lets me control a servo using an arduino and have everything working, but I need the servo to go back to the default position in the event of a power failure, so I need a backup power supply for both an arduino nano (~5V) and the servo (~7.5V) for >=1 second (It takes about a second for the servos to rotate 180 degrees back to default, so longer would be better, but it's not crucial that they go totally back to default)

The circuit is currently supplied by 24VDC (powering other things too), into a DC Step down converter to ~7.5V (Variable) to supply the servos and a second DC Step down converter to 5V (For the arduino).

schematic

simulate this circuit – Schematic created using CircuitLab

I'm thinking of going with supercapacitors in parallel with the 7.5V output, but i'm not sure how to include this exactly, how to balance them and if this is even necessary, and what kind of diode to include and where.

I've included my best guess.

CircuitLab Schematic 7ab3r8aueyp5

I also need to include a way for the Arduino to know that the 24V source has turned off so that it knows when to reset the servo. For that I was planning on using an optocoupler between the 24VDC source and an arduino input but there is probably a much simpler/cheaper/better way.

\$\endgroup\$
1
\$\begingroup\$

You are attempting to product a circuit with a built in UPS.

There are lots of ways to do it, and super capacitors are a good option for a short period hold up, where you are attempting to return to a default position.

Your circuit with three super-caps is only missing two things: a current limiting resistor to limit the charging current into the capacitors and a method for the micro controller to detect a lack power.

The value of the current limiting resistor depends on the capabilities of your power supply and the desired charge time for the capacitors.

As for the power disconnect detect, the easiest and cheapest way would be a potential divider down to a safe IO voltage for the micro controller. You could either put anywhere before the return blocking diode (D1). There are possible reasons for using an opto-isolator, such as noise isolation etc, but they are over kill for your application (by the sound of it).

You are concerned about balancing the capacitors in series, that is easy enough to do. Either a very basic system using 100k resistors in parallel with each capacitor, or you can step it up a bit and put a zener in parallel withe the resistors as well, which will clamp the capacitor voltage to a safe range. Most of the time, using capacitors from the same batch, balancing won't be needed if it's just a project for yourself, if it's going into some kind of production the resistor chain has been good enough for most things I've worked on in the past.

You question the type and location of the diode. I think that the 1N4148 is a good go-to option. Ideally you want a very low forward volt drop, and you'll need it to handle the full current of the system (including charging of caps). As for location, you want it to have as little impact as possible on the operating voltage of the system. At the moment it will cause a voltage drop on the 7.5V rail, making it around 6.9V. If this is a problem, you could move the diode to before the first LDO, and you're 7.5V rail will be good during normal running.

Your current capacitor location means that as they discharge the voltage into the servo will drop down. This may or may not be a problem depending on how much current the system draws and how sensitive the servo is to the voltage drop.

In summary, your plan nearly works, just needs a current limit resistor to charge the capacitors in a controlled manner. Other comments are things to tweak and be aware of.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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