Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

dsPIC30F for motor operation: PID controller

Status
Not open for further replies.

faysal_002299

New Member
Dear All,
I am using dsPIC30F3011 for controlling 3 sensored BLDC motors. For running the motors, I am using BLDC motor drivers. My MCU in this case has to just input 3 things to these motor drivers- (1) PWM signal of certain dutycycle (2) The CW/CCW direction (3) The Start/Stop instruction. I can also extract the current speed information of the motors from the pwm signal served by the BLDC drivers.

In my system, I have to change the speed and direction of the motors very frequently: My MCU can do that easily by setting the PDC value of pwm input signal (to the bldc driver) from 0-1000, where at PDC=0 the motor comes to a stand still. The problem is, the transition time to change in speed is much higher.

For exaple, say now the motor is running at a speed corresponding to PDC = 500. Then if I change it as PDC = 0 (or any higher or lower value), the motor speed start decreasing and the total transition time taken for the speed to become 500 to 0 is quite high. Please tell me, if I want the motor to come to its new speed value instantly (ASAP) what should I do? Please keep in mind all the operations in my case here are done through the bldc drivers and I have very little things to do from my MCU (as far as I know).

Will using PID controller help in this case? How can I implement PID here?

waiting eagerly to hear from you.
 
You need to implement dynamic braking with your BLDC drivers. No one can tell you how to do this because no one knows which BLDC drivers you are using. It may even not be possible with the BLDCs you have.
 
Ya I can use dynamic braking. In my driver I have a braking option and it works fine. The problem is when I resume the motor after braking there is a huge vibration before the motor restarts with it's previous speed.
 
you need to ramp up. BLDCs are synchronous motors and if you are running open loop they will do that. in closed loop the controller uses the feedback to determine when to change the outputs.

however it sounds like you have a controller that does that for you. in this case you need to ramp op the command. it should not be changing faster than the system can respond.

Dan
 
Last edited:
He meant "ramp up" which means increase the PWM slowly when starting the motor from a stopped state. By slowly I mean no faster than the motor can accelerate.
 
He meant "ramp up" which means increase the PWM slowly when starting the motor from a stopped state. By slowly I mean no faster than the motor can accelerate.

I've already tried that. Even though I set the speed as 0 before resuming the motor, the motor gives a big shake just after removing the brake. Apart from that, as I have said earlier, the transition time to reach the speed 0 from any higher value is much higher in this case. So, though I set the speed as zero, if I resume the motor within a very short time, there is still some motion remaining in the motor and it starts rotating.

Please tell me, do I have any way to use PID controller here for lessening the transition time- how can I implement that? Or any kind of suggestions will be appreciated


Thanks a lot for all the supports
 
Are there stability/calibration controls already on the drive that arent set?. Often theres a calibration proceedure that must be followed. Does it have a load compensation setting thats way out ?.
 
Are there stability/calibration controls already on the drive that arent set?. Often theres a calibration proceedure that must be followed. Does it have a load compensation setting thats way out?

I don't what you are talking about. There is nothing said about any kind of calibration in the datasheet. Actually the datasheet has no information in detail.

I have attached the datasheet. It's written in Korean but you will get some necessary information from this. It's just a 5/6 pages datasheet, please take a look at it.

Thanks for the support
 

Attachments

  • TM_TECH_BLDC_DRIVER(400W~3KW).doc
    160.5 KB · Views: 739
Last edited:
Well, there are 4 preset pots, do you know what they are for?. I cant tell from the data sheet. From the oscillation you describe, from my experience, sounds exactly like load compensation is way out (if the drive has that feature). Have you tried adjusting the preset pots?.
 
I see in the application note for your driver that they show a 10K POT (Speed Volume 10K ohm) as the control for setting motor speed. You say you are using PWM. Do you have a Low Pass Filter on the output of your PIC's PWM pin?
 
Do you have a Low Pass Filter on the output of your PIC's PWM pin
Yes, Please take a look at the attached picture; This is the dsPIC circuitry I am using:
I am using this dsPIC for 3 motors and I've named them as X, Z1, Z2
**broken link removed**

And the Jumper connection I am using (from dsPIC to Motor driver) is like this: **broken link removed**


Further information:
**broken link removed**
a. I am giving this input PWM (from dsPIC) in the PIN2 of CN3 (white) in my driver
b. 1/0 signal to PIN5-CN3 of the Motor driver for motor ON/OFF
c. 1/0 signal to PIN4-CN3 of the Motor driver for motor direction (CW/CCW)
 
Last edited:
May be the image is not coming. Please take a look at it again:
**broken link removed**

I am using this dsPIC for 3 motors and I've named them as X, Z1, Z2


In case, it doesn't come again please follow the link: **broken link removed**
 
Last edited:
That link doesnt work.

kchriste is asking if your speed input PWM is smoothed to DC with a filter. Low PWM frequencies may pulse the motor.

I yahoo translated part of the manual (this is a laugh, make of it what you can ;-). It seems there is an acceleration setting pot (VR3), and either a current limit or IR comp pot (VR1), you should try and adjust these too. VR4 looks like a feedback setting of some sort that may affect stability.

CN1 AC inputs CONNECTOR CN2 CONNECTOR where is connected with MOTOR CN3 CONNECTOR where I/O is connected VR1 With electric current restrictive variable resistance the CCW direction becomes SETTING with 200% of orthodox electric current, Is and according to use use turns the possibility of raising an electric current price is but MOTOR and DRIVER the increase which is excessive the small hand the possibility of doing is the user getting a manufacture resignation technical inquiry, wishes with CW directions and VR2 To turn with CW directions with MOTOR maximum RPM sets and RPM to increase, CCW Turns with a direction and RPM decreases SETTING with correct rules RPM of the factory shipping at the time of MOTOR which becomes, being shipped, VR3 This DRIVER MOTOR RPM rate control volume the outside and speed inside The variable the possibility of doing in order to be at control volume, is planned and VR3 CCW direction decreases at internal rate control volume and CW directions increase. This time, the external volume use at the time of JP1 must change JP1 and JP2 JUMPER from the dignity layout sketch and JP2 1 time and time 2 JUMPER, internal volume use at the time of JP1 and JP2 2 times and 3 times JUMPER year. VR4 CW directions adding and subtracting inside do shortly with MOTOR adding and subtracting inside controls, CCW direction In order to be regulated an adding and subtracting inside long, is planned
 
Ok please take a look at this picture:

This is the dsPIC circuitry I am using [I am using this dsPIC for 3 motors and I've named them as X, Z1, Z2] :

**broken link removed**


I am trying to find out the meaning of the datasheet in the VR1, VR2, VR3 section taking help from one of my korean friends. And let you know.

Thanks for being so helpful
 
Thanks a lot bro.

At last I am relieved from a long term pain. It works- after consulting with a korean friend I could solve this. It's the VR4. Turning it to CCW means the increase in acceleration/decceleration of the motor.

thanks again and again
 
May be the image is not coming. Please take a look at it again:
**broken link removed**

I am using this dsPIC for 3 motors and I've named them as X, Z1, Z2

In case, it doesn't come again please follow the link: **broken link removed**

The link does not work.
This looks to me to be a standard drive that uses pwm to the motor to control speed and torque. The speed control looks to be a pot between pins 1-2-3, a standard type of dc speed control, similar to the AB and Fanuc drives in machines I work with. The specs should list info to calculate stopping time and time between switching directions, you also need to ramp down and stop before changing directions or you will get the problem you were having (humming and bucking).
I am no expert but I work with these in 5 and 6 axis machines daily.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top