jamsab
Posts: 5
Joined: Wed Dec 05, 2012 2:52 pm

Control brushless motor speeds

Wed Dec 05, 2012 3:05 pm

Hi everyone, i am completely new to this sort of stuff but im working on an idea but need to work out the components needed before moving forward.

The first thing i need to know is if im on the right track !? i need to take a brushless motor and control / monitor its speeds, similar to as you would a radio controlled car.

Am i right in saying all i need is the Pi, a power supply (AC - DC), the brushless motor ( DC ), and a monitor & video cable ? I guess im missing some bits for controlling the motor am i ??

Any help would be much appreciated.

Thanks
Jamie

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: Control brushless motor speeds

Wed Dec 05, 2012 3:39 pm

Yes you need externall hardware to drive the brushless motor and something to provide 6 halfs of timing drives. There is not much on the Pi that can directly do it.

You will need power drivers to drive the motor and it is not a five minute job. Motor control is a whole industry sector in itself. I have done things like this before and you need to know the full spec of the motor and its load conditions, including stalled.

Example of timings required for a motor I once worked on
Attachments
BLDC.gif
Example of waveforms to drive a brushless motor
BLDC.gif (17.35 KiB) Viewed 8872 times
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

jamsab
Posts: 5
Joined: Wed Dec 05, 2012 2:52 pm

Re: Control brushless motor speeds

Wed Dec 05, 2012 3:58 pm

Thanks for the info,, i shall get a motor asap and post the specs, just to confirm before i buy the driver,,

im guessing something along these lines ? (depending on motor) :- http://www.pololu.com/catalog/product/755

Thanks

User avatar
PeterO
Posts: 5456
Joined: Sun Jul 22, 2012 4:14 pm

Re: Control brushless motor speeds

Wed Dec 05, 2012 4:00 pm

jamsab wrote:im guessing something along these lines ? (depending on motor) :- http://www.pololu.com/catalog/product/755
Thanks
NO ! .... "This discrete MOSFET H-bridge motor driver enables bidirectional control of one high-power DC brushed motor. "
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Control brushless motor speeds

Wed Dec 05, 2012 4:03 pm

That controller is for a standard brushed DC motor. Not brushless. Check before you buy!

First, what sort of motor are you going to use?

Second, how accurately regulated do you need the speed to be?

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: Control brushless motor speeds

Wed Dec 05, 2012 4:08 pm

NO that is for a BRUSHED motor not a BRUSHLESS.

Brushless motors have 4 connections minimum A, B, C and common or something similar
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

jamsab
Posts: 5
Joined: Wed Dec 05, 2012 2:52 pm

Re: Control brushless motor speeds

Wed Dec 05, 2012 5:08 pm

No worries everyone, :D i wasn't going to buy that particular one, i was just using as an example of type of hardware, like i said im a newbie,, i will get the motor from a model shop i guess,, however i have loads of old PC Fan motors,, would that do ??

Thanks

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Control brushless motor speeds

Wed Dec 05, 2012 5:11 pm

Actually, I believe the motors in PC fans ARE brushless, not brushed. Are you confused yet? I believe I am :shock:

User avatar
joan
Posts: 14688
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Control brushless motor speeds

Wed Dec 05, 2012 5:13 pm

Brushless motors are a new fad. Perhaps you mean the old fashioned motor which is powered by a battery.

jamsab
Posts: 5
Joined: Wed Dec 05, 2012 2:52 pm

Re: Control brushless motor speeds

Wed Dec 05, 2012 5:17 pm

I am, i will soon see the light,, ok i can make do with the PC fan to start with i guess,

DC12V 0.60A BRUSHLESS :)

User avatar
PeterO
Posts: 5456
Joined: Sun Jul 22, 2012 4:14 pm

Re: Control brushless motor speeds

Wed Dec 05, 2012 5:20 pm

It may be worth looking at using an RC model brushless motor controller (Called Electronic Speed Controllers (ESC) by RC modelers) and driving that from the Pi. You would need to create a PWM (Pulse Width Modulation ) signal but there are examples of people doing that already to control RC servo motors.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
joan
Posts: 14688
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Control brushless motor speeds

Wed Dec 05, 2012 5:21 pm

Could you provide a link to the specs of the motor?

jamsab
Posts: 5
Joined: Wed Dec 05, 2012 2:52 pm

Re: Control brushless motor speeds

Wed Dec 05, 2012 5:26 pm

Hi Peter, thanks that is exactly what im looking for.

J

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Control brushless motor speeds

Wed Dec 05, 2012 5:31 pm

jamsab wrote:Hi Peter, thanks that is exactly what im looking for.

J
You'll find loads of them at giantshark.co.uk or hobbyking.com look for ESC.
The ones made by HobbyWing are a good balance between cost and quality (at least they were last time I bought one a couple of years ago). If quality is paramount, Jeti and Hacker are very good (I think Jeti make the Hacker ones actually).
Alex Eames RasPi.TV, RasP.iO

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: Control brushless motor speeds

Wed Dec 05, 2012 5:48 pm

joan wrote:Brushless motors are a new fad. Perhaps you mean the old fashioned motor which is powered by a battery.
Such a new fad that most 3.5inch floppy drives have them, nearly every hard drive for last 20 years and various other motoirised items.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

garya
Posts: 1
Joined: Mon Nov 19, 2012 4:19 pm

Re: Control brushless motor speeds

Thu Dec 06, 2012 11:10 pm

I second the idea of using an RC electronic speed controller. They work well, are easy to drive with PWM from the raspberry, and are quite inexpensive.

If you only want to drive the motor in one direction, this one can't be beat for the low current you mentioned:

http://www.hobbyking.com/hobbyking/stor ... oduct=4318

cnt
Posts: 60
Joined: Wed Sep 26, 2012 4:42 am

Re: Control brushless motor speeds

Fri Dec 07, 2012 12:20 am

I think there is a critical question that people are neglecting.
Why do you think you need a brushless motor? Also there are different kinds of brushless motors.

As previously stated there are ones like PC fans which just have two wires (maybe a third for an ecoder). These two wire versions have a simple control circuit in them to generate the AC signal needed.

Generally speaking though, when a person needs a brushless motor they're talking about the 3 terminal (or more) variety like you'd find in RC planes and helecopters.

Honestly, unless you have a good reason for needed a brushless motor I'd use brushed motor with two terminals. They're much easier to deal with, especially when first figuring out how to work with electronics.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12594
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Control brushless motor speeds

Fri Dec 07, 2012 1:19 am

Is this "brushless motor" actually what is normally called a "stepper motor"?
There are many kinds of brushless motor, so its easy to confuse one kind with another.
The only aspect they share is that all of them do not have commutator brushes.

See wikipedia: http://en.wikipedia.org/wiki/Brushless_motor

So first try to read up a bit, so you can accurately describe what you need.

summers
Posts: 63
Joined: Mon Jan 30, 2012 4:27 pm

Re: Control brushless motor speeds

Fri Dec 07, 2012 10:06 am

Well guess you would start by asking how many pole and home many phase is the motor.

Pole tell you how many times you have to switch the current to get the motor to rotate once. Phases is how many signals you have to drive.

Odds are you'll get a 2 phase motor, with some smallish number of poles. Just to show how it works lets say 10 pole for example.

Now the two phases you have to drive in quardature (for a 2 phase motor, for 3 phase - each phase is 120 degrees appart). lets assume you are going for a simple drive, and drive with square waves. Won't be all that smooth - but should get things turning.

So the two quradature signals will look like:

A: 0 0 1 1 and repeating
B: 0 1 1 0 and repeating

Now when you have a 1, you want to drive current through that winding in one direction, and when you have a zero you want to drive in the reverse direction. So you'll need to set up the external electronics for doing that. Thing to look at is a H bridge.

Now for a 10 pole motor you will need to send out the signal above 10 times to get the motor to rotate once - so you can use that to work out how fast to turn.

Next onto comutation. This is about how fast do you switch through the above waveforms. With any luck your motor will have hall sensors or something, that tells you when the motor has turned enough for the waveform, to move on. if you got that it would be worth monitoring.

So I guess thats the basics, typical motor drives are a fair bit more complex ...

Return to “General discussion”