Step 2: How Does It Work?

Picture of How Does It Work?
Inside the box is an geared motor powered by double A batteries and two switches: a toggle switch on the top of the box and a micro-switch inside. That's it.

The switches are positioned to be limit switches for the motorized arm. The toggle causes the motor to reverse, while a micro-switch powers down the circuit when the arm finishes retracting back into the box.

When idle, the circuitry is fully powered down. The toggle is “Reverse” direction, and the micro-switch is being held in the off position by the servo arm.

Keep in mind the micro-switch is wired up so that it works completely opposite from a normal switch like you would find in a doorbell. By using the common pin and the normally closed pin the micro switch is “OFF” when it’s button is being pushed.

When a person turns the toggle switch to the forward position, it also provides power to the motor causing it to rotate the arm towards the toggle switch.

As the arm moves away from it's off position it releases the micro-switch providing the backup power needed for the motor to retract after the toggle switch is turned off.

When the toggle gets switched “OFF” it actually reverses the motor’s direction. The arm reverses direction returning towards it's 'OFF' position. When the arm runs into the micro-switch it stops.

The toggle switch needed is a Dual Pole, Dual Throw (DPDT) toggle switch. This type of switch is actually a pair of switches which operate together (Dual Pole) and both are On-On (Dual Throw).

lukeD4 years ago
what if you are faster than the robot, and turn it off by yourself?
sirfag5 years ago
thanks mate it works great exept i need a box
I just bought a nice little box over at Lowes. It's a kids "build it yourself" Jewelry Box. It only cost $8. It's precut pieces that you just tack together. May be a little tight with all the wires.....
KenCan5 years ago
How about:
- a rubber finger or glove to cover  the wooden arm?
- a doll's arm lashed to a shortened wooden arm?
- a dime store rabbit's foot?

please try and then post, somebody! I'm creeped out already
Troyboyd5 years ago
 made me laugh so hard xD
muskogee5 years ago
can i do this with a continuous rotation servo? i have one frome my boe bot
I thought this was soooooooo funny!
judobrian5 years ago
Is there a secret to getting the geometry of the push arm down?  Its the last thing Im stuck on and my project is complete.  I've been creating 1/3 circles off my servo 'arm' but it never seems to quite do the job....  The one in the images above seem to be more of an "L" shape...  Thx
wwslubs5 years ago
What does all the dead bug components do?  I am using a modified servo  and was wondering if I could just skip all that stuff?
Great instructable! I just built one for myself yesterday! I would like to point out for those of you who don't want to build the electronics portion or don't have the parts, it can be completely eliminated. I modified the servo for continuous rotation (by removing the internal stop) and then soldered the red and black wires directly to the motor inside the servo, bypassing the electronics inside. Now it's just a motor with a gearbox. This allows you to use just the two switches to make the motor change direction and stop. I attached a schematic of how I hooked it up(the resistor represents the motor).

Overall, great instructable! And thanks for the idea!
useless box.png
For those that have asked, here's a pic of the inside of the one I built. I also attached a video of it in action. The lid of my box is very thick, so It wouldn't open easily the way SaskView's did, so I left it opening the way it came. It still works just fine, as seen in the video.
What degree of rotation does your servo get?  I notice when I run mine (not in the box yet, but just the circuit by hand) I only get ~90 degrees of travel.  Is this normal?
Hey, I have good soldering skills but I'm not very smart when it comes down to electronics, especially schematics.  Would you mind explianing where and what I need to solder/connect or provide a link that I can learn how to read this?  
Here's a link showing what all the different schematic symbols are...

I don't want to just give you a link, so I'll try to explain it. I've attached a photo of the insides of mine showing how I connected everything. Keep in mind that the battery or servo connections may need to be reversed if the servo goes the wrong way when you try it.

If that doesn't help, let me know and I'll try to explain it better.
First, are the lines shown correctly pointing to where you soldered them?  Two, for the dpdt switch does it matter if the switch is reversed, or due I have to solder them to specific pins?  Three, I am modifying a servo for the motor, do I have to resolder the wires directly to the motor and can I just leave them the way they are?  Four, do I just not use the white/yellow wire from the servo after modifying it now?

Thanks for all the help and I hope this helps other people with the same questions.
1) The lines are pointing to where I soldered them. 2) Most DPDT switches should have the pins in the same place, so it should work as shown. And yes, it does matter which pins(the only change you could make would be swapping all three wires from right to left side of the switch). The only thing that can go wrong is that the motor goes the wrong way when you flip the switch. The easiest way to fix this is to reverse the connections to the servo, or to the batteries (not both). 3) Yes, resolder the wires directly to the motor and don't hook the white wire to anything. 4) You can even take it out if you want.

I apologize if this still doesn't make sense. I'm not that great at explaining things. If there's anything else I can help with let me know.
wwslubs wwslubs5 years ago

Im using your technique with the modified servo

judobrian5 years ago
Thanks for the info.  One last question.  Is one of the resistors responsible for controlling the speed of the servo arm?  I saw this one: http://www.youtube.com/watch?v=2F_BKe-XWo4&feature=player_embedded and it moves VERY fast.  I think I'd like to have something moving a little fast than the SaskView's machine, but slower than the link shown above. 

Almost have all my parts, can't wait to get going!
As far as I can tell, not much.

Most likely the servo itself has a fast response.
Risensun5 years ago

I used compukidmike's schematic and an old Erectors Set I had, the toggle was a bit stiff so it needed a little help form a rubber band.

CORNSTALK5 years ago
Nice job on the machine...love it!

I've been looking at servos.  There are so many to choose from the "standard" servos, some with metal gears, plastic gears, hi-torque, etc etc.
I measured the torque required to operate a small DPDT switch and that was ~350g, apparently much more than the servos I've seen.

Can you be more specific, like model number, where you purchased it, etc.?

Missouri Ham
judobrian5 years ago
Hello, this is a great project!  I've never used a RC servo before, how does it 'know' its starting and stopping position?  And how does it reverse it's motion from the flip of a switch?  Thanks!
It doesn't need to know it's position, just it's direction of travel, and that's handled by the DPDT switch on top.

To try and re-iterate more simply: you press the switch on top and power is provided as setting the direction to "out". Once the arm moves a little, it hits a redundant power switch (wired in parallel). The redundant switch remains held until the arm is all the way back in the box again.

When the arm turns the top switch off, the top switch no longer supplies power (but the redundant switch does) and the direction is set to "in", returning the arm to the box using the redundant power switch.

If you flip the switch on top again, both switches again supply power and the direction set to "out" once again. See? Position is never known, all it needs is to move in the proper direction, which is handled by the DPDT switch.
Frivolous Engineering (author)  BobPaul5 years ago
But keep in mind the microswitch is using the "normally closed" pin so the switch is kind of working opposite from a normal switch.  Pushing the microswitch turns the power off.

When the machine is in the "0ff" state, the arm is holding the microswitch button in so no power. 

When the toggle is flipped it provides the initial power.  Once the servo leaves the "off" position, the microswitch button is release, allowing it to provide power for when the toggle gets flipped back to OFF.