pid dc motor controller using 8051 uc

Posted on 2006-06-10
Last Modified: 2008-01-09
       i have been trying toi design a PID dc motor controller using 8051 uc in is essential to use 8051 and a pic cannot be used.can anyone help me in this regard.

Question by:mack123
  • 3
  • 2
LVL 16

Expert Comment

ID: 16880299
Hi mack123,

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


Author Comment

ID: 16881468
         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
LVL 16

Expert Comment

ID: 16881482
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.


Author Comment

ID: 16887845
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.
LVL 16

Accepted Solution

PaulCaswell earned 195 total points
ID: 16889711
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'. :-)


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Note: This is the second blog post in a series on email clearinghouses (   Every month t…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now