tommyorb
Posts: 4
Joined: Sun Feb 22, 2015 8:31 pm

First project advice, app, motor control

Sun Feb 22, 2015 8:54 pm

I am new to Raspberry Pi, still yet to buy my first but before I do I want to know if I am on the track.

I'm looking to make a basic enough app that allows the user to move a wooden dome roof maybe 6m in diameter. It's for a home observatory. Possibly move the roof according to degrees the user inputs also.

Would I be right in saying the roof motor would have to be online in order to use through a smartphone?
Would something like Raspberry Pi be suitable for this?
If I was to have two motors to move a lid and then rotate the roof itself, would I need to use two RPis?

Sorry I'm bit of a novice but want to learn

Mark_T
Posts: 149
Joined: Sat Dec 27, 2014 10:54 am

Re: First project advice, app, motor control

Mon Feb 23, 2015 12:06 am

Yes its feasible. You will need some sort of interface board, perhaps a Gertboard, but I think
that only handles one DC motor, and not a very big one. Is there an existing set of motors you
are wanting to drive or do you start with a clean slate?

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

Re: First project advice, app, motor control

Mon Feb 23, 2015 4:20 am

To drive a DC motor in two directions you'll want an H-bridge. These can be controlled by a Pi, no problem, as long as you have a separate power source (or the motors are tiny, which in your case they will not be.) Look around and check for one that will handle the amperage that your motors need.

If you're trying to control it by degrees, you may be looking at a stepper motor or servo motor instead of a DC motor. The Pi can control either of these, but again you'll need a separate power source for these, much like with the DC motors, and probably separate electronics.

The motor wouldn't be online... but the Pi controlling it probably would be, unless you want it to only work through Bluetooth or a local network (not connected to the Internet, but with a local wireless AP that the phone can connect to for controlling it.)

Two motors should be no trouble for one Pi, so long as you have the correct control circuits. A single Pi model B+ has 26 GPIO pins, which should let you control up to 13 DC motors using a H-bridges if you do it right. The number of stepper motors will depend on how many coils in each motor. Most have 4 I think, so you could use 6 motors with a single B+ if I'm right about that, with 2 pins left over for other purposes. 2 LEDs, one DC motor on an H-bridge, 2 switches, etc.

Check out YouTube for videos on how to make the Pi control whatever type of motor you'll be using. I'll warn you ahead of time that the Raspberry Pi Guy's H-bridge tutorial has a mistake that has burned out a few peoples' Pis: The "four enable pins" are not all enable pins and two of them carry 5v, so find another video to explain which ones and how to properly connect that type of H-bridge. Other than that his videos are very good.

BMS Doug
Posts: 3823
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: First project advice, app, motor control

Mon Feb 23, 2015 8:32 am

tommyorb wrote:I am new to Raspberry Pi, still yet to buy my first but before I do I want to know if I am on the track.

I'm looking to make a basic enough app that allows the user to move a wooden dome roof maybe 6m in diameter. It's for a home observatory. Possibly move the roof according to degrees the user inputs also.

Would I be right in saying the roof motor would have to be online in order to use through a smartphone?
Would something like Raspberry Pi be suitable for this?
If I was to have two motors to move a lid and then rotate the roof itself, would I need to use two RPis?

Sorry I'm bit of a novice but want to learn
Do you already have the motors fitted and working with manual switches to drive them?
If so then you can use a relay board in parallel with the switches to drive the motors.

You can definitely control both motors from a Pi.
Doug.
Building Management Systems Engineer.

tommyorb
Posts: 4
Joined: Sun Feb 22, 2015 8:31 pm

Re: First project advice, app, motor control

Thu Feb 26, 2015 3:37 pm

I have a clean slate to start with. We have made a few domes already but looking to implement automation.

The roof is roughly 50kgs so would need a powerful enough motor to move that and also a power supply to handle that. I was thinking maybe a 60w motor?? Would I need something else to prevent the board from maybe burning out due to the large amount of power?

Return to “Automation, sensing and robotics”