Thursday, 25 November 2010

Forward... AND reverse

Uni results are published tomorrow - looking forward to that, actually. It's going to be good news, just a question of how good. Hoping to totally ace the electronics subject. I'll be kicking myself if I don't get 100% in the exam!

On the CNC front, I think I've got it worked out in my mind how to put the aluminium frame together. I've purchased some 608 bearings ( it turned out that these are the same size as used in skateboards, so they're pretty cheap ). They have an 8mm ID, and 22mm OD - so they will fit nicely on the face of the frame (25.4mm). The 8mm threaded rod that I'm using for the leadscrew will rotate in the bearing, being driven by the motor.

On the topic of motors, I'm shying away from the stepper motor approach. There's a nice geared motor with encoder available that I think should give more torque, faster rotation and less vibration than a stepper. The question is, can a motor be controlled well enough to "step" a few encoder positions at a time? Time to experiment....

What to do with old mice...
Yes, that's an old "ball"-style mouse in the lower right, cut away with an ordinary DC motor from a printer attached to the optical encoder shaft. There's a 16F88 PIC microcontroller in the centre of the breadboard. Some logic gates on the right to decode the quadrature pulses from the mouse. Note the mouse has had it's brain punched out (ie, the chip removed) - the only electronics I'm using in there is the LED and phototransistors that make up the rotary encoder. Those are my NextGen business cards in a stack under the mouse to bring it up level with the motor shaft. I knew they would become useful eventually.

With this setup, I did some basic PWM experiments in controlling the motor. Reasonably successful. There's no full H-bridge here, just a single BD682 bipolar transistor driving the motor.... so it's forward only.

Convinced that this is the way to go, I ordered some parts from A PIC development board with a 16F628A, a L6203 mosfet H bridge, and a few other sundries. It's effectively the setup described in Microchip's servo application note AN696. Oooh, just found another - AN532. Both useful info on concrete implementations of a PID control loop. The gear finally arrived today (ordered 1st Nov). Futurlec are cheap, but you gotta have some patience. Probably better that they didn't arrive until after the semester was over anyway.
PIC16F628A development board and L6203 H-bridge


No comments: