Friday, July 27, 2007

Back in the Shop

Since it's the shop that let me buy my kites, it's the shop I'm turning back to now while the kites are still in the mail. I've sorted through my ongoing project list, and picked two of them to really hammer on:

The first is a spindle tachometer. The need's easy to demonstrate. This question shows up on the online forums all the time: how to tell how fast my spindle is going? There are a number of approaches to sensing, but what's needed at the other end is a numeric display of some sort. This implies either LEDs or an LCD. For readability, the bigger the better (within reason!)

So I took a look at the AVR Butterfly, which has a pretty big segmented LCD. Six characters, so it'd be good to several tens of thousands of RPMs. And the Butterfly has an ATmega169 onboard running at 8MHz (with the right fuse settings) so it's got plenty of horsepower. Only problem is all the I/O pins that can act as clock sources for the onboard counters are all tied up with the LCD. ARGH! And INT0 and INT1 pins are tied up, too. Which leaves the normal pin change interrupt routines, which are slower. But at 8MHz the 169 can easily keep up with a spindle rotating at up to 30kRPM.

Rather it could keep up with a spindle sending out 30k pulses per minute, which is different. For sensing I'm going to document three approaches: One uses an optical interrupter to read holes in a plate. My mill has a single index hole, my lathe has a 60-hole indexing plate for doing live tooling index jobs. So the number of pulses/rev would have to be user-settable. The second method is to use an optical reflector reading black and white stripes off a pattern that's copied or laser printed and affixed to the end of the spindle pulley. The third is to drill and embed a neodymium magnet into the pulley and read it with a Hall-effect switch. (Surely among these three the interested reader could find one they'd feel comfortable with! The article would then give instructions for downloading the Butterfly's source off of AVRfreaks or Sourceforge.


The second article would be a much longer and much more thought out version of my toolbar article for the mill-as-lathe. The difference is I'd also go ahead and include all the stuff for using the mill as a lathe, multiple tools, switching coordinate systems to pick up offsets, etc. This would hopefully be useful to someone with a CNC mill but not a CNC lathe (like me!) and also force me to start using multiple tool settings. In the process of writing the article I know I'll stumble a lot, so with any luck the final article will point out some of the more likely pitfalls and try to save the reader from running into them full-tilt (like I'm sure to do.)

This means I'll have to finish my second toolbar, drill the cross-holes so either one could be mounted vertically or horizontally, and add the holes in the second bar to take drill bits (or make bolt-on units in place of the tool caps.) In the end I'll have what'll probably wind up being a multi-issue article (my first!) and a full-blown twelve-tool plus six drill position toolchanger for my CNC face lathe.

I just hope it doesn't take three years to get this stuff published this time... Need more kites...

Tom

No comments: