Archive for the ‘Quick Projects’ Category

Making a brushed DC motor controller out of a standard RC servo

Tuesday, December 6th, 2011

Another fun hack you can do by modifying the guts of a servo is converting the controller on board to a brushed DC motor controller.  The resulting controller will work just like a standard RC speed controller, allowing you to make a DC motor turn forward or reverse with it's speed proportional to the throttle position on your RC setup.   A simple controller like this should work great if you're trying to throw together a small RC setup like the Botmobile from some scavenged parts.

All you need to do to build your controller is remove the controller of a standard servo and replace the potentiometer with two equal value resistors (typically 2.2k, but higher values should be OK) and hook up the brushed motor you want to control in place of the servo's DC motor.  You want to connect the two resistors in the center by twisting their leads together connect the outside leads of the resistors to the outside potentiometer terminals and the twisted center to the center terminal. Here's a pic of a controller (specifically the TGY-S4505B controller, see some more pics of the guts of this servo in my previous post) after it's been removed from the servo and the resistors have been installed:

RC Servo controllerI used heat shrink on the two outside leads of the resistor to keep the connections insulated.  Next I put heat shrink over the two resistors:

And tape everything down.  Now I'm ready to test it out on Luis' partially completed turtle shell racer using a standard RC Tx/Rx set by connecting up the DC motor I want to power where the servo's DC motor was previously connected:

If everything works you should not see the DC motor turn (or turn very slowly until you adjust the trim) when applying power to the RC Tx/Rx set but the brushed DC motor should respond as expected when you use the throttle on your controller.  If you've modified a servo for continuous rotation this should be very familiar to you because that's essentially what you've done, you're just not using the mechanics of the servo.

Building push button arrays (keypads) the easy way

Wednesday, November 30th, 2011

I thought I'd share the method for constructing arrays of push buttons using common 4-pin tactile switches that I came up with while building some keypads for testing an upcoming project. All you need is a little perf board, some solid core 22-gauge-ish wire, and a handful of 4-pin tactile switches.  The specific switches I'm using here are Omron 12mm tactile switches, but there are plenty of similar switches out there (check out the huge selection at Digikey and Mouser).

First off, these 4-pin switches generally have two pairs of pins that are connected to each other internally.  The switches I'm using have pins 1 and 2 and 3 and 4 connected internally. When the button is pressed, the two sets of pins are shorted. We can take advantage of the internal connections of these buttons to easily create the interconnected rows or columns of our button array.

Tactile switches placed on perf board

Start off by laying out your array on your perf board and cutting it down to size. I've left exactly one row of perf holes between each button. You can get away with placing them closer, but do not place them further apart, as we'll be bending the pins of the buttons to form electrical connections between buttons on the back side of the perf board. It doesn't matter what orientation you place the buttons with, as long as you're consistent.

Next, flip the board over and bend the neighboring pins you want to connect together. You'll want to form a nice line of buttons that are all connected together on one side as shown. These connections form a row (or column, depending on the orientation) for your array.

Next we'll need to form the columns of our array.  You'll want to connect the side of the switches that you didn't bend together in the previous step together in columns perpendicular to the  connections you just made.  I do this with 22-guage solid core wire by first sizing a single jumper needed and pre-cut all 6 that I'd need to place to save time.   I placed each wire jumper and bent the protruding ends in opposite directions so that each would stay in place until I soldered them down.

After all the wire jumpers are in place and the correct pins are in place, inspect your work and make sure everything looks good and that no columns or rows have been accidentally connected.  If everything checks out, solder up all the connections.

Soldered connections

Now the array is actually complete, using only 6 wires. Now all that's left to do is wire the row/columns of the array to whatever circuit you happen to be using with them and add some finishing touches.

I added a 10-pin header to the board for connecting to some other hardware with some 10-pin ribbon cables I've got around, added some holes for mounting the keypad (and probably its cover plate), and added cap hardware.  Hopefully I'll be posting details on the project these keypads will be used in in a couple weeks...

Modifying the TGY-S4505B Servo for Continuous Rotation

Monday, November 7th, 2011

If you don't already know, continuous rotation servos are servos who's output shafts rotate freely and continuously rather than through a fixed range like a normal RC servo.  They're great for all sorts of robotics projects and are pretty easy to make from your typical cheap RC servo with a few modifications.  I picked up a few TGY-S4505B servos from Hobby King (which seem to be good servos for the price) for a project I'm working on and modified a few for continuous rotation so I thought I'd share some pics and an overview of the two ways to go about tricking the servo controller into thinking the servo is always centered.

Here's a couple pictures of the TGY-S4505B servo disassembled:

TGY-S4505B servo disassembledTGY-S4505B disassembled

First off, you'll need to eliminate anything that mechanically limits the output shaft from turning all the way around.  This means removing the tab that limits the motion of the servo on the output gear, which I filed off (compare with the first photo above where the tab was still intact):

Next we'll need to remove the potentiometer or decouple it from the output gear.  The potentiometer looks glued in pretty well, so I cut off the top and filed it down as well:

Next you'll need to fool the controller into thinking the servo is centered all the time.  You can do this one of two ways, by centering the feedback potentiometer and locking it in place somehow (glue most likely) or by replacing the potentiometer with 2 resistors of equal value.  The second method requires a little more work on your part, but you can always fall back to substituting resistors if locking the potentiometer didn't work.

The stock potentiometer is a 5k ohm but you should be able to substitute in any reasonably sized (2k-10k or greater), equal value resistors for the potentiometer as shown here:

All that's left to do now is to reassemble and verify that everything rotates freely and the output shaft doesn't move if you attempt to center the servo with whatever controller you happen to be using.

Electronic Fireworks Ignition System

Monday, July 4th, 2011

So here's another quick project I whipped up for the 4th of July, an electronic ignition system. Basically, it's just an aesthetically pleasing way to heat up some nichrome wire to ignite fireworks from a reasonably safe distance. I basically hit up my local Radio Shack for some cool looking switches, made a simple enclosure for them, and wired them up to apply power from a 12 Volt gel cell to a small section of nichrome wire after an arming toggle switch is engaged and a momentary switch is depressed.

Here's the BOM for this build:


Spacing is pretty tight so you'll probably want to wire up everything before completely assembling. I twisted up my wire in a drill chuck for a previous project and you'll likely want to do the same unless you use speaker wire or some other multi-stranded wire.  It's hard to see in the picture below, but at the bottom of the handle  I also tied off the wire entering and exiting the enclosure. You'll want to do this to avoid damage to your connections in the enclosure should someone tug on the wires or trip over them (which happened several times during actual use for me).

I connected up the toggle switch to power and ground directly from the battery with about a 4 foot length of twisted pair wire. The LED's positive lead is connected to the accessory output of the toggle switch. This will make the LED illuminate when the trigger is ready to fire. One end of the momentary switch is connected to the accessory output as well and the other end is connected to the positive alligator clip with about a 20 foot section of twisted pair wire between them. The negative alligator clip is connected directly to ground.

All you have to do to ignite your fireworks is clip a small section of nichrome wire in between the alligator clips and set it across the wick of the firework you want to ignite and give it a short pulse of power to heat it up. I used a small section of recycled heater wire from a busted MakerBot hot end, which had a resistance around 6 Ohms. Using Ohm's law, this should pull about 2 Amps from the battery, which is well under the maximum current the momentary switch I got can handle.

I used a small scrap part to act as a spool for the log leads that go out to the fireworks which helped keep the wiring neat. I also shoved the whole thing in a spare ammo box for transport for a little added effect.  It works quite well, but I think it needs some sound effects and maybe a count down to make it a little more satisfying to use, but there's always next year!


Playing with fireworks is always dangerous and so is this project. Don't attempt to build this if you don't know what you're doing, because this stuff can catch fire all by itself, no explosives needed. Always set up the nichrome loop at the end of your alligator clips to fall away from your fireworks after igniting them. Also don't attempt to light things like sparklers with it. It'll work but you'll just end up destroying your nichrome. Thicker wicks, like the ones for artillery shells, seem to damage the nichrome as well.

Quick Projects – Build a Simple Vinyl Roll Floor Rack

Monday, January 3rd, 2011

I recently acquired a vinyl cutter that came with a reasonable cache of sign making supplies.  These supplies included several 24" and 15" rolls of vinyl that I had no easy way of storing, so I made a quick rack to store most of them (the alternative was buying a $50-60 wall rack I had to mount that only held 16 rolls or a $200 floor rack).  I played with the idea of making racks that would work with some cheap gondola shelving I picked up, but in the end I opted for a simple floor rack because it was easier, and significantly cheaper, to build.


  • 16 M3x40 bolts - Perfect length for spanning  2 sheets of 1/4" material using 1" spacers
  • 16 1" Spacers - I had some around for stacking PCBs on my Makerbot
  • 16 M3 nuts - I've got a lot M3 hardware because of Makerbot projects
  • Rubber feet hardware - Picked up at Home Depot for $2
  • 3-12"x18" Sheets of MDF - Available at Home Depot in 4'x2' sheets for about $6
  • 15' 1" Schedule 40 PVC electrical conduit - About $2-3 for a 10' section
  • Wood Glue


First you'll need to cut/drill your parts out.  Get the design files and a more detailed BOM from the Thingaverse page for the rack here.  I cut out all these parts out of 1/4" MDF on my laser cutter, but you could easily just use a hand drill and a hole saw to make them.

Bottom MDF Sheet

Top MDF Sheet

Cover MDF Sheet

Next you'll want to cut your conduit into sections.  You can make quick, clean (but not always straight) cuts with a pvc pipe cutting tool, pictured below.  I used 1" schedule 40 electrical conduit, which is a little under 1-1/3" in diameter in 12" sections.  You could probably get away with shorter sections and conserve a little conduit.

After that's done, start assembling everything.  Install the feet and assemble the top and bottom pieces with your M3x40 bolts and 1" spaces.

Next you'll install the cover, which will prevent the bolt heads from damaging the ends of the vinyl rolls.  Use a couple conduit sections to make sure everything's aligned correctly then glue it to the top layer and clamp it down.

Now all you have to do is wait until the glue dries, remove the clamps, install the rest of the conduit sections and you're done.