Jump to content
pjkim

ESI Project: Servo motor controller

Recommended Posts

I have been interested in making a servo motor controller. I wanted a microcontroller with a hardware quadrature encoder so when TI had a call for projects utilizing the Extended Scan Interface of the MSP430FR6989, I thought this might be a good fit.

 

Servo motors have several advantages over stepper motors including increased torque, lower power consumption, feedback control to eliminate missed steps. The problem is that servo motors are rather expensive compared to stepper motors. I obtained several surplus double-shafted, coreless DC motors with planetary gearboxes for $14. They turn easily with an old AA battery but can also be driven at 24V for increased speed and torque. I also purchased  slot photointerrupters to use as quadrature encoders.

 

I cut an encoder wheel from a tin can, drilled a hole in the middle and cut out two 90 degree wedges. The wheel was mounted on a short nylon bolt that had a 1/16" hole drilled down the center and clamped between two nuts that were rounded to provide clearance against the photo-interrupters.

post-3699-0-31163000-1410328435_thumb.jpg

 

The photo-interrupters were mounted 135 degrees from each other. To give a proper quadrate signal, the angle between the detectors needs to be an odd multiple of half the encoder disk wedge angle, i.e. n * 90/2 where n is an odd number. 45 degrees caused physical interference between the mounting lugs of the photo-interrupters so 135 degrees was chosen. This gives 8 pulses per rotation. I am not sure what the exact gear ratio is but somewhere around 80:1. This gives about 0.56 degree per step which is on the order of the gear backlash.

post-3699-0-53429400-1410328454_thumb.jpg

 

Here is a picture of the entire servo motor assembly.

post-3699-0-34224200-1410328472_thumb.jpg

 

Here is an oscilloscope trace of the quadrature signals.

post-3699-0-06911500-1410328506_thumb.jpg

 

Hopefully I can have the MSP430FR6989s driving the servo motors and doing something interesting soon.

 

Thanks once again to TI for sponsoring the contest.

Share this post


Link to post
Share on other sites

@@pjkim Nice DIY servo setup. I normally am lazy and just use an off the shelf one. Motor control teaches you alot.

How are you driving the motor - motor driver?

Yes, I am using a L298N dual H bridge motor driver.

 

From what I can gather from the datasheet, I can utilize the ESI to decode one quadrature encoder. I want to drive at least two axes so I can control X and Y. After sorting out the programming/ESI issues, I am planning to solder the MSP430FR6989 onto an LQFP100 adapter board so I can use two at a time. Something like

http://www.dx.com/p/multi-function-v116-lqfp-tqfp32-44-48-64-80-100pin-to-dip-adapter-boards-green-2-pcs-217452#.VBCv_UtqJ6E

 

Can't wait to try this out.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...