Tuesday, July 18, 2006


Controlling speed, direction and position of a brushed DC motor...

I finally cracked using timer 2 on the PIC16F628A chip in interrupt mode. That means that I will be able not only to keep track of where a positioning stage is but also the direction in which it moves and rate at which it moves.

While I was originally going to calculate the rate via the supervisory comms software in the PC, cracking the problem of using timer 2 in interrupt mode lets me do all that in the PIC chip and also to do it at a much, much finer resolution than would have been possible in the PC.

It's a good thing that the diodes for the Frankenmotors are due in in the morning because with the G4 gearmotor one has to use quite long sampling periods to get a good idea of the rotational rate. I suspect that the AS5040 encoder with 4096 resolution is going to be very handy in that regard with very slow gear motors like the G4.

It is going to be interesting to see if the PIC16F628A has enough memory to allow for sophisticated approaches to DC motor control. I'm not terribly worried about that though because I have the PIC16F877A as a back up with 4 times the memory. :-)

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to
Posts [Atom]