artaex
Posts: 3
Joined: Sat Mar 08, 2014 11:15 am

Beginner: curtain opener & closer

Sat Mar 08, 2014 12:49 pm

Hello,

I want to make a curtain controller so I can open and close my curtains remotely.
I've found the following stepper motor which seems suitable: Wantai 42BYGHW811 (alternatively NEMA-17 Bipolar 48mm Stepper).
But I'm totally lost as how to control it using my RasPi...

- Do I need a motor driver board since the motor works best at 12V?
- Is there an alternative to driver boards?
- How do I power the motor?

If possible, I'd like to use a breadboard if it saves costs. The motor will be hung up on the ceiling and there are no power sockets near. The RasPi will be placed on the floor.

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Beginner: curtain opener & closer

Sat Mar 08, 2014 5:42 pm

- Do I need a motor driver board since the motor works best at 12V?
- Is there an alternative to driver boards?
- How do I power the motor?
Yes, you probably want a motor driver board. You can pick up an L298N board on Ebay for about $5, and that should work.
There is probably an alternative. If nothing else a DIY motor driver board would count as an "alternative" but I don't know enough to make a good recommendation. I do know that you definitely can't just connect the stepper motor to the GPIO pins and have that succeed.
You can power the motor with any 12v power supply. I would recommend a 12v wall wart, such as one you might find with a laptop, printer, or network equipment. I don't know if it would be best to run the motor wires the distance between the Pi and the motor, or if it would be better to mount the driver board next to the motor and run the GPIO lines and power the longer distance. I suspect the latter, but I don't know, and it may not really matter. Either way, since your Pi is on the floor and the motor is on the ceiling, you'll definitely need several wires running up the wall connecting the two. (If it was me, I'd probably use an Ethernet jack at each end and run a standard 4-pair Ethernet cable between the two for your connection, just to keep it tidy, rather than running alarm wire up the wall.)

artaex
Posts: 3
Joined: Sat Mar 08, 2014 11:15 am

Re: Beginner: curtain opener & closer

Sun Mar 09, 2014 11:38 am

Tarcas wrote: Yes, you probably want a motor driver board. You can pick up an L298N board on Ebay for about $5, and that should work.
There is probably an alternative. If nothing else a DIY motor driver board would count as an "alternative" but I don't know enough to make a good recommendation. I do know that you definitely can't just connect the stepper motor to the GPIO pins and have that succeed.
You can power the motor with any 12v power supply. I would recommend a 12v wall wart, such as one you might find with a laptop, printer, or network equipment. I don't know if it would be best to run the motor wires the distance between the Pi and the motor, or if it would be better to mount the driver board next to the motor and run the GPIO lines and power the longer distance. I suspect the latter, but I don't know, and it may not really matter. Either way, since your Pi is on the floor and the motor is on the ceiling, you'll definitely need several wires running up the wall connecting the two. (If it was me, I'd probably use an Ethernet jack at each end and run a standard 4-pair Ethernet cable between the two for your connection, just to keep it tidy, rather than running alarm wire up the wall.)
Hi,

Thank you for your reply.
I came across the EasyDriver v4.4 Stepper Motor Driver board and was wondering if it's a good solution to work with the Wantai 42BYGHW811...
For the wiring part, is it okay to make a long chain of jumper wires? (M>F>M>F>M>etc. I need them anyway).

Thanks in advance.

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Beginner: curtain opener & closer

Sun Mar 09, 2014 2:45 pm

I've never worked with stepper motors, so I'm going to refrain from commenting on specifics. I do know a $5 H294 H-bridge will do the trick, though.
As for chaining jumper wires, I don't see why it wouldn't work, as long as they're secured so that they don't pull apart, but it seems like an expensive and ugly solution to a simple problem.

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Beginner: curtain opener & closer

Sun Mar 09, 2014 3:04 pm

How times change! :D

I remember building a timed curtain opener as a lad over 30 years ago by attaching a cotton reel to the alarm wind-up handle on an old mechanical bedside alarm clock so that when the alarm went off in the morning, the cotton reel turned winding in a string attached to a carefully balanced house brick on the bedroom windowsill that fell to the ground and pulled on strings attached to the bottom corners of the curtains to pull them both upwards and outwards. Just call me Wallace! :lol:
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

artaex
Posts: 3
Joined: Sat Mar 08, 2014 11:15 am

Re: Beginner: curtain opener & closer

Sun Mar 09, 2014 3:11 pm

I found an alternative to chaining the jumper wires.
Could someone tell me if the driver/stepper combination will work?

Return to “Automation, sensing and robotics”