August 2010 Archives

Motor Controller. Overkill.

| No TrackBacks
Every summer my nephew attends "Camp Grandma and Grandpa" for a week. Or two, this year. For the last several years I've been going up at the same time. He's 10. We build things.

He's been fascinated by the linear motors that appear on Mythbusters periodically and this year got a linear motor proxy. It's actually a regular DC motor with a screw drive assembly that moves a carriage forward or backward, depending on polarity. It's pretty neat, but unfortunately it needs some help to go automatically in a back-and-forth motion.

He'll take care of building a new metal superstructure to hold the carriage and limit switches, but I developed a possibly somewhat over-engineered solution for reversing the motor when it hits the end of the carriage:

DSC_0004.jpg
That's a Microchip PIC10F206 programmable microcontroller. And 7805 power regulator, a couple pull-up resistors, a 1N4148 diode, a 0.1 μF capacitor, and a relay.

There's also a power switch, a reverse button, and two limit switches.

And an in-circuit programming connector so the microcontroller can be reprogrammed without having to remove it from the circuit board.

schematic.pngYea, I don't use Eagle CAD often enough for it to be faster to draw it on the computer... 

Granted the PIC10F206 is a very small microprocessor with 512 words of program memory and 24 bytes of RAM. But at $ 0.68 each in single quantities, it's really kind of neat how easy it is to just drop one of these in instead of dealing with a pile of logic and flip-flops to do the same sort of thing. And doing things like debouncing the switches and making sure the limit switch overrides the reverse button is a whole lot easier in software!

The back isn't as pretty...

back.jpg
Undergoing reprogramming:

programming.jpg

About this Archive

This page is an archive of entries from August 2010 listed from newest to oldest.

July 2010 is the previous archive.

September 2010 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Categories

Pages