Monday, 29 November 2010

...and get over it!

Today's exercise (well, yesterday evening's anyhow) was mounting the L6203 MOSFET H-bridge chip onto a breadboard friendly form.

Why is the chip mounted on the copper side, at some odd angle? As w0z says, "hardware will cut you"... and of course I didn't check the chip's lead spacing - the chip's pins are not on a 0.1" spacing - so it doesn't "fit" in the veroboard. Turns out that at 45 degrees, the pins line up with the veroboard strips. Not the holes, but at least the strips. Woot!

So this board has all the components required to get the H-bridge to work. There's a 0.22 ohm resistor for sensing the motor current. This will go back to the PIC for monitoring.
The pins on the bottom are GND, Enable, In1, In2, Motor-, Motor+, Vsupply and Vsense. This will now plug straight into the breadboard for wiring up to the rest of the circuit.

And it works. Next, some programming required...

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


Friday, 22 October 2010

So then I decided to buid a CNC machine...

I don't know what gets into me sometimes, but I just get the urge to just BUILD something.
This happens from time to time, and mostly... I never quite completely finish what I start.

I was doing my ELE1502 assignment the other day, drawing up the schematic in Eagle. Just for kicks, I exported the schematic to the PCB editor - within a few minutes, I had a PCB layout on the screen. Nice. "I wished I had an easy way to actually make the board...", I thought to myself.
"...and a computer controlled drill setup to drill it out.", the other half of my brain replied.
A quick google around and... next thing I know, I'm looking at how-tos and youtube videos of building your own CNC machine, and harvesting lasers powerful enough to burn stuff from DVD writers. Yep, that's cool. I want. But I don't want to spend anything to do it. Typical me.

So, let's look at what's lying around the garage:
  • about 6 metres of 25mm square section aluminium left over from the projector screen project. It's got a 3mm lip about 16mm down one side.  The material stacks and slides nicely on each other, and the lip positioned in the right spot stops it moving sideways... hmm, this might just work.
  • A few 2 and 3 way plastic corner joiners for the aluminium. Nice and easy. Hopefully strong enough.
  • about a metre of 50mm x 25mm L section aluminium. Note sure where this will be used yet.
  • a length of 10mm threaded rod.
  • a Deskjet 400 inkjet printer. Now disassembled, and the stepper motor recovered from it. I'm not sure this is going to be strong enough, but might be OK to use to see if some ideas are practical before acquiring larger ones.
  • various nuts, bolts, junked electronic stuff, plumbing fittings.
So now it's thinking time. Got to work out how this is all going to fit together.

Tuesday, 20 July 2010

Day 1: Almost total disaster

So yesterday (Monday) was my first day as stay-at-home dad / full-time uni student. What a mess!

Seems I had caught the same bug that my daughter had on Saturday night, so I was up just about every hour Sunday night with projectile explosions from both ends of my body. Ugh. Vomiting HURTS!

Monday morning, not feeling much better, but at least I don't feel like my stomach is trying to escape via my mouth. The doorbell rings at 8:40's the postie with my study materials from USQ, and I reflect on what "just-in-time delivery" really means.

The wife seems to have avoiding coming down with the bug, so she has packed the kids off to daycare, and gone off to work. Thanks. It would have taken a huge effort on my behalf to do that.

OK then, time to do some Uni stuff... though I really don't feel like it.

The study materials are just printed copies of the same PDF files I had downloaded from the uni's website, so not much in the way of new information I hadn't glanced at before. The real question is where to begin? Couldn't they have just given me a single page for each subject that says "this week, read these chapters"? Apparently not. Welcome to "self-directed learning".

OK, time to start "self-directing" (aka pick one of the four subjects at random to start on)

Sunday, 28 March 2010

Scsi stuff to give away

Two wide scsi drives 9.1 GB.
One is an IBM ultrastar model DDYS-T09170. The other a quantum TD91W011

Two removable drive cages to suit the above drives. Presumably, they're hot swappable??

One Tekram DC-390F wide scsi PCI adapter and two 68 pin scsi cables. One has 3 male plugs and is about 1m long. The other has 8 male plugs and is about 2m long.

All these were working together when pulled from the box they were in some time ago.

Friday, 26 March 2010

Little pink car

The car is done!
This was salvaged from the side of the road (can't resist council cleanup day) in really good condition. It just needed a new 6v battery. But that's too easy.

I've got a 12v battery sitting around, so let's have a stab at converting it to 12v.

First off we'll need to run the motor at 6v. So using this motor speed control kit we'll take care of that, and get soft start and speed control in the deal. Next -hacking the existing control board.

Basically that's just a bunch of switches and a pair of relays for reversing the current on the motor for forward and reverse, but the relays are 6v coils - can't run those at 12. I'll add in a 7806 to run all the 6v stuff.

To conserve the battery I don't want the motor speed controller running all the time, just when the accelerator is pushed. ONE of the two direction relays operate when that is pushed so I'll just OR those together to operate a large automotive horn relay. That should handle at least 20 amps.

So this is new - I've actually documented what I did, so when it breaks, I won't have to trace it all out again!

Here's the circuits stuffed back into the back of the car. At least the large automotive relay (K1) is screwed down. I should have put the speed controller nearer to the back - the adjustment pot is under the seat and I'll have to pull it all back out again to adjust it. D4, C2 and IC1 are foreground right, hanging precariously off the original control board.

Wednesday, 24 March 2010

Perhaps I should clean up first

This one is for you Peter; this is where the magic happens.
The thermometer on the wall says it's a nice 30 degrees Centigrade at 7:55 pm. Hmm, balmy.