Will Servo Drain Battery

I have a similar previous post which I’ve asked to be deleted.

I want to build a circuit that will have a small hinged sign, flip up and down, controlled by a servo (or stepper) and a switch. Ideally, flip a toggle switch one way and the sign flips up, flip the toggle the other way and the sign flips down. Or, push a button once and the sign flips up, push again and the sign flips down. My concern is that while the servo is sitting in one position or the other, it will still be drawing power from the source (a 12V car battery). How can I have this so once the sign flips, the circuit goes to sleep and then wakes up when the switch is flipped again. I would like to avoid using two switches, one for power and one to control the servo, if possible.

Thanks!

hfreedman

Use a motor driving a worm gear arrangement and 2 limit switches. That will eliminate and current draw to hold the flap’s position. Simple logic can turn sequential single button pushes into up-down-up-down … motion. Such a circuit has been posted in this forum, for a drawer IIRC. Of course a simple MCU can do the logic task.

Thanks for this. I’m a newbie so please bear with me. I’m not sure how this type of limit switch will work. I have to think that as the flap reaches a limit of up or down, it contacts the limit switch which opens the circuit and therefore stops the movement. 1st question…how does a limit switch close again so there can be a circuit. 2nd question, how will the code know the current position of the flap so it instructs the motor which way to turn to the worm gear when the button is pushed next time? I wasn’t able to find a limit switch under products and I couldn’t find the posting for the drawer. Thanks again.

Google is your friend. Search for “limit switch” or “microswitch” Most have small levers or rollers that activate the mechanism.

You will need two microswitches, one for each end stop. To allow the motor to reverse, put a diode across each switch, capable of carrying the full motor current. http://www.bpesolutions.com/bpemanuals/ … mit.SW.pdf

Wow! I understand this. I was lost at the beginning but had to look up what a diode does. Now I know and this makes perfect sense. I’m hoping I can buy all that I need at Sparkfun. This is where I just started to learn about electronics and components so I want to support them all I can. Thanks so much! How do I mark this as solved?

Wait!!! I’m a little lost on reversing the current using a switch and MCU logic. If I’m now using a regular DC motor with limit switches and diodes, how can it tell which position the flap is in, up or down, so it knows which way to send the current for the direction of the motor. How do I do that?

hfreedman:
How do I mark this as solved?

Got me, it's some option that appears for the thread starter. But why don't you come up with a schematic or such, and post it before closing the thread. That way "we" can pummel ... er, 'help' ... you some more. :mrgreen:

I found my simple circuit for the drawer I mentioned earlier. It’s a different case from yours in that the OP didn’t want to use a MCU, wasn’t concerned about power used and wanted to push/hold to unlock some drawer or door. Then push/hold the same button to lock (no auto-stop, no limit switches). But here’s the animated gif to give you some ideas. It reverses/removes 12vdc to some DC solenoid or motor, I’ve forgotten which it was. There’s many ways to do what you want, from simple (power hungry) relays like below to using something like an Adafruit Trinket+driver+limit switches. The trick is that when properly done a worm gear holds position against considerable force w/o power. Such arrangements were used in my old Honda to open/close flaps in the heater/AC system.

(click on to open and animate)

hfreedman:
Wait!!! I’m a little lost on reversing the current using a switch and MCU logic. If I’m now using a regular DC motor with limit switches and diodes, how can it tell which position the flap is in, up or down, so it knows which way to send the current for the direction of the motor. How do I do that?

One way is to use the limit switches to tell the MCU that the flap is all the way up (or down). The MCU then removes power and remembers the flap position, up (or down). When the button is pushed again it commands an H bridge driver to apply reversed voltage until the flap hits the other limit switch, indicating full down (or up). Wash, rinse, alternate on subsequent button pushes. The trick is then to come up w/a true *zero power* (btw activations) solution (if truly needed) vs just a micro-power solution.

http://www.adafruit.com/products/1501

https://www.sparkfun.com/products/315

https://www.sparkfun.com/products/9479

https://www.sparkfun.com/products/11142

So, How do I interface/connect the H Bridge motor driver chip with the adafruit trinket? Also, don’t you want a switch that when it’s pushed, it opens the circuit rather than closing the circuit? This is complicated for a newbie.

hfreedman:
So, How do I interface/connect the H Bridge motor driver chip with the adafruit trinket?

Wires ? It depends on what you get. I linked to some 'naked' ICs but you can find them soldered to a (break out) board, either at SF or Adafruit or Pololu I'm sure. Then do some point to point soldering of wires.

hfreedman:
Also, don’t you want a switch that when it’s pushed, it opens the circuit rather than closing the circuit? This is complicated for a newbie.

The beauty of an MCU is that the code can be written to do most anything. But if you'll settle for a 2 position, non-momentary switch then it gets real simple. I suspect no MCU or H bridge needed, which is what jr was getting at. I'd have to think about it some more.

I interpreted your “push a button once and the sign flips up, push again and the sign flips down” to mean a momentary switch. You can get push-to-open, push-to-close switches.

Mee_n_Mac:

hfreedman:
Also, don’t you want a switch that when it’s pushed, it opens the circuit rather than closing the circuit? This is complicated for a newbie.

But if you'll settle for a 2 position, non-momentary switch then it gets real simple. I suspect no MCU or H bridge needed, which is what jr was getting at. I'd have to think about it some more.

I interpreted your “push a button once and the sign flips up, push again and the sign flips down” to mean a momentary switch. You can get push-to-open, push-to-close switches.

Sorry for any confusion re: the above. As jr said you could just do this ...

(click on to open and animate)

If you use a 2PDT/DPDT switch (not momentary) you get a simple mechanism with 2 diodes, 2 limit switches, a DC motor with (worm)gear box and your flapper. As shown in the gif, when the flapper is down and power is applied w/SW1 still in it’s “down” position, nothing happens. Even though voltage is applied to the motor, the circuit is broken by an open limit switch (SL2) and blocked by D2. No drain on the battery occurs.

When SW1 is moved to it’s “up” position, power is applied initially via D2 through the motor and the closed SL1. Then as the flapper moves, SL2 closes and current flows through it. Motion continues and finally the flapper moves enough to open SL1 and again the circuit is broken, now by SL1 and D1, w/the flapper “stuck” in it’s up position.

That circuit makes sense. Thanks so much!!! Also, can you recommend easy to use software for drawing simple schematics like yours above, hopefully free?

Wait, I’m lost on how the 2PDT/DPDT switch works and what it looks like as I can’t find one as a product at SF or Adafruit. I’m visualizing this as having 5 connectors, 2 input and 3 output. The two input are pos & neg from the power source. The three output connectors has the middle as the neg and the two end connectors as pos, only one being active at a time depending on which direction the switch is toggled, with the middle position of the toggle not closing the circuit. Is that correct? Thanks again!

I count 6 terminals; 2 “center” inputs connected to the battery + and - and 4 outputs switched btw SL1 and SL2 as shown in the animation. They generally come as toggle or rocker switches.

https://www.sparkfun.com/products/11139

I think you were looking for a latching (non-momentary) version of this.

https://www.sparkfun.com/products/11151

Digikey might have one.

https://learn.sparkfun.com/tutorials/sw … and-closed

For a wiring picture and switch internal mechanical operation (vs prior schematic) see if this makes more sense. Red and violet dashed lines showing the current flow to and from (respectively) the motor with the flapper midway btw up and down.

(click on to open and run animation)

Thanks for the circuit diagram and all the help. I’ve found a low cost linear actuator which relieves my anxiety about setting up the motor and gearing and I’ve located a three position reversing toggle switch. With a couple micro limit switches and a couple of the correct diodes, and I’m set. Thanks again!

I know you’ve already got things figured out. But I have 2 cents to donate.

Servos are nice little contraptions they only draw current when running or resisting a motion. That’s mostly because of the high gear ratio inside. When powered down they do resist movement but are pliable. When powered up they actively resist movement so for a small load or an inactive load (one that would be stationary without the help of a motor) they can be quite efficient.

Depending on the geometry of the sign and what “up” and “down” are you could sleep the servo (shut it’s power supply down) while not in use. Saving a lot of power.

For every question there are many solutions.