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
Friday, July 27, 2007
Tuesday, July 24, 2007
Chewing Fingernails and Shifting Gears
Ok, so when I posted last I'd picked out the kites of choice, but hadn't been able to order. Now I've ordered, but won't have the kites for several days. Gnargh! Gotta stop chewing my fingernails and relax, I suppose. If it was only that easy...
After measuring the two kites I do have (both parafoils, both unstable in the air) I have a 2.0 and a 14.5 sq ft kite. The line I thought was #200 wasn't, so I picked up a thousand feet of #250 black dacron line and a new hoop winder. (I repaired my old hoop for the third time, and plan to put my old line back on it. It's good line! And now I've learned if I fall, not to land on the winder.)
The check for the article really was $240, so that left me with a little extra. Almost $40, to be exact. Which is just the price for four PeKaBe blocks. Yahoo!! I've been eyeballing PeKaBe blocks for my RC sailboat for years, and have been eyeballing them for KAP since I first started trying to design a real KAP rig. Every comment I've seen people write about the PeKaBe blocks has been positive. And since it's something that tends to be a buy once, I'm hoping it's $40 well-spent. The only real concern is something from http://arch.ced.berkeley.edu/kap/kaptoc.html regarding balance. The PeKaBe blocks are so friction-free, any imbalance in the rig really really shows up. So I'll probably be due for a re-balance, and it'll be time to finally strap on the permanent battery and retire the AA battery pack.
Taking some more advice from the KAP forum, I'm going to spend at least a couple of outings just learning to fly the Flowforms. The next step will be to hook up a 713g dummy weight 100' down-line from the kite, and fly it as if I have my KAP rig on there. Once I'm comfortable with the kites, and know their limits in the winds we get around here, then I'll hook up the KAP rig and get airborne again.
So I'm still chewing my fingernails, but at least I've changed gears. I started off chewing my fingernails because I couldn't get my kites to reliably lift my rig. Then I was chewing my fingernails because I knew what the fix was, but couldn't afford the new kites. Now I'm chewing my fingernails because I know the fix is sooooooo close, but not here yet. But at least now I know it's in sight. It'll happen. And I will eventually get airborne and be able to keep it that way.
Aaaaahhh...
Ok, time to write the next set of articles. This last one saved my butt!
Tom
After measuring the two kites I do have (both parafoils, both unstable in the air) I have a 2.0 and a 14.5 sq ft kite. The line I thought was #200 wasn't, so I picked up a thousand feet of #250 black dacron line and a new hoop winder. (I repaired my old hoop for the third time, and plan to put my old line back on it. It's good line! And now I've learned if I fall, not to land on the winder.)
The check for the article really was $240, so that left me with a little extra. Almost $40, to be exact. Which is just the price for four PeKaBe blocks. Yahoo!! I've been eyeballing PeKaBe blocks for my RC sailboat for years, and have been eyeballing them for KAP since I first started trying to design a real KAP rig. Every comment I've seen people write about the PeKaBe blocks has been positive. And since it's something that tends to be a buy once, I'm hoping it's $40 well-spent. The only real concern is something from http://arch.ced.berkeley.edu/kap/kaptoc.html regarding balance. The PeKaBe blocks are so friction-free, any imbalance in the rig really really shows up. So I'll probably be due for a re-balance, and it'll be time to finally strap on the permanent battery and retire the AA battery pack.
Taking some more advice from the KAP forum, I'm going to spend at least a couple of outings just learning to fly the Flowforms. The next step will be to hook up a 713g dummy weight 100' down-line from the kite, and fly it as if I have my KAP rig on there. Once I'm comfortable with the kites, and know their limits in the winds we get around here, then I'll hook up the KAP rig and get airborne again.
So I'm still chewing my fingernails, but at least I've changed gears. I started off chewing my fingernails because I couldn't get my kites to reliably lift my rig. Then I was chewing my fingernails because I knew what the fix was, but couldn't afford the new kites. Now I'm chewing my fingernails because I know the fix is sooooooo close, but not here yet. But at least now I know it's in sight. It'll happen. And I will eventually get airborne and be able to keep it that way.
Aaaaahhh...
Ok, time to write the next set of articles. This last one saved my butt!
Tom
Monday, July 23, 2007
KAP is Another One of Those Hobbies
My wife and I have expensive hobbies. I'm a home shop machinist. She's a jeweler. We both do photography. We both like to fly kites. And now I'm combining the latter two with KAP.
"No problem!" I thought. "I have kites, I have a camera, I have a radio, it's gonna be easy!"
Hahahahaha! Oh how naive I have been. As life turns out, the kite I've never been able to get to fly well still doesn't fly well. Last Saturday the kite pulled a 180, screamed for the ground, and wound up in a kiawe tree (think of a mesquite tree, lengthen the thorns, and you're there). Recovered, flew again, things got stable, put on the rig, flew it to about 50', then the kite dove for the ground again. KAP rig in the kiawe this time, the kite out on the lava. Recovered, packed up, and moved to another beach. Stable as a rock. GREAT! Nope, the kite pulled a 180, the KAP rig hit rocks, the kite hit asphalt, the line was draped over all kinds of scrub.
So I fielded some questions on the KAP forums. The consensus was that parafoils are notoriously hard to tune, finicky, and yeah, what I'm seeing indicates an out of tune kite. Rather than frustrate myself and lose my rig with the thing, I started looking at replacements. Lots of good advice there, too. I'm planning on getting two Sutton Flowform kites. One's an 8 square foot kite (to replace my smaller parafoil with a slightly larger sail - great for Waimea). The other is a 16 square foot kite (to replace my 14.5 square foot parafoil... the one that's giving me fits.) Throw in a thousand feet of #250 line for the FF16, a 9" hoop winder for the new line, and my price is up to $200 US.
Sigh... And here I thought I'd finally found an inexpensive hobby I enjoy. NOPE!
Good thing is I just got notice that an article I'd written three years ago actually got published. I ran through the article as printed, compared it to the payment schedule from three years ago, and figure it should be around $240 for the article. Egads I love how life turns out sometimes. I hope to get the check in the next few days, and will order all the new kite gear the same day. 'Till then I'm grounded.
But being a tinkerer and being unable to let something go just because it's "broken", I'm still planning to tune that parafoil. I may never hang a camera from it again (in fact I mean not to). But if I can get it tuned, it'll be one more skill I know I can pick up, and I'll have a kite I can dedicate to flying with the kids.
Tom
"No problem!" I thought. "I have kites, I have a camera, I have a radio, it's gonna be easy!"
Hahahahaha! Oh how naive I have been. As life turns out, the kite I've never been able to get to fly well still doesn't fly well. Last Saturday the kite pulled a 180, screamed for the ground, and wound up in a kiawe tree (think of a mesquite tree, lengthen the thorns, and you're there). Recovered, flew again, things got stable, put on the rig, flew it to about 50', then the kite dove for the ground again. KAP rig in the kiawe this time, the kite out on the lava. Recovered, packed up, and moved to another beach. Stable as a rock. GREAT! Nope, the kite pulled a 180, the KAP rig hit rocks, the kite hit asphalt, the line was draped over all kinds of scrub.
So I fielded some questions on the KAP forums. The consensus was that parafoils are notoriously hard to tune, finicky, and yeah, what I'm seeing indicates an out of tune kite. Rather than frustrate myself and lose my rig with the thing, I started looking at replacements. Lots of good advice there, too. I'm planning on getting two Sutton Flowform kites. One's an 8 square foot kite (to replace my smaller parafoil with a slightly larger sail - great for Waimea). The other is a 16 square foot kite (to replace my 14.5 square foot parafoil... the one that's giving me fits.) Throw in a thousand feet of #250 line for the FF16, a 9" hoop winder for the new line, and my price is up to $200 US.
Sigh... And here I thought I'd finally found an inexpensive hobby I enjoy. NOPE!
Good thing is I just got notice that an article I'd written three years ago actually got published. I ran through the article as printed, compared it to the payment schedule from three years ago, and figure it should be around $240 for the article. Egads I love how life turns out sometimes. I hope to get the check in the next few days, and will order all the new kite gear the same day. 'Till then I'm grounded.
But being a tinkerer and being unable to let something go just because it's "broken", I'm still planning to tune that parafoil. I may never hang a camera from it again (in fact I mean not to). But if I can get it tuned, it'll be one more skill I know I can pick up, and I'll have a kite I can dedicate to flying with the kids.
Tom
Friday, July 20, 2007
My Third Eye Really Is Blind
I used to do a lot of photography. 35mm and 4x5 were my media of choice. Then came kids. And I hate to say it, but the cameras really took a back-burner. Sure, I learned to use a point & shoot, and learned to do snapshots. In the process I learned that doing hard-core portraiture on a rapidly moving, often gooey target really wasn't all that fulfilling. So the cameras sat idle, my photographic synapses sat idle, and time passed.
About two years ago my wife and I sold all our 35mm camera bodies and film point & shoots, and used the money to buy a digital SLR body. Since we already had Canon EOS lenses, we went for a Canon D20 digital body. Fantastic camera. I love it. I just wish I got to use it more. Granted, I'm using it far more than I did the 35mm gear in the Post-Child era, but it's still nowhere near what it used to be when we were going out on the weekends simply to shoot.
I went through some pictures I've taken with the D20, and while technically the keepers really are keepers (sharp, no motion blur, good exposure levels, etc.) artistically they're a wash. If I look at some of my earlier work I can take in a shot and think, "Isolation", "Growth", "Perseverence" (and toss in every other catchword you've seen on a motivational poster.) Looking through my recent stuff I'm seeing "plant with rocks", "beach", "forest".
What it boils down to is this: I wouldn't hang any of it on my wall. We do have some of our own photography hanging on the walls at home. We've also got some Ansel Adams, Redeka, and Brandenburg, just to keep stuff in perspective. But I'm still happy to hang the shots of ours that we did. I'll never have Ansel Adams's artistry, but I can sure try.
I think it's still a problem of time. By way of example, I love doing 4x5 photography. You have one film holder with two sheets of film in it. The image on the ground-glass is upside-down and backward. Composition isn't so much placing objects in the frame, it's placing shapes and colors on a canvas. And I could easily spend an hour or more composing a single shot. Since I typically shoot B&W when I'm doing 4x5 (only one of my lenses is corrected in more than one color), I'll then spend another hour dinking around with filter choice. Then I'll decide the light's not right and make notes so I can come back to that spot some other day when the light is better. It's a glacially slow process that in the long-run can be very very rewarding. But to an innocent bystander? It's the Hell of Watching Paint Dry.
Needless to say, in this, the Era of Children, I don't often get the chance to spend hours on end staring at a ground glass with a towel over my head. I also don't often have the chance to work that way with the Canon gear, either. Photo sessions are a lot more rushed, and rather than being able to take the time to work with the camera until I really get what I want, I'm having to make do with what I can get. It shows.
My photographic eye is blind. I've lost track of what really makes a good shot. But I'm determined to get it back. I know I only developed it the first time by really working hard, shooting truckloads of film, and studying what I like in other photographers' work. So it'll be a long, long process. But it's worth it to me.
Tom
About two years ago my wife and I sold all our 35mm camera bodies and film point & shoots, and used the money to buy a digital SLR body. Since we already had Canon EOS lenses, we went for a Canon D20 digital body. Fantastic camera. I love it. I just wish I got to use it more. Granted, I'm using it far more than I did the 35mm gear in the Post-Child era, but it's still nowhere near what it used to be when we were going out on the weekends simply to shoot.
I went through some pictures I've taken with the D20, and while technically the keepers really are keepers (sharp, no motion blur, good exposure levels, etc.) artistically they're a wash. If I look at some of my earlier work I can take in a shot and think, "Isolation", "Growth", "Perseverence" (and toss in every other catchword you've seen on a motivational poster.) Looking through my recent stuff I'm seeing "plant with rocks", "beach", "forest".
What it boils down to is this: I wouldn't hang any of it on my wall. We do have some of our own photography hanging on the walls at home. We've also got some Ansel Adams, Redeka, and Brandenburg, just to keep stuff in perspective. But I'm still happy to hang the shots of ours that we did. I'll never have Ansel Adams's artistry, but I can sure try.
I think it's still a problem of time. By way of example, I love doing 4x5 photography. You have one film holder with two sheets of film in it. The image on the ground-glass is upside-down and backward. Composition isn't so much placing objects in the frame, it's placing shapes and colors on a canvas. And I could easily spend an hour or more composing a single shot. Since I typically shoot B&W when I'm doing 4x5 (only one of my lenses is corrected in more than one color), I'll then spend another hour dinking around with filter choice. Then I'll decide the light's not right and make notes so I can come back to that spot some other day when the light is better. It's a glacially slow process that in the long-run can be very very rewarding. But to an innocent bystander? It's the Hell of Watching Paint Dry.
Needless to say, in this, the Era of Children, I don't often get the chance to spend hours on end staring at a ground glass with a towel over my head. I also don't often have the chance to work that way with the Canon gear, either. Photo sessions are a lot more rushed, and rather than being able to take the time to work with the camera until I really get what I want, I'm having to make do with what I can get. It shows.
My photographic eye is blind. I've lost track of what really makes a good shot. But I'm determined to get it back. I know I only developed it the first time by really working hard, shooting truckloads of film, and studying what I like in other photographers' work. So it'll be a long, long process. But it's worth it to me.
Tom
Tuesday, July 17, 2007
The View from Up There
My batteries came in. After a little uncomfortable action modifying the transmitter with a Foredom, I got the new battery pack to fit. Servos were re-centered, things were adjusted, and off I went! I've flown three times since then, and I think I'm beginning to understand a little better.
My big kite likes light wind. It also needs more work. I did a bridle adjusting session and found some of the lines out by as much as 10mm. I also found one of the keels was loosing its stitching. When I flew today at lunch, I found not only was another keel loosing stitching (on the side it continually turns toward) but the rightmost cell is also coming undone. I'm going to check every seam on the thing tonight before getting it airborne again.
The rig works GREAT. There are some limits in range of motion (I can't set things up so the camera can sweep from horizon to vertical, but I can get pretty close.) It's fairly easy to steer, though the pan direction takes some getting used to (it's modified for continuous rotation.) All in all I'm pleased as punch, and can't wait to get my kites in shape.
I'm finding, though, that I have a really good tiny kite for howling wind conditions (when you don't really want to fly a camera, anyway) and one in need of repair for whisper light conditions. But I don't have a good mid-range kite. I'm looking at the Sutton Flowform, which has a reputation as a very solid lift kite. Ah well. Not right now. With some repairs my big kite should be good for about half the flying conditions near where I live. Now I need to find some pretty places to go that's in the range of conditions I can fly!
Woohoo!
Tom
My big kite likes light wind. It also needs more work. I did a bridle adjusting session and found some of the lines out by as much as 10mm. I also found one of the keels was loosing its stitching. When I flew today at lunch, I found not only was another keel loosing stitching (on the side it continually turns toward) but the rightmost cell is also coming undone. I'm going to check every seam on the thing tonight before getting it airborne again.
The rig works GREAT. There are some limits in range of motion (I can't set things up so the camera can sweep from horizon to vertical, but I can get pretty close.) It's fairly easy to steer, though the pan direction takes some getting used to (it's modified for continuous rotation.) All in all I'm pleased as punch, and can't wait to get my kites in shape.
I'm finding, though, that I have a really good tiny kite for howling wind conditions (when you don't really want to fly a camera, anyway) and one in need of repair for whisper light conditions. But I don't have a good mid-range kite. I'm looking at the Sutton Flowform, which has a reputation as a very solid lift kite. Ah well. Not right now. With some repairs my big kite should be good for about half the flying conditions near where I live. Now I need to find some pretty places to go that's in the range of conditions I can fly!
Woohoo!
Tom
Wednesday, July 11, 2007
Luckier than I Deserve to Be
I've had mixed luck with the AVR Dragon. It seems like I can use it to do ISP programming on a remote device, but that's about it. Thing is, it works perfectly, every time. But if I try to do ISP programming on a device that's plugged into the Dragon's ZIF socket, it fails in some weird way every time.
So on this last project I wound up using the STK500 and the Dragon in concert. The STK500 has two serial ports on it: one to program the device, one that can be attached to the device's onboard UART (if it has one... or more than one.) Problem is my laptop has no serial ports, so I was swapping my USB to serial adapter from one port to the other for programming and testing. It was a drag. In the end I wound up plugging the device's RS-232 port into my Linux box, using VNC on my laptop to connect to the Linux box, and ran it that way. This was better, but it was still a drag.
So this morning I brought in my Dragon, plugged it in as an ISP programmer for the ATmega16 plugged into the STK500, and voila, everything worked perfectly. The laptop's serial cable talks to the device's RS-232 port, and the Dragon acts as a programmer. Perfect.
But wait a sec... How come this only works for off-board targets?! I started to pry. That's when I realized what a doof I've been. After going through the connection diagrams for the ATmega16 (the one I'm using for the Tcl/Tk project), I realized that every time I'd installed a chip on the Dragon, I'd installed it backward. EVERY TIME.
That explained a lot.
So with shaking hands I put in an ATtiny85 (a little 8-pin processor that can crank out 20MIPS with the right crystal plugged in.) With even shakier hands I cabled it up for ISP / debugWIRE. (Since buying the Dragon I have never ever been able to get debugWIRE or JTAG debugging to work because I am a doof.) Click, start AVR Studio. Click, choose the LED blinker app I'd written for the '85. Click, compile. Click, program via the Dragon's ISP interface. So far so good. (For what it's worth, I had never reached this stage before since the Dragon had always failed to power up with the ATtiny85 cabled up to the ISP interface. Funny what electronics will do when you install stuff backwards.)
Now for debugWIRE... Click, click, click, yeah I'm sure I want to disable ISP and enable debugWIRE. Click... Holy cow! It's running live code on the ATtiny and I'm seeing the contents of its memory LIVE! This ROCKS! I'm a doof, but this rocks! Yeah, so this is just an LED blinker application. But now I can see the ADCs, timers, and everything live!
So with slightly less shaky hands I unplugged the Dragon and thought about this. I can't count how many people on AVRFreaks have reported that they've blown up their Dragons. Among other things, there's a very sensitive part of the on-board power supply that responds poorly to changes in capacitance -- like when a human finger touches it and changes the dielectric constant of its package. So here I am, I've been repeatedly plugging in various AVR chips backwards, and mine still works flawlessly.
Despite all my bad luck with accidents (this is a running joke at work), cards (I simply don't play), life (the water leak at my house), and everything else, maybe I really am a lot luckier than I thought. Or maybe my Dragon just likes me.
It's good to have a Dragon for a friend.
Tom
So on this last project I wound up using the STK500 and the Dragon in concert. The STK500 has two serial ports on it: one to program the device, one that can be attached to the device's onboard UART (if it has one... or more than one.) Problem is my laptop has no serial ports, so I was swapping my USB to serial adapter from one port to the other for programming and testing. It was a drag. In the end I wound up plugging the device's RS-232 port into my Linux box, using VNC on my laptop to connect to the Linux box, and ran it that way. This was better, but it was still a drag.
So this morning I brought in my Dragon, plugged it in as an ISP programmer for the ATmega16 plugged into the STK500, and voila, everything worked perfectly. The laptop's serial cable talks to the device's RS-232 port, and the Dragon acts as a programmer. Perfect.
But wait a sec... How come this only works for off-board targets?! I started to pry. That's when I realized what a doof I've been. After going through the connection diagrams for the ATmega16 (the one I'm using for the Tcl/Tk project), I realized that every time I'd installed a chip on the Dragon, I'd installed it backward. EVERY TIME.
That explained a lot.
So with shaking hands I put in an ATtiny85 (a little 8-pin processor that can crank out 20MIPS with the right crystal plugged in.) With even shakier hands I cabled it up for ISP / debugWIRE. (Since buying the Dragon I have never ever been able to get debugWIRE or JTAG debugging to work because I am a doof.) Click, start AVR Studio. Click, choose the LED blinker app I'd written for the '85. Click, compile. Click, program via the Dragon's ISP interface. So far so good. (For what it's worth, I had never reached this stage before since the Dragon had always failed to power up with the ATtiny85 cabled up to the ISP interface. Funny what electronics will do when you install stuff backwards.)
Now for debugWIRE... Click, click, click, yeah I'm sure I want to disable ISP and enable debugWIRE. Click... Holy cow! It's running live code on the ATtiny and I'm seeing the contents of its memory LIVE! This ROCKS! I'm a doof, but this rocks! Yeah, so this is just an LED blinker application. But now I can see the ADCs, timers, and everything live!
So with slightly less shaky hands I unplugged the Dragon and thought about this. I can't count how many people on AVRFreaks have reported that they've blown up their Dragons. Among other things, there's a very sensitive part of the on-board power supply that responds poorly to changes in capacitance -- like when a human finger touches it and changes the dielectric constant of its package. So here I am, I've been repeatedly plugging in various AVR chips backwards, and mine still works flawlessly.
Despite all my bad luck with accidents (this is a running joke at work), cards (I simply don't play), life (the water leak at my house), and everything else, maybe I really am a lot luckier than I thought. Or maybe my Dragon just likes me.
It's good to have a Dragon for a friend.
Tom
Tuesday, July 10, 2007
Learing a New Language
No, some dogs really can't learn new tricks.
But maybe I'm being too harsh. Here's the deal: I was tasked at work with picking up Tcl/Tk as quickly as possible. I think the phrase "Consider it a learning experience" entered into the conversation at least once. (And to be fair, the speaker was laughing at the time, so they knew exactly what they were saying.)
I decided if I'm going to learn something that can build GUIs, it'd be neat to pick something I want a GUI for. So I stuck an ATmega16 in my STK500 board, plugged the programming serial port into my laptop, the device's serial port into my Linux box, and got to coding.
I admit, at the time I got that sheepish, look-over-the-shoulder feeling of doing something wrong, playing with AVRs at work. This is a hobby, right? Keep the twain separate and all that. In the end, though, it took less than an hour to whip something up on the ATmega16 that would drive the LEDs on the STK500 based on what I got in the serial port, and to dump the status of the eight pushbuttons on the STK500 back out. I hoped it wasn't an hour wasted.
Then began the Tcl/Tk experience...
After fumbling around on my own, I did what I do whenever I learn a new language: I take someone else's code that does something close to what I want, and try to figure out how they did it. Except this particular piece of code wasn't commented, and it wasn't the most transparent beast, either. For starters, Tcl/Tk syntax looks nothing like anything else I've ever used. For another, almost everything they did used the canvas command, which is sort of like saying it used the draw stuff command. Flexible? Yes. Simple? No.
In the end I got the push button stuff working. I can push buttons on the STK500 and see my little circular LED things light up or go dark accordingly. I don't quite have the reverse action working yet. Give me time.
In the end I'd love to have a bank of on-screen LEDs for the pushbuttons, checkboxes that drive the LEDs on the STK500, and I'm bound and determined to make some analog gauges to read the ADCs off the ATmega16 as well. That's about as goofy as I can get and still feel good about it in the morning.
As it is I'm still 100% lost. But I'm commenting this other person's code as I learn what it is they did (and why? maybe...) In the end I hope to have something I can read through that'll finally teach me Tcl/Tk. Aside from some raw X11 programming I did in the late 90's, this is the first real GUI I've ever built.
Ok, maybe you can teach an old dog new tricks. Just hurts a lot.
Tom
But maybe I'm being too harsh. Here's the deal: I was tasked at work with picking up Tcl/Tk as quickly as possible. I think the phrase "Consider it a learning experience" entered into the conversation at least once. (And to be fair, the speaker was laughing at the time, so they knew exactly what they were saying.)
I decided if I'm going to learn something that can build GUIs, it'd be neat to pick something I want a GUI for. So I stuck an ATmega16 in my STK500 board, plugged the programming serial port into my laptop, the device's serial port into my Linux box, and got to coding.
I admit, at the time I got that sheepish, look-over-the-shoulder feeling of doing something wrong, playing with AVRs at work. This is a hobby, right? Keep the twain separate and all that. In the end, though, it took less than an hour to whip something up on the ATmega16 that would drive the LEDs on the STK500 based on what I got in the serial port, and to dump the status of the eight pushbuttons on the STK500 back out. I hoped it wasn't an hour wasted.
Then began the Tcl/Tk experience...
After fumbling around on my own, I did what I do whenever I learn a new language: I take someone else's code that does something close to what I want, and try to figure out how they did it. Except this particular piece of code wasn't commented, and it wasn't the most transparent beast, either. For starters, Tcl/Tk syntax looks nothing like anything else I've ever used. For another, almost everything they did used the canvas command, which is sort of like saying it used the draw stuff command. Flexible? Yes. Simple? No.
In the end I got the push button stuff working. I can push buttons on the STK500 and see my little circular LED things light up or go dark accordingly. I don't quite have the reverse action working yet. Give me time.
In the end I'd love to have a bank of on-screen LEDs for the pushbuttons, checkboxes that drive the LEDs on the STK500, and I'm bound and determined to make some analog gauges to read the ADCs off the ATmega16 as well. That's about as goofy as I can get and still feel good about it in the morning.
As it is I'm still 100% lost. But I'm commenting this other person's code as I learn what it is they did (and why? maybe...) In the end I hope to have something I can read through that'll finally teach me Tcl/Tk. Aside from some raw X11 programming I did in the late 90's, this is the first real GUI I've ever built.
Ok, maybe you can teach an old dog new tricks. Just hurts a lot.
Tom
Sunday, July 8, 2007
Tails & Legs
So I got to try out the kite tails I got for my KAP setup. They're outstanding! I have yet to have one of my parafoils sail that well with so few nosedives. The surprising bit was the kite I had slated to loft the camera probably isn't the one I'll wind up using most of the time. The wind here is tricky, and with wind coming up and over a mountain as well as channeling down a wide valley, we get some oddball gusts and wind tunnel speeds. My little parafoil, the one I don't fly because it's even less stable than my big one, was the clear winner for behavior with the new tails, and it was able to lift a one liter water bottle without too much swaying or scary behavior.
I like the bigger kite for lower winds, though we don't get them that often. Have to keep experimenting.
Anyway, construction continues apace on the KAP rig. Rather than wait a week on the batteries, I'm going to pull out the servo code for the Orangutan and have it send some 1.5ms pulses out of one of its channels so I can center things up for alignment. (Sheepishly... I wrote some library code for driving up to eight servos off a little Orangutan controller, and totally forgot this when it came to centering the KAP's servos! DOH!) In any case this and some longer standoffs should let me finish the rig and get things wired up in anticipation of the new batteries.
Only one problem really remains. After being a little frustrated while working on the KAP rig, and after watching the water bottle tests out in the kite field yesterday, I'm convinced of the necessity of legs on this, my first KAP rig. So I sent another $20 off to Brooks Leffler for a leg kit. I kick myself as I do this, because adding legs would be a really straightforward thing to do in the shop. But dang it, he makes pretty parts that clearly have years of thought and testing put into them, and for $20 I get black anodized leg brackets and carbon fiber legs. I'm not going to knock it. (Besides, my own 0.240" CF spar is slated to be a mast for an RC sailboat I'm working on... I'd have to order more, anyway.)
So still no pictures, but lots more healthy respect for his design work. In any case I got the receipt from All-Battery, and figure the batteries and the legs will ship on Monday. I should have a working rig by next weekend.
Tom
I like the bigger kite for lower winds, though we don't get them that often. Have to keep experimenting.
Anyway, construction continues apace on the KAP rig. Rather than wait a week on the batteries, I'm going to pull out the servo code for the Orangutan and have it send some 1.5ms pulses out of one of its channels so I can center things up for alignment. (Sheepishly... I wrote some library code for driving up to eight servos off a little Orangutan controller, and totally forgot this when it came to centering the KAP's servos! DOH!) In any case this and some longer standoffs should let me finish the rig and get things wired up in anticipation of the new batteries.
Only one problem really remains. After being a little frustrated while working on the KAP rig, and after watching the water bottle tests out in the kite field yesterday, I'm convinced of the necessity of legs on this, my first KAP rig. So I sent another $20 off to Brooks Leffler for a leg kit. I kick myself as I do this, because adding legs would be a really straightforward thing to do in the shop. But dang it, he makes pretty parts that clearly have years of thought and testing put into them, and for $20 I get black anodized leg brackets and carbon fiber legs. I'm not going to knock it. (Besides, my own 0.240" CF spar is slated to be a mast for an RC sailboat I'm working on... I'd have to order more, anyway.)
So still no pictures, but lots more healthy respect for his design work. In any case I got the receipt from All-Battery, and figure the batteries and the legs will ship on Monday. I should have a working rig by next weekend.
Tom
Saturday, July 7, 2007
Batteries, Batteries, and More Batteries
So I got my Brooxes KAP kit home last night and started putting it together. About halfway through it is a step where you modify a servo for continuous 360 degree rotation. No sweat, I've done that four times now, taken pictures, made the web page (got the T-shirt, lost it?) Anyway, easy step. Only catch is you have to make sure you've centered the servo's feedback potentiometer afterward. Easiest way to do this is to plug it into an R/C receiver, power things up, center up the stick on the transmitter, and make sure the servo doesn't keep spinning. So I got out my radio, powered it up aaaaaaandahem... no juice. So I put it on the charger and kept going.
This morning? Still no juice. I opened it up and saw that in the intervening years the battery had done the puffy discharge thing that drives digital doctors nuts. Shame on it! The radio's only... ok, sixteen years old. Twice the age of my oldest kid. >sigh< Can't win.
Actually, yeah I can. Doing robotics gets you into silly things like chopping servos apart to make them spin continuously (which is why I've done that so many times.) But it also gets you into batteries. My favorite battery chemistry, by far, is the lithium chemistries. Both my mini-sumos run on LiPoly batteries, and a friend's much (MUCH) larger project runs on LiIon batteries. Great stuff.
But I was after a direct replacement for the decrepit batteries coming out of my aging radio gear. As luck would have it, though, the same supplier I use for my LiPoly batteries had replacements in-hand! The original was a Futaba NT-8H NiCd pack. All-Battery sells NiMH NT-8H batteries, along with NiMH batteries for the Futaba receiver. Click-click, and now I've got two packs and a charger in the mail.
That may be one of the most rewarding aspects of these hobbies: Taking old "useless" gear and breathing new life into it. Some of the tools in my shop pre-date WW-II. (At least one pre-dates the previous century.) The radio gear for my KAP rig probably wouldn't even pull $20 on Ebay. And yet it's still working (or was the last time I powered it up a year ago), and with new batteries in place it'll help me take aerial photographs anywhere there's wind.
But in the meanwhile, I'm not going to be flying this camera for at least a week. Bummers. Ah well, I've still got some debugging to do on the kite itself. The wind's right, the weather's clear, and I might get a chance to test out the kite tails I got from Brooxes. It'd be nice to know I don't have to worry about nosedives before slinging a camera from the kite line.
Tom
This morning? Still no juice. I opened it up and saw that in the intervening years the battery had done the puffy discharge thing that drives digital doctors nuts. Shame on it! The radio's only... ok, sixteen years old. Twice the age of my oldest kid. >sigh< Can't win.
Actually, yeah I can. Doing robotics gets you into silly things like chopping servos apart to make them spin continuously (which is why I've done that so many times.) But it also gets you into batteries. My favorite battery chemistry, by far, is the lithium chemistries. Both my mini-sumos run on LiPoly batteries, and a friend's much (MUCH) larger project runs on LiIon batteries. Great stuff.
But I was after a direct replacement for the decrepit batteries coming out of my aging radio gear. As luck would have it, though, the same supplier I use for my LiPoly batteries had replacements in-hand! The original was a Futaba NT-8H NiCd pack. All-Battery sells NiMH NT-8H batteries, along with NiMH batteries for the Futaba receiver. Click-click, and now I've got two packs and a charger in the mail.
That may be one of the most rewarding aspects of these hobbies: Taking old "useless" gear and breathing new life into it. Some of the tools in my shop pre-date WW-II. (At least one pre-dates the previous century.) The radio gear for my KAP rig probably wouldn't even pull $20 on Ebay. And yet it's still working (or was the last time I powered it up a year ago), and with new batteries in place it'll help me take aerial photographs anywhere there's wind.
But in the meanwhile, I'm not going to be flying this camera for at least a week. Bummers. Ah well, I've still got some debugging to do on the kite itself. The wind's right, the weather's clear, and I might get a chance to test out the kite tails I got from Brooxes. It'd be nice to know I don't have to worry about nosedives before slinging a camera from the kite line.
Tom
Friday, July 6, 2007
KAP
My KAP rig showed up from Brooks Leffler. I'm pleased as punch. It's a well-made kit, very flexible, adaptable to lots of different cameras, and the aluminum sheet metal is all anodized a nice black. (I can't do anodizing in my shop at the moment, so this is a really nice touch that lets me know I made the right choice in buying the kit from Brooks rather than rolling my own.)
I've got my radio, receiver, servos, etc. sitting at home ready to go. I can't wait!
In addition to the KAP kit I picked up 30' of fuzzy tail. My big lifter kite (a parafoil) has a nasty habit of flying straight as an arrow, then rotating 180 degrees and flying straight as an arrow... straight down... Most of the time it'll pull another 180 about ten feet off the ground, but sometimes it just plows straight on in. And since the KAP rig is typically suspended 100' under the kite, it doesn't matter if it turns or not. The camera would've done a lawn-dart before it ever turned around. So I hope the fuzzy tail fixes this and keeps it nose to the wind and ass to the ground. (If this seems crass, try losing a few payloads and then tell me I'm being crass.)
Sorry, no pictures to share just yet. The thing just got here, for crying out loud!
The real drag in all this? I've been having this mysterious weakness and shortness of breath recently. Its cropped up in the last four months or so... ever since I had bronchitis and what the ER doc thought was the early stages of pneumonia. So not so mysterious after all. In any case I'm back on antibiotics, inhaled corticosteroids, I've got a LABA inhaler, the whole nine yards. And I'm stuck at sea level for the next week (no remote worksite for me). All of this means my chances of kite flying this weekend are nil, zilch, nada, zero. Gotta love it. I can build the KAP rig, but can't use it. Ah well. Such is life. It's incentive to get better.
The bigger drag? This may be permanent. I might have asthma.
As I tell my kids when they're looking for a four-letter word of their own: Poopy!!
Can't wait 'till I'm well enough to go outside to play.
Tom
I've got my radio, receiver, servos, etc. sitting at home ready to go. I can't wait!
In addition to the KAP kit I picked up 30' of fuzzy tail. My big lifter kite (a parafoil) has a nasty habit of flying straight as an arrow, then rotating 180 degrees and flying straight as an arrow... straight down... Most of the time it'll pull another 180 about ten feet off the ground, but sometimes it just plows straight on in. And since the KAP rig is typically suspended 100' under the kite, it doesn't matter if it turns or not. The camera would've done a lawn-dart before it ever turned around. So I hope the fuzzy tail fixes this and keeps it nose to the wind and ass to the ground. (If this seems crass, try losing a few payloads and then tell me I'm being crass.)
Sorry, no pictures to share just yet. The thing just got here, for crying out loud!
The real drag in all this? I've been having this mysterious weakness and shortness of breath recently. Its cropped up in the last four months or so... ever since I had bronchitis and what the ER doc thought was the early stages of pneumonia. So not so mysterious after all. In any case I'm back on antibiotics, inhaled corticosteroids, I've got a LABA inhaler, the whole nine yards. And I'm stuck at sea level for the next week (no remote worksite for me). All of this means my chances of kite flying this weekend are nil, zilch, nada, zero. Gotta love it. I can build the KAP rig, but can't use it. Ah well. Such is life. It's incentive to get better.
The bigger drag? This may be permanent. I might have asthma.
As I tell my kids when they're looking for a four-letter word of their own: Poopy!!
Can't wait 'till I'm well enough to go outside to play.
Tom
Sunday, July 1, 2007
Instant Gratification
One of the things I like most about the lathe is the sense of instant gratification you can get from using it. If you're using a 3-jaw chuck, there's no indicating in your workpiece like there is on a mill. There's no touching off the corner to get your zero, there's just cut and hope you like what you get. Making pens on the lathe has got to be one of the best forms of instant gratification out there. In a couple of hours you go from bits 'n pieces to something you can hand someone, and actually have them appreciate it!
But no, I didn't use my lathe this weekend. I did do some programming. Friday night I had the realization that one of my favorite robot controllers didn't really have any provision for getting at the SPI pins. After some conversations on the support forum I found out I was wrong (thank goodness!) but that the work-around wasn't the cleanest thing when it came to wiring. Rather than get huffy or mess up an already tricky soldering job making the mods, I took the other route: I wrote a software SPI master implementation. And it worked!
It's the closest I've had to the lathe-like experience on a microcontroller. I read the spec (it's pretty straightforward, I'll grant you), I wrote what I thought would create that pattern on the I/O lines, aaaaand... it didn't work. But that's only because I did a for loop that went from 0 to 6 instead of 0 to 7 (bit counting.) Change a < to a <= and everything worked perfectly. Maybe not the first time, but the second time is just about as good. Whee!
Code's checked in, and I'm looking at writing software I2C next. (Nope, the I2C pins are tied up, too, though the work-around for that is a lot easier.)
Can't beat it! Instant gratification is good.
Tom
But no, I didn't use my lathe this weekend. I did do some programming. Friday night I had the realization that one of my favorite robot controllers didn't really have any provision for getting at the SPI pins. After some conversations on the support forum I found out I was wrong (thank goodness!) but that the work-around wasn't the cleanest thing when it came to wiring. Rather than get huffy or mess up an already tricky soldering job making the mods, I took the other route: I wrote a software SPI master implementation. And it worked!
It's the closest I've had to the lathe-like experience on a microcontroller. I read the spec (it's pretty straightforward, I'll grant you), I wrote what I thought would create that pattern on the I/O lines, aaaaand... it didn't work. But that's only because I did a for loop that went from 0 to 6 instead of 0 to 7 (bit counting.) Change a < to a <= and everything worked perfectly. Maybe not the first time, but the second time is just about as good. Whee!
Code's checked in, and I'm looking at writing software I2C next. (Nope, the I2C pins are tied up, too, though the work-around for that is a lot easier.)
Can't beat it! Instant gratification is good.
Tom
Subscribe to:
Posts (Atom)