CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

brushless DC motor control

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
loomix
Guest







brushless DC motor control
PostPosted: Mon Dec 28, 2009 4:37 pm     Reply with quote

Hello guys !

I need to develop basic piston motion.

- push piston forward
- wait cca 2 second
- push piston back.

The piston is connected to 5V DC motor.

Regarding on situation piston should move faster or slower.
For this project I was thinking to use some 5V brushless DC motor because there is no need of stepper motor.

My questions are :
- how to turn DC motor on or off ( simply by outputting output_high(somePin) ?
- how to switch "polarity" to get back and forward movement.

- is there any schematic on this ?

L.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Dec 28, 2009 5:38 pm     Reply with quote

Look at Microchip application notes on BLDC motor control with 18F
and 16F PICs. Here are a few of them:

AN899 (for 18Fxx31):
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en012145

AN970 (for 18F2431):
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en022169

AN1175 (for 16F690):
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en534512
Ttelmah
Guest







PostPosted: Tue Dec 29, 2009 3:29 am     Reply with quote

Lets make some more comments though.... Smile

A BLDC motor, is _harder_ to control than a stepper.
Effectively a BLDC motor is just like a stepper motor, but instead of feeding basic 'on/off' pulses, you feed it synthesised sinusodal waveforms. You have these waveforms 'leading' the rotating armature, and adjust the amount of lead to vary the torque. Doing this implies you must detect the rotation, which is either done using a separate sensor, or by detecting the voltage on the undriven phase (one is undriven at any time). Complex code, needing a lot of processor performance, and quite a lot of external hardware.
The big advantage of BLDC, is the power you can get from a given motor size. Have one I'm driving here, using 40V at 10A, and it is only the same size as stepper motors developing less than half the power. Now, the code for this, took a couple of weeks of programming to get right, while I'd expect to be able to implement a stepper based solution in probably a day....

The application does not really sound like a good target for BLDC. It would be far easier to go one of the other routes:

1) Simple DC motor. Difficult to get good speed control, but cheap....
2) BLDC, with an external controller. Much easier to make, but costly.
3) Stepper. Second in price, only to the basic DC approach, and much easier to control.

I'd be looking at either a simple DC motor, and adding some form of speed sensing (slotted disk on the shaft perhaps, with an optical sensor), or a stepper for this. BLDC, is going to get complex.....

Best Wishes
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Dec 29, 2009 9:03 am     Reply with quote

The most important reason to use a BLDC instead of a standard DC motor would be a lifetime requirement above 5000 or 10000 hours. I don't expect this for your application. A standard DC motor, with some means for position respective speed feedback - if required at all - is most likely the best solution. To use BLDC, also a suitable motor must be available.
Loomix
Guest







PostPosted: Sun Jan 03, 2010 3:23 pm     Reply with quote

Thank you for reply.
I think I will use stepper motor.

The idea is to create some low power consumption device capable of pushing/drawing cca 10 gram piston. The motor will be fully operational cca 12 hours per day and it will be running completely on created program. There will be no buttons or regulators. All this should be made by the program.

It's like some plug and play solution. You plug it and it runs.

I don't know how much power do I need for something like that but this can be changed later and it's not the main thing.

Where can I find the schematic for something like this ?
I found some projects on google but thats not what I need.

btw. I have picdem 2 plus so I can use any processor that can be supported by this development board.
Ttelmah
Guest







PostPosted: Sun Jan 03, 2010 4:07 pm     Reply with quote

There is not going to be any 'off the shelf' circuit, that will be exactly what you need. However there may be some solutions that get close.
Start with some questions:

Voltages available?. Only 5v, or are other supplies available?.
Peak currents available?.
How fast need the piston move?.
What is the travel?.
Is the connection direct, or via a worm?. If the former, does the motor have to _hold_ the piston in position, when not moving it.
How often is it going to have to move in the time?.
How big can the unit be?.
Is there any detection of the 'end point' of the travel, and/or would detection of position be needed, or could the movement be 'open loop'?.

One possibility slightly 'off the cuff', for example, is to consider using the core of a RC servo. The small high quality examples of these, contain tiny ballrace motors, of quality 'unmatched' for the price. They draw little power when not moving, and expect feedback from a pot contained in the unit. You could (for example), dismantle such a unit, connect the motor to the piston, with a worm drive, replace the pot, with a linear example attached to the piston, and then just control this with a pulse train from the PIC (hundreds of code examples for this here). 90% of the work would already be done for you. You could use a FET, to turn off the whole assembly, when not moving, if physical 'locking' of position was not required.
Similarly, but rather more expensive, there are off the shelf motor assemblies, designed to drive syringes, used in drug delivery systems on the market. Many are available as complete assemblies, but generally only in largish order quantities....
Small cheap motors in smaller quantities, are things like the ARSAPE AM1020. Only 6mm*9mm, with a lead screw attached, from FutureBot.

It is worth being aware of just how expensive motors can become, if you start to specify super high reliability, and environmental range. I have some only slightly larger bipolar 4 phase motors here, used as part of a 'critical' optical assembly, in a laser system, which cost over 500$ each, before the gearbox, and control is added...

Best Wishes
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sun Jan 03, 2010 4:12 pm     Reply with quote

I guess, that friction forces are higher than 10 g? Also some kind of transmission, e.g a crankshaft or screw
spindle is needed. You should have a rough idea of the required motor torque and speed, also if it can work
without an additional gear. For low torque and low up to medium speed, a stepper motor is the most easy solution
besides a simple brushed DC.
Loomix
Guest







PostPosted: Mon Jan 04, 2010 3:37 am     Reply with quote

Quote:
I guess, that friction forces are higher than 10 g?

Yes, this is typing error. It's around 100 g.

Quote:
Voltages available?. Only 5v, or are other supplies available?.
The device will be connected to 12V@700mA rechargeable battery but i was not planing to use more then 5V.

Quote:
How fast need the piston move?.

This is the tricky part. The piston move depends on few other factors but main movement could be described like this:

Time to the upper end - 1 second
Holding the piston in upper state - 2 second
Pull it down - 1 second

The final movement will be set after tests and it can be something like this:

Time to the upper end - 1 second
Holding the piston in upper state - 1 second
Pull it down - 1 second
or
Time to the upper end - 0.5 second
Holding the piston in upper state - 0 second
Pull it down - 0.5 second

Quote:
What is the travel?.

The whole length of "piston cylinder" is 7 cm.
The piston travel will be cca 1.5 - 2 cm but it can be even smaller

Quote:
How often is it going to have to move in the time?

It will run continuously for cca 12 hours.

Quote:
How big can the unit be?.

This is not major issue. I was thinking something in range 13 cm high and 7-10 cm wide.

Quote:
Is there any detection of the 'end point'

I will set detection point in the second prototype but this one has no end point detection.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group