Continue to Site

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 PID speed controller via microC or CCS and its proteus simulink pic18f4550

Status
Not open for further replies.

sefirnecati

Newbie level 2
Joined
May 7, 2015
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
15
hello my friends
im trying to do pid speed controlling a dc motor with using PWM.
And
i could find this
View attachment PID.rar

However i am taking lots of error in CCS when i try to compile it.
and i couldnt make proteus simulink. can anyone guide me?

i the beginning only P or PI controller will be enought for me.

(i know a little MicroC but im not good at CCS)
 

Hello sefirnecati. I saw your source code errors (file PID.err included in your upload) and also your code file. All those errors are because you are trying to use variables (maybe of type float) that are not declarated anywhere. I don't know too much about PID controllers but I will suggest you to avoid using floats because they are too expensive in processing resources like CPU cycles and RAM memory. Try to search at Microchip's website, they have a lot of information regarding this topic and many others too. Also CCS has help containing the built-in functions to control the CCP (PWM) peripheral.

Best regards, Yosmany325.

See at these application notes to have a better idea of how to do that

Application Note AN532: Servo Control of a DC Brush Motor
https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en010998

AN893: Low-Cost Bidirectional Brushed DC Motor Control Using the PIC16F684
https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en012134

More information related to motor control
**broken link removed**

Information related to PID control
**broken link removed**


Hope this help you.
 
Last edited:
Hello sefirnecati. I saw your source code errors (file PID.err included in your upload) and also your code file. All those errors are because you are trying to use variables (maybe of type float) that are not declarated anywhere. I don't know too much about PID controllers but I will suggest you to avoid using floats because they are too expensive in processing resources like CPU cycles and RAM memory. Try to search at Microchip's website, they have a lot of information regarding this topic and many others too. Also CCS has help containing the built-in functions to control the CCP (PWM) peripheral.

Best regards, Yosmany325.

See at these application notes to have a better idea of how to do that

Application Note AN532: Servo Control of a DC Brush Motor
https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en010998

AN893: Low-Cost Bidirectional Brushed DC Motor Control Using the PIC16F684
https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en012134

More information related to motor control
**broken link removed**

Information related to PID control
**broken link removed**


Hope this help you.

thanks for help. i read many times microchip datasheet. and i can control speed of dc motor without using PID, with using MicroC. But i couldnt find (or see) PID library on MicroC. there are some examples in CCS so im trying to use this language. its forcing me.

In addition i need circuit of system in proteus. i used
a dc motor with encoder (to take pulse of speed)
pic4550 and adds
a npn transistor.
Are they enought or should i add some components?

Thank you in advice
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top