Pulling a string with a motor

I am building an automatic chicken coop door opener. Yes, you can buy them but that wouldn't be fun, would it? The door is a 200 gram (or 0.4 lb) MDF panel and I want to pull it vertically with a string as shown here:

But I don't know how to attach the string to the the shaft of the motor.

I know there are gears (https://www.sparkfun.com/categories/254) and couplers (https://www.sparkfun.com/categories/255) but that still doesn't help me.

I was thinking of using a wooden sewing bobine:

and connect it to the shaft. But how? Do I look for a coupler and extra shaft with the right diameter and hot glue the 2 together? Will that hold? Is there a better way?


A spool seem like the obvious solution... That's how construction cranes & winches work... If hot glue doesn't hold, epoxy will.

If you can't find a spool with the right dimensions, you could make a spool from a dowel with washers on the ends ( (maybe fender washers). If you make your own, you may not be able to drill a straight hole all the way through (depending on the length), but you can drill holes on both ends with a "bearing" (just a loose shaft) on one end.

So long as you have about 5+ turns that are always on the axle/spool, little force at all is needed to secure the end, sticky tape will probably do.

Each turn round the shaft/spool multiplies the effective force such that enough turns means 99.9% of the force on the string has already been given too the spool.

Failing that a smoothed-out hole through the shaft could be used - rough spots will cause cutting of the string so file them really smooth.

To attach the spool to the shaft, maybe stuff the inside of the spool with paper to near the top. This give you a "pool" to add epoxy or elmers glue into this pool. Then place the stepper motor on top of this pool with the shaft dipping into the pool of epoxy or elmers glue. When the stuff hardens, hopefully the motor shaft will be held in place in the epoxy. ***before doing this, place saran wrap on the motor face and poke the shaft through the saran wrap. You don't want the motor face epoxied onto the spool, just the shaft.

What kind of motor are you using? A stepper driver and motor like this one?

I've used this before. It's got pretty good torque, enough to wind half pound load on a string IF the radius isn't too long. It's also got enough gearing to prevent self-unwind when the stepper is powered off, so the door won't close byself if it's not powered.

I'd pick a spool with smaller winding radius. You have to do more rotations yes, but it'd be more likely to work. You might also consider getting a stepper with metal gears instead of the cheap plastic gears. Also, the stepper motor library has a "motor off" command that turns off the coils so you're not wasting energy.


You will probably find you want a motor + gearbox to increase the torque and reduce the speed, otherwise you will be limited to using a tiny pulley which will make it harder to stop the windings getting tangled up on the pulley.

I'm not sure whether you're looking for free DIY options to attach the pulley, or nice robust off-the-shelf solutions. For the DIY approach I would look for a spindle that is a similar diameter to the motor/gearbox output shaft, and connect using a plastic sleeve that is a tight push fit on both parts. Support the spindle on two bearings (loose fit holes through a couple of bits of wood should do the trick). To attach a pulley to the shaft, just wrap adhesive tape tightly around the shaft to build it up until the pulley is a tight push fit.

The 'off the shelf' approach would use a universal coupling between the motor/gearbox and the shaft, and a boss secured to the shaft with a grub screw (worn out drive pinions are excellent for that) with the pulley bonded to the boss - or buy a pulley designed to mount on a shaft.

The wooden sewing reel you showed looks like a good basis for the pulley, but make sure you use suitably stout cord - think shoelace rather than sewing thread - so it doesn't wear out too quickly. (This will have implications for the size of the pulley you need).

How about this?

Why all the chicken stuff?


Thanks all, some great information here.

I will go for the DC 5V stepper motor as proposed by @arusr (side note: it's cheaper on eBay US and ship it to Europe than to buy it on eBay Europe). The DC motor I have here is simply not strong enough and will not hold the 200 grams when powered off.

And make a spool from a dowel with washers as proposed by @DVDdoug. Great idea, never thought of simply making my own instead of trying to find the right spool.

Will report back. ;)

As for the chicken stuff @LarryD: I am tired driving over to my dad's place to close his chicken coop when he's on holiday. I can do better than that. 8)

It’s interesting, search for chicken in the forums, probably 6 other people doing the same thing you are doing.

Gear motor is Soooo much easier.
Car window motor.
200ma at 5 volts.


Stepper motors are not a particularly efficient way to generate mechanical power, and will not provide any holding torque when they're powered off. If you're planning to power the motor off then you need to design the door / drive mechanism so that it will hold itself. For example any gearbox with less than 50% efficiency would not be driven by loads on the output shaft - worm gears for example typically have to be powered in both directions because they have less than 50% efficiency. You don't necessarily have to use a worm drive though - I have quite a micro motor here with a 200:1 epicyclic gearbox which is very resistant to moving when it's powered off and would probably be fine for applications like yours. But I don't see it working with direct drive motors.

Chicken coop doors have been much discussed in the past. Some previous discussions.


Thanks again. I ordered the 5V 4-phase DC gear stepper motor yesterday. It's shipped. Will see how that goes. Might not be good enough if @PeterH is right. If so, I'll look for car window or worm gear one.

@zoomkat: Yes, you are right, there are a ton of automatic chicken coop door projects on the interwebs. Have seen most of them by now I guess. Still most of them mention "the motor" which doesn't really help me. This thread on the other hand has been hugely helpful.

A recent discussion that might be of interest.


For the string, use 50 or 100 pound test fishing line. Very strong; very thin; reasonably cheap.

I'm working on the same thing. I don't mind taking care of the chickens everyday, but I'd rather not have to worry if we're away. Also sometimes in the middle of the night the coyotes wake me up and I lay there for 15 minutes trying to remember if I closed the coop. I'm planning to use a heavy duty DC motor with a toothed belt and pulley out of a printer. Another option I had considered that would be similar to what you're doing is to use the wheels and gearbox off of an old rc car. Both of these can be sourced from Goodwill a resale shop for almost nothing, or from the curb for exactly nothing if you have a sharp eye on trash rubbish day.

The advantage of the RC car is you can pop the rubber tread off of the wheel and have a nice spindle, and there's an H-bridge already built in. I guess you would probably want to use an off road or monster truck for a slightly lower gear ratio. The advantage of the printer parts is...... they're beefy. A feature I noticed on a commercial door closer is that it closes partially, reopens, and then closes completely. Apparently to give any loitering birds the chance to move. I plan to have it close well after they've roosted so I'll skip that little hassle.