Solved

pid dc motor controller using 8051 uc

Posted on 2006-06-10
5
3,570 Views
Last Modified: 2008-01-09
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
Comment
Question by:mack123
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

by:PaulCaswell
ID: 16880299
Hi mack123,

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

Paul
0
 

Author Comment

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

Expert Comment

by:PaulCaswell
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.

Paul
0
 

Author Comment

by:mack123
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.
0
 
LVL 16

Accepted Solution

by:
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'. :-)

Paul
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Facebook has became the #1 social media platform. People share many funny videos there, yet you don't know how to download them? Now you can download Videos from Facebook in just 3 simple steps.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

733 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