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 CCS Technical Support

I need BLDC example

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



Joined: 16 May 2015
Posts: 18
Location: istanbul-turkey

View user's profile Send private message

I need BLDC example
PostPosted: Fri Jun 26, 2015 5:33 am     Reply with quote

hi guys ...
i just want simple small example about controlling brushless dc motor using 18F2431 ... i've been searching for three days without any result ,..
i need something easy to understand as a begining ,,,
Please help ...

Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19540

View user's profile Send private message

PostPosted: Fri Jun 26, 2015 8:08 am     Reply with quote

Unfortunately, BLDC, and 'easy to understand', don't really go together in a sentence. I have a couple of bits of BLDC code for the 4431, but it's over 2000 lines of code, and the core of it is very tightly coded to keep the timings 'right'. Not something to look at without several _years_ of PIC experience, and since it was for a customer I could only release very small bits...

In all honesty, an external BLDC control chip is much easier to work with. Only a few months after playing with BLDC directly from the PIC, I needed a system again, and decided to use the PIC for the actual control, but let someone else do the hard work of synthesising the BLDC waveforms. I used an Allegro A4960, with a PIC operating this, and it was something like 50* easier to get working. Hours of work, rather than weeks to get everything working right....
Even better (depending on how many of these you want), there are complete little boards around with all the FET work done ((even Microchip do one), which saves a lot of grief.
Or in fact things like radio control motor ESC's are cheaper than you could buy the parts for and ready to go, just needing an RC servo control signal from the PIC....
moha-affa



Joined: 16 May 2015
Posts: 18
Location: istanbul-turkey

View user's profile Send private message

PostPosted: Sat Jun 27, 2015 12:20 am     Reply with quote

Thank you for replying.
I will tell you what I need exactly and we will see how much i need.
I have a lot of oil pumps and their motors are good but their cards are crashed. Six transistors exist inside the body of pump.
I thought that i need some kind of controller to drive these transistors to make these motors work even if with fixed speed. Any way to make the motor works will be great. I know it will not be an easy work but a prototype will be enough and great.
Thank you again.
temtronic



Joined: 01 Jul 2010
Posts: 9244
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jun 27, 2015 4:51 am     Reply with quote

6 transistors.. sounds like a 3 phase motor,very common similar to 'stepper motors' used on floppy disc drives. You should post the motor name/model as well as the 'dead' controller cards (if possible).
As Mr. T. says there may be a quick, easy solution using a BLDC controller chip or module and using the PIC as the 'brains'.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19540

View user's profile Send private message

PostPosted: Sat Jun 27, 2015 5:35 am     Reply with quote

As a further comment, if there are only connections to the drive transistors, and not to the actual windings, then it is not BLDC.
I's suspect it is something like a synthesised AC synchronous motor.

On BLDC, the controller has to be able to sense the position of the rotor. There are two basic ways of doing this. Physical sensors, or reading the BEMF voltage on the each un-driven phase in turn. Since you don't mention sensors, a BLDC drive would need to be able to measure the voltages on the un-driven phases. If connections are not present for this, it is not BLDC.

Whatever the motor type, you need to start by knowing what signal voltages the drive transistors require, and what _frequency_ the motor supports.
moha-affa



Joined: 16 May 2015
Posts: 18
Location: istanbul-turkey

View user's profile Send private message

PostPosted: Mon Jun 29, 2015 12:35 am     Reply with quote

I couldn't know what exactly the motor model but i can tell you that the motor is used in power steering pump and this a photo
https://www.dropbox.com/s/hr480acvysa8zod/DSC_0099.JPG?dl=0

and this is the pic of the crashed card with the three sensor position.
These three sensors are placed on card in a way that will be beside the magnet in motor.
https://www.dropbox.com/s/6il2w0qgh4clhpp/DSC_0098.JPG?dl=0

Can i know MR.temtronic a name or model for BLDC controller chip to look for and how will i use it with my pic or what module should i use to implement it ?
Thank you very much guys ....
Ttelmah



Joined: 11 Mar 2010
Posts: 19540

View user's profile Send private message

PostPosted: Mon Jun 29, 2015 1:27 am     Reply with quote

There are two ways of driving BLDC motors. Sensorless control (this uses the BEMF on the winding to find the rotor position), and sensored control (this has typically hall effect sensors to know 'where' the rotor is.

The controller there is a sensored controller.

Now sensored control is more expensive, but gives higher starting torque. That the manufacturer has 'bothered' to include sensors, says these are needed for the application.

The sensors are part of the complete 'motor assembly'. In this case the assembly then goes on to include more of the controller, but these sensors are essential to get the motor working. They are actually 'part' of the motor....

For an external BLDC controller, you are going to need to start by having a board carrying three sensors in _exactly_ the positions of the existing sensors.

Then, you have a lot of things you need to find out. How many poles the motor has per revolution (from the magnets, looks like 6)?. What the inductance of the coils are?. What RPM the motor runs at?. What the supply voltage is?.

It then becomes possible to calculate what current has to be delivered to the windings, and what rate the signals have to update to give the required speed. There are then other things that can't be calculated without the final load present. How fast the motor can accelerate?. How much damping is needed in the control to avoid overshoot?. Now honestly the easiest way to find these out will be to use an off the shelf 'prototype' controller, which allows these to be adjusted, and run the motor up with a real load, then adjust these for reliable performance (and give some margin - remember the acceleration that can be done on a 'run in' motor and oil in a room temperature environment, will need to be very much slowed in a Arctic conditions).

Now there are dozens of 'off the shelf' control boards that would take the outputs from the magnetic sensors and feed the windings, and allow these factors to be adjusted/tested:

<http://www.ti.com/tool/drv8301-ls31-kit>
<https://www.infineon.com/cms/en/product/evaluation-boards/300W+Motor+Control+SSO8/productType.html?productType=db3a3044414ecd5c01415507da250c5c>
<http://www.st.com/web/catalog/tools/FM116/SC959/SS1674/PF89342>
<http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=dv164132> (with the BLDC add-on board).

You need to know all the factors for the drive (or at least the main ones covering voltage, current etc.), _before_ starting to design a PIC controller. It's a bit like saying 'I want a tyre for a car'. Until you know the weight of the car, how fast it can go, etc., there is no hope of selecting the right tyre type, or (in this case) of designing a controller....

To actually make a board to go in and replace the existing controller you also have the question of how this is controlled?. What signal does it receive to adjust the speed etc.. Actually making a board, then also involves some careful layout to deal with possible EMC problems.

This is a _significant_ project, not a 'simple' one.
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