Hi every one I suppose to control speed of DC Motor using LPC1768(MOTOR CONTROL PWM). is it feasible to implement a digital PID controller using 1768? or i must use a more advanced micro controller. if YES, can you help me with writhing the codes? how can i implement a PID with c codes? Do you have sample codes for initial setup for Motor Control PWM?
thanks
The 1768 is more than enough capable to get people to writhe when writing their code.
Have you spent any time reading up on the capabilities of the processor? Or how a PID algorithm works? Remember that you can also simulate PID code on a PC - the algorithm doesn't care about actual hardware for controlling the output.
How do you kids get assigned these projects without the first clue about how to do it, or do your own basic research?
They sleep half the time during their school sessions. Then they finally notices that they are expected to do different assignments to pass the course. Then they get really exited about the existence of Internet, hoping for a quick fix for their fix.
Hopefully, most schools don't just hand out this kind of assignments, but also have written tests on-site, with zero Internet access.
another question: I can't find QEIPOS & QEIVEL registers in MCPWM register list. Does QEIPOS or QEITIME registers works in MCPWM section as it works in QEI sections? if not, how can i capture position? is it practical to setup QEI & PWM together in order to use QEIPOS, QEITIME or QEIVEL registers? thanks
Thanks Dear Dhaval I have worked with QEI peripheral before. and i am more comfortable with registers than CMSIS library. i had a brief review of MCPWM part in LPC1768 datasheet. but i think that part of datasheet isn't as good as i thought!!
i decided to learn it using sample codes but unfortunately most of the codes have been written using CMSIS library.
as i learnt, MCPWM consists of PWM + QEI, but it is not easy to calculate position without using interrupt(or i don't know how to do it!!)
i want to implement a digital pid controller that drives the motor at constant velocity. i know that my controller should fetch the qei velocity every time period and generate appropriate voltage(in pwm form). and i think it is easier to use PWM+QEI instead of MCPWM.
but i don't know what's the effect of PID calculation's time waste during interrupt, on pid accuracy?(i want to refresh pid calculation every 50us and clock frequency of 1768 is 100 MHz) is it feasible to earn 50us refresh time? how much clock pulses were spent in a simple (without extra codes) interrupt?
Dhaval,
while your statements may very well be correct, let's forget the 'blame game', but is it reasonable to 'help' these individuals get a diploma reading 'engineering' when it relly should read 'copying'.
the result of such 'helping' is that such a 'school' can adverise an 82% graduation rate when only 5% of the graduates are able to make 'blinky' run.
Erik