# Controlling capacitor charge/discharge with polarity switch

Discussion in 'The Projects Forum' started by Ecko_66, May 8, 2016.

1. ### Ecko_66 Thread Starter New Member

Aug 7, 2010
3
0
I've built a little robot that goes down and up a shaft. The robot has wheels connected to a motor. The motor is connected to a switch connected to a power supply. The switch has three states - forward, reverse and off. The switch and power supply don't move, and a powered tether line connects the switch to the moving robot. The power supply is set to constant 9V, and on the way down the shaft the motor draws 0.06 amps, and on the way back up it draws 0.20 amps. The robot takes about 20 seconds to go down the shaft, and about 30 seconds to come back up the shaft. The robot works great, but there's room for improvement.

This is for a school project. We are graded on our power consumption, which is measured only on the way up, not on the way down. I'd like to minimize the power consumption on the way up by slightly modifying the design. I'd like to charge a capacitor while the bot is descending, and using it to power the bot on the way up. So I'd like help designing a circuit where this happens:

1. When the switch is set to 'forward,' the polarity is so to make the motor drive the robot down the shaft. When the polarity is set this way, I'd like a capacitor to be charged off the same 9v supply going to the motor. I'm not sure what the current limit of the power supply is set to, but it should be at least 5A, so there should be plenty of current to power the motor and charge a capacitor.

2. The robot must stop once on the way down the shaft to show that it's not free-falling, and the operator is in control. This is accomplished by setting the switch to 'off,' and the motor has enough static friction to keep the bot in place. So, when the power is cut off, the capacitor needs to not discharge.

3. Once the robot reaches the bottom of the shaft, the switch is set to reverse and the polarity is switched. At this point I'd like the motor to spin in reverse in order to make the robot ascend, and to draw a steady 9V if possible from the capacitor, or a range from 9V-6V. If the capacitor runs out of charge before the the robot reached the top of the shaft, I'd like the motor to switch over to drawing power from the power supply, and if the capacitor drives the bot all the way to the top and still has some charge left, I'd like to be able to stop the bot by setting the switch to off.

Any and all help designing this circuit is greatly appreciated. I do have an arduino, but I don't think this calls for programming, but rather a simple circuit.

2. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,980
1,138
Welcome to AAC!
Let's do some maths.
0.2A x 30s = 6As = 6 Coulombs required during the ascent.
Energy stored in a capacitor = 0.5 x C (Farads) x V^2.
Energy available from cap if voltage drops from 9V to 6V = 0.5 x C x (9^2-6^2) = 0.5 x C x 45 Coulombs.
So, what value of C would be needed?

3. ### Ecko_66 Thread Starter New Member

Aug 7, 2010
3
0
6 = 0.5*C*45 ==> C = .266 Farads, correct?

4. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,980
1,138
Correct. But whether the energy required for the ascent comes directly from the 9V supply or from the capacitor it will be the same. You said "We are graded on our power consumption, which is measured only on the way up", but it's not clear how that will be measured. You need to find out if the capacitor-stored energy is measured. If it is, then you won't have gained any advantage.