• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3584
  • Last Modified:

pid dc motor controller using 8051 uc

hi
       i have been trying toi design a PID dc motor controller using 8051 uc in assembly.it is essential to use 8051 and a pic cannot be used.can anyone help me in this regard.

                                               thanx
0
mack123
Asked:
mack123
  • 3
  • 2
1 Solution
 
PaulCaswellCommented:
Hi mack123,

Post what you've got so far and tell us what does or doesnt work.

Paul
0
 
mack123Author Commented:
hi
         ok here goes.i m not using any timers or interupts.the two inputs from the shaft encoder of the motor are input to two pins.i m using polling and detecting the direction of the motion by usin the pulses from the shaft encoder.
     this much work fine but now the problems start.i cant implement a proper pwm algorithm.the motor just overshoots the required position .
   i tried doing it without pwm and it worked fine  but then i dont have anything to implement pid on.
 another problem  i facing is that as 8051 is a 8-bit microcontroller wat to do when my position couter exceeds
FFh.
0
 
PaulCaswellCommented:
I'm not familliar with PWM. Could you describe it for us.

Handling multi-byte numbers is quite easy. Each time you add to your counter, if the carry if set after the add, increment a second byte.

Paul
0
 
mack123Author Commented:
pwm-pulse width modulation
pulses are given to the motor and by tracking its position usin g the shaft encoder pwm is varied in such so that the motor turns and stops at a required position.
   i have to implement position control.
0
 
PaulCaswellCommented:
Ah! Got it!

You are using the inputs to detect the direction of spin. Have you managed to measure the time between the two pulses? That sounds like a good step to take. After all, then we'd have two of the three letters of the acronym, the 'pulse width'. :-)

Paul
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now