Thursday, September 9, 2010

Progress



I haven't posted nearly as often as I planned to, but I have been working on it. I'll probably describe what I figured on design, and problems when I get time. So far I've solved the motor to shaft transfer problem, by modifying someone else's solution, which is probably stronger than theirs, as well as some support problems, which are nearly solved (I ran out of screws before I finished the full x/y assembly today.)

Have a picture of the x/y assembly! It is upside down, and the rails aren't attached yet. You can see some of the odd things I've used, such as the mini clamps to secure the motors, and the vinyl motor to shaft connectors. The block in the lower left was just sitting there to hold the rail down, because the concrete was uneven. The limit switches are in their brackets (easily removable), but I have to adjust the brackets some: the ones in the x/upper, but lower in the picture are too tall, given a mistake I made, so I have to cut the tops off, or grind the top hole out in the L-bracket. (It's just a *tiny* bit too small as it came.) You can also see most of that in the little picture up at the right.

Positioning-

For Stepper motor controlled axis, you need to have some sort of sensor to tell when you've gone too far, and to figure out where you are.

There two options that seem somewhat practical, there are also some solutions like laser positioning, which seems expensive, complicated and impractical:
1) Rotary encoders, which don't completely show you where you are (I don't think), but they also let you know if you didn't step, because the motor stalled. (A possibility which can burn out chips.) These generally are used on conventional motors, not steppers, but can be to make sure that it steps on better equipment.

2) Limit switches, which tell you where the limits of motion are, and combined with a stepper, assuming it doesn't stall should tell you the position. Also much cheaper. Ideally, these should have very little resistance.

I opted for Limit switches, though mine don't have quite the limited resistance that one would like. My solution was probably a bit unconventional, but what's new. It's probably what you get when you have someone with no formal training in any circuitry, woodworking, machining, and little formal programming training. In fact, this whole project has that fun of learning while I go. (That fun can also be very frustrating.) To calibrate exactly where one is, it has the problem of having to go to the edge to set the position. I plan on storing the position when it's turned off into the eeprom.

My solution was to take some L-brackets (Basically pieces of metal bent into 90 degrees, with 4 holes for screws.) and then put some momentary switches from radioshack into it. Unfortunately, the holes in the L-brackets were just a bit too small. Well, that was solved via an application of remel grinding them out a bit. It's not absolutely perfect, as due to my mistake on the x-axis of putting the middle bit upside down, the 1-1/2 inch ones are just a bit too tall, so I'm going to have to cut them down, or Dremel out and use the top hole on the perpendicular unscrewed part. Cutting it will be easier, so that's what I'll do. This may not be the best solution, as the switch may not trigger at the same place every time, due to more resistance than others. Also, it might be better to go with normally closed switches instead of the normally open ones I got, so that it will cut out if a connection is broken, or anything else fails.

Thursday, September 2, 2010

Side project: LED array

This is a minor side project I decided to build with the help of my niece and nephew, to show them something nifty. Motors that aren't that fast, aren't that interesting to them, on the other hand, lights are. Have a video:



This is the Duemilanove hooked up to a breadboard, on pins 1-5, and 8-13 to form a 2x5 array of LEDs, each LED is connected to ground via a 1k resistor to limit the current to about 5 mA so as to not burn the LEDs out. The reason the one in the upper left comes on is that I hit the reset in the middle of it (which is too dark to see). The software I wrote is potentially more general purpose than that, however, it is unfortunate that the Duemilanove has at most 19 (14 digital + 5 analog) that can be used for directly driving the LEDs, so at best if you want an even array, you could get a 4x4 array, or a 3x5 array, using this technique. (And I ran out of loose 1k resistors) I designed an i2c controlled 4x8 using eagle, as I finally figured out most of it. Unfortunately, to get it made it'd cost at least $20 for the chips and PCB. Maybe once the main project of a CnC machine is done it'll have enough resolution to accurately cut PCBs. (It should have a *theoretical* X and Y resolution of 8 micrometers, and a Z of 33 micrometers. I don't think it'll be quite that precise, on the first one, due to the construction method.)

After doing that, I noticed a new thing at Adafruit, the 'LoL Shield' which is an LED array using something I was unaware of until today of Charlieplexing, using multiple inputs and the fact that LEDs are diodes to drive the array. Pretty cool hack, and it seems very similar to what my library uses for animation (and let's face it, what anyone would use). I've got a whole bunch of LEDs I got cheaply off ebay, so if I can get just a PCB, it'd be cool, and I'd probably have the only amber one. Direct link to the maker's commentary on design: Part 1 and Part 2. Always seems to be the case that you find someone has done something a lot cooler after you make something.