Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

DC Motor Velocity Control

Status
Not open for further replies.

yasser_shoukry

Full Member level 4
Joined
May 31, 2006
Messages
233
Helped
25
Reputation
54
Reaction score
5
Trophy points
1,298
Location
Cairo - Egypt
Activity points
2,749
dc motor velocity

I have a DC motor with a shaft encoder, this shaft encoder has three wires. It works as follow (as the one i bought the motor from him) the first wire is ground , the other two wires sends pulses one for the speed and the other for the direction.

I want to use PIC18F to control the velocity of this motor (closed loop control with a sw PID) can any one give me steps for doing so ?

Thanks is advance.
 

budhy

Advanced Member level 3
Joined
Oct 21, 2006
Messages
828
Helped
218
Reputation
436
Reaction score
31
Trophy points
1,308
Location
Indonesia
Activity points
5,265
1. Use PWM to control the voltage feed to DC motor, and the DC motor speed is controlled.
2. Monitor the shaft encoder output as an error signal for PID routine.
 

yasser_shoukry

Full Member level 4
Joined
May 31, 2006
Messages
233
Helped
25
Reputation
54
Reaction score
5
Trophy points
1,298
Location
Cairo - Egypt
Activity points
2,749
budhy said:
1. Use PWM to control the voltage feed to DC motor, and the DC motor speed is controlled.
2. Monitor the shaft encoder output as an error signal for PID routine.

Thanks buhdy, but this is what i know, i want to know some more sophisticated info as how to monitor the shaft encoder pulses, schematics, codes and so on.
any how thanks for your reply.
 

ashad

Full Member level 6
Joined
Mar 28, 2006
Messages
394
Helped
40
Reputation
80
Reaction score
27
Trophy points
1,308
Location
Trento, Italy
Activity points
3,298
hi

for PID routine u need the current rpm of motor and set rpm

2_1166369793.JPG


by using the above circuit u can monitor the input rpm by using ADC and out set point change by DAC

for any qurey feel free to request help
 

yasser_shoukry

Full Member level 4
Joined
May 31, 2006
Messages
233
Helped
25
Reputation
54
Reaction score
5
Trophy points
1,298
Location
Cairo - Egypt
Activity points
2,749
Thanks ashad but according to this sechmatic, the dc motor is connected to the output of LM324 which can not supply enough current to the Motor especially at when the motor is stalled (In my case stall current is about 10 Amps)
 

ashad

Full Member level 6
Joined
Mar 28, 2006
Messages
394
Helped
40
Reputation
80
Reaction score
27
Trophy points
1,308
Location
Trento, Italy
Activity points
3,298
yasser_shoukry said:
Thanks ashad but according to this sechmatic, the dc motor is connected to the output of LM324 which can not supply enough current to the Motor especially at when the motor is stalled (In my case stall current is about 10 Amps)

the DC motor is connected to the power transistor and the poer transistor is drive form the Analog output of the DC in between there is small current amplifier is also required to drive the power transistor
 

budhy

Advanced Member level 3
Joined
Oct 21, 2006
Messages
828
Helped
218
Reputation
436
Reaction score
31
Trophy points
1,308
Location
Indonesia
Activity points
5,265
ashad wrote:
the DC motor is connected to the power transistor and the poer transistor is drive form the Analog output of the DC in between there is small current amplifier is also required to drive the power transistor
This linear approach is very un-efficient for 10 Amp DC load!

yasser_shoukry, continue with your PWM control idea. PIC18F has Internal PWM module can be used directly.
Refer to [PDF] Tips ‘n Tricks Power Supply Intelligent Design
 

AndaMan

Junior Member level 3
Joined
Apr 12, 2004
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
235
Microchip have lots of literature related to DC servo motor control you can search from their site.
I recoomend app-note # an532,an696,an718,an893,an894,an896,an899.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top