The View Up Here

Random scribblings about kites, photography, machining, and anything else

  • Flickr Gallery

Archive for the ‘Electronics’ Category

Closer to a Viewfinder

Posted by Tom Benedict on 29/11/2011

I’m very very close to having a viewfinder for my KAP gear.


5.8GHz KAP Gear

The 5.8GHz gear arrived, and sure enough there was no FCC ID sticker on the transmitter. This just gave me more incentive to study for my radio license!

I also noticed the 900MHz gear I had built out also didn’t have an FCC ID sticker. So I can’t use it, either. Not until I have a license, anyway. Since the plan is to change over to 5.8GHz and since I can’t use the 900MHz gear anyway, I went ahead and pulled it out and boxed it up. While I’m waiting for the license exam, I plan to package the new gear and get it mounted to my transmitter.

The photo gives you a sense of scale for the stuff. It’s tiny! The video receiver is smaller than my monitor. If I can find all the right bits at Radio Shack, I’m considering mounting it to the back of the monitor, with all the cable connections housed in a little electronics enclosure next to it. This should keep everything neat and clean. Any time you use equipment in the field, “neat and clean” takes on more importance than just looking good. It means I’m less likely to snag something when I shove the radio into my bag. It means fewer sessions lost to disconnected cables or dirty connections. It means less chance of snagging my hand on a wire when I really do need to put the thing down and tend to the kite! “Neat and clean” is a good thing.

I’m excited about trying this out in the field. Even if I don’t wind up using it long term, it’s a good experiment.

– Tom

Posted in Electronics, Engineering, Kite Aerial Photography, Radio | Leave a Comment »

Video Downlink for KAP

Posted by Tom Benedict on 18/11/2011

Over a year ago I picked up a 900MHz video link system for doing elevated photography using a pole. I’ve been using the pole for years, but I’ve done my pointing blind, similar to how I’ve been doing KAP. I figured the video downlink would make pole work easier. To make a long and painful story short, I destroyed the board camera that came with the system, almost destroyed my Canon A650 IS, and let some of the magic smoke out of my gentLED-CHDK cable. In disgust, I boxed the whole @#$! thing up and put it on the shelf in my closet.

A recent discussion on the KAP forum provided a much-needed kick in the seat of the pants. Other people got theirs to work, so what was my problem?!

More specifically, the thread answered two of my outstanding questions: First, one of the members of the forum figured out you could power the video transmitter with a 9V battery. This is significantly lighter than the 8xAAA power supply I tested initially. Second, one of the members of the forum figured out you could power the receiver and video screen using the 12V power source for the RC transmitter that’s used to control the KAP rig. With this newfound knowledge in hand, I hacked the radio I use for doing pole elevated photography.
RC TX with Video DownlinkI’d been tossing around how to mount the monitor for ages, so the design didn’t come out of nowhere. I wanted it simple, easy to use, and easy to install. The Hobby King and Turborix 2.4GHz radios have a big empty spot in the case just below the antenna, so I knew it was safe to pop two holes there to attach the monitor mount. The mount itself was bandsaw and file work, finished with bead blasting. Not shown is a rubber pad, glued to the mount with E6000 adhesive. This keeps the monitor from skidding around. The monitor is one I picked up off of Ebay back when I purchased the 900MHz video gear. It has a 1/4″-20 hole in the back, which makes it a snap to mount.

Power taps off of the switched side of the power for the radio come out the back to power the video receiver and the monitor. When the radio is powered off, everything is off. When it’s powered on, RC Tx, video Rx, and monitor all come up at once. This worked out GREAT.

Unfortunately the range on the little 100mW video link just isn’t there. It’s fine for pole work, but it peters out past about a hundred feet. Bummers!

I went back to Hobby King and found this little gem. It’s a 200mW 5.8GHz video link for about the same price as the 900MHz link. I got one on order, and will test it as soon as it arrives. People use this setup for first person view (FPV) on RC airplanes, and claim a range of 1km (yes, that’s over 3000′!) unmodified. Others have replaced the antennas with base loaded cloverleaf helical antennas, and have bumped that range even further. 3000′ should be fine for KAP, so I don’t plan to make cloverleaf antennas for this.

Since the ground unit doesn’t have additional batteries on it, it’s really not that cumbersome to use. I still need to add a hood so I can use it in direct sunlight, but that’s a matter of bending some corrugated plastic (another idea from that same forum thread.)

The thread had one more gem to offer up: The video jack on the Canon Rebel T2i is a 9-pin mini USB. The wiring diagram for the video jack showed up in the thread, as well as a link for where to buy the mating plugs. I found one on Spark Fun that also includes a breakout board, making the wiring a real snap. I already needed one of these for another project I’m working on for someone else, and figured this was just what I needed for making a wiring harness for my KAP rig. Yahoo! I ordered three so I’d have a spare.

I don’t know if video is something I’ll want to do with KAP long term. But between the upgrade to the T2i and concerns about rig stability, I’m more than a little stuck. I haven’t done much KAP, and have been increasingly disappointed with the KAP I’ve done. Maybe giving myself a viewfinder is the way to go. Maybe pulling the T2i out of the rig and going full aut0-KAP with the A650 is the way to go. I honestly can’t say. But without trying all the options, I’ll never know.

– Tom

Posted in Electronics, Kite Aerial Photography, Photography | Leave a Comment »

Re-Thinking the T2i Rig

Posted by Tom Benedict on 08/07/2011

I’m still finishing up a number of projects, so I haven’t been able to begin construction of the T2i panorama rig just yet. In some ways I wish I had the rig in-hand this very moment. In others I’m glad it’s taking a while: I re-designed it. Again. And as soon as I thought I was done, I re-designed it again.

The initial design called for a Geneva mechanism that would index the camera through a number of pan positions at a fixed rate. I planned in a Hall-effect sensor and magnet so I could compare the rotation rate to a watch crystal and continuously tune it through a PID loop so it would remain consistent even as the rig’s batteries drained. This had all the benefits of Vertigo’s burst-KAP technique without the drawback of the high shutter speeds required to freeze the action. Since the goal of this rig is to do nighttime or late-evening panoramas, stopping the camera at each position is a requirement, and the Geneva fit the requirements perfectly.

Since then I’ve revised the design several times. The first revision was to add the ability to install a two-axis flywheel on the rig’s pan axis. This is to damp the high frequency rig motion in roll, pitch, and yaw, and allow for the slower shutter speeds necessary for late evening photography. I still think there’s a lot to be said for this approach, and plan to pursue it in the future. But for now I’m just adding the bolt pattern so the flywheels can be added later.

Meanwhile two other discussions have happened that changed my mind on a couple of things. The first was a thread on the KAP Forum from Mike LeDuc, who built a 3-axis stabilized pendulum rig that he’s used with great success. In addition to using an IMU to control three servos to take out extraneous motion in roll, pitch, and yaw, it also has the provision to trip the shutter on the camera only when it is at the apex of a swing, when the motion is at a minimum. I loved the idea as soon as I saw it, and still like it. I think it compliments the flywheel in terms of adding rig stability, and would result in sharper pictures at longer shutter speeds.

While trying to design around this idea, another thread on the forums came up, in which a fellow KAPer who goes by the name of yurik_ryba posted a link to a Pololu Robotics product, the Micro Maestro USB servo controller. I have a long-standing love of the design work done by the folks at Pololu, so I had to give it a look-see.

The Maestro line of products are all servo controllers with attached microcontrollers. They’re intended for robotics or animatronics, so there’s a provision for programming a sequence of motions into them. A Windows-based application lets you write the scripts that control what they do. Even better, each I/O slot can either drive a servo, act as a digital input or output, or act as an analog input. The Micro Maestro has six channels, but by the time you get to the largest version there are 24 channels of I/O and the added capability of having your I/O channels act as PWM outputs for DC speed control. They’re wild!

Of course I ordered one.

So for the moment the plan is to go with a mechanically simple rig. It’s basically a Brooxes BEAK with a geared pan axis. No sense re-inventing the wheel, so I plan to use his Deluxe Gear Set, which interfaces directly to the Brooxes Utility Frame I plan to use as the framework of the rig, similar to how it is done in the BEAK. The pan gear will be modified to include a ring of 1/8″ diameter, 1/16″ thick rare earth magnets. A ratiometric Hall-effect sensor will then be wired in on one of the unused I/O channels as an analog input device. Careful placement of the magnets should let me use this as a fairly accurate encoder.

One of the cooler features of the Maestro controllers is that each axis can have its own acceleration and maximum velocity settings. This should let me replicate the behavior of a Geneva without the mechanical complexity, and by using an encoder that gives a continuous near-sinusoidal output, I should be able to have it stop at an arbitrary number of positions as it completes its circle. The scripting language includes a command to detect if all of the axes have stopped, so with a sufficiently slow pan velocity and acceleration, I should be able to time things so the rig has settled down after each move.

Since this rig only has one axis, one shutter, and one encoder input, that still leaves me three I/O lines to play with. Sparkfun offers several three-axis gyro devices that would let me sample the rate of roll, pitch, and yaw. Once the rig is built and tested, if further stabilization is required I should be able to add Mike LeDuc’s apex sensing to my rig as a plug-and-play option. And adding the flywheels is a matter of bolting them on. This wouldn’t offer me the three-axis stabilization that Mike’s rig has, but I can cross that bridge when I get to it. Adding three-axis stabilization of a DSLR camera is not a lightweight affair, and up to this point the rig would weigh very little compared to the weight of the camera and lens. Light, simple, and effective is what I’m after.

In case anyone is reading this and is shaking their head, thinking I’m rushing headlong toward disappointment, please understand I know the risks. Earlier this week I talked about some of this with Michael Layefsky, whose nighttime picture of Jack London Square in 2009 got me started on this whole idea. He convinced me that night time panoramas from a kite probably are a fool’s errand. Even so, it’s a risk I’m willing to take. Look at it this way: At the very worst it won’t work for panoramas, but will occasionally (say 0.5% of the time) produce a good nighttime photograph. So be it. Roll the clock back into the sunset hour and it will still provide better panoramas than I can currently make. Roll the clock back a little further to the golden hour and it will beat my current setup hands-down. No matter how I cut it, this is a good direction for me to go.

And even if the whole thing is an utter and complete flop, the rig is entirely constructed of Brooxes components. That’s like building a KAP rig out of Legos or Meccano parts. If all else fails, take it apart and build something else that does work. Nothing is wasted except for my time, and even that’s not a waste since I’ll come out of it knowing more than when I went in.

All in all, life’s pretty good.

– Tom

Posted in Electronics, Engineering, Kite Aerial Photography, Photography | Leave a Comment »


Posted by Tom Benedict on 04/12/2009

I’ve owned a benchtop CNC mill since the middle of 2000.  The first real machine tool in my shop was my Taig lathe, so when it came time to find a CNC mill to go with it, the Taig mill was a natural choice.  The two tools have identical spindles and take much of the same tooling, so this was a money-saving measure at the time.  But in terms of transferring work from one tool to the other it has added benefits as well since the same chucks will fit the lathe spindle, the mill spindle, and the rotary table on the mill.  All in all, it’s a nice combination to have in the home, even if it is a little small by industry standards.

My shop has seen several moves over the years, the most recent being a move from Texas to Hawaii.  It wasn’t the kindest thing to do to my tools, but a set of good stout shipping crates kept things from going too horribly wrong.  Even so, the performance of the mill began to degrade once it arrived, and a little over a year ago it finally gave up the ghost for good.

Luckily none of this had anything to do with mechanical damage of any sort.  I’ve tested the tramming on my mill over the years, and unless I do something really stupid, like dig in a tool and keep driving one of the axes, it’s never had any problems of that sort.  I replaced the spindle motor on both the lathe and the mill with 1HP variable speed DC motors at one point, which was a good change for the lathe and a vast improvement over the mill’s stock 1/10HP AC motor.  Other upgrades came along as well, such as a relay box for the mill’s spindle and coolant, a quick change tool post system for the lathe, and a number of other things.

But once the mill was dead, none of that really mattered.  So it sat.  And I fumed.  And eventually I more or less walked away from it.

If it had died a violent death with smoke and loud noises and all the trimmings, I probably would’ve had an easier time of things.  Instead it died a slow death of having random position loss in various axes.  Parts started to come out wrong, and toward the end I couldn’t make a “there and back again” pair of moves in any of the axes and have it come back to the same place.  The thing still moved, but in essence it became useless as a machine tool.

Digging into the electronics indicated that there was a problem in the high voltage power supply.  But as with most problems, that was just the symptom rather than the cause.  Digging deeper, it became apparent that the mill’s electronics weren’t designed well in terms of heat extraction.  Over the years they had run a little too hot a little too often, and things were starting to fall apart.

Despite what people may believe about computers, heat doesn’t instantly kill electronics.  But it does reduce its expected lifetime.  Every electronic assembly carries with it an expected mean time between failures, or MTBF.  It’s been a while since I’ve done an MTBF search, but once upon a time most hard drives had an MTBF in the several tens of thousands of hours.  Running a hard drive hot wouldn’t instantly kill it, but it would reduce the expected time before failure for that individual device.  A well-treated drive might have an MTBF of 20,000 hours.  One that was in a computer with a busted cooling fan might have its TBF reduced by a factor of ten or more.

Which is essentially what happened with my mill controller.  The big electrolytic capacitors in the high voltage power supply had cooked.  And chances are the FETs in the motor drivers were cooked as well.  Everything was suspect.  So I either faced a whole string of test-and-replace operations, with the certainty that it would fail again unless I re-designed the case and cooling fan layout, or I could skip all that and replace the whole mess.

I chose the latter option.  But not having the money readily available, I couldn’t actually make good on the plan.  So the mill sat.  And sat.  And sat.

Then the miraculous happened and I got a bonus at work.  Ever since I first bought my lathe and mill, my wife and I have had an agreement:  Bonuses are bonuses.  Half goes to the family accounts, but the other half goes to the individual who earned the bonus so they can enjoy the fact that they were rewarded for good hard work.  This is how my mill was purchased in the first place, and this was exactly what I needed to get it back up and running again.

I knew the controller I wanted: a Gecko G540.  It’s a beautifully engineered piece of electronics capable of driving four stepper motors at up to 48V at 3.5A.  My motors weren’t a great match for it, but I knew I could replace those later.  The G540 is just the driver electronics, though, so in addition I knew I’d need a power supply.  And a case.  And a cooling fan.  And an E-stop switch.  And a power switch.  And a whole host of other doodads that seem simple but add up fast.  In the end I skipped all that and picked up a G540-based controller from Keling.

But Keling is in China, so while the unit was shipping I had some time to think through everything else I wanted to do.  Since this constituted something of a “do over” from the standpoint of my mill, I made a list of annoyances, both major and minor, and started work.  The list is by no means finished, but here’s where it stands now:

  • Cleaner – At one point I switched to a coolant/lube that did something I’d never run into before.  Even better, I found there is a name for it: “varnishing”.  It had a tendency to cover everything in a nice layer of oil (a good thing for a machine tool!) and then dry out to a hard, tacky film.  This is other-worldly bad for tools.  I took the whole mill apart, cleaned everything to bare metal, and re-assembled it with good quality way oil on every moving part.  The goobery coolant/lube is now gone.
  • Storage – My mill work area has been horrid for storage.  So I ran an eight foot shelf across the top of the mill and lathe bench, and moved a number of tools that had previously lived underneath the mill bench to the shelf.  This keeps them clear of swarf, coolant, and other crud that seems to happen to everything below benchtop level.
  • Lighting – The lighting around the mill, and to a lesser extent around the lathe, has been gawdawful.  I mostly work in the evenings, but I can’t turn on the full lights in the shop once my kids are in bed because they can shine in their bedroom window.  I picked up some under-shelf kitchen LED lighting, and got a nice spotlight set up that points at the mill spindle.  These are switched from the same switch unit that powers on and off the mill controller.
  • Cables – The cables on the original mill motors were very short, and of uniform length.  Which makes sense from one standpoint, but was painful when trying to locate the mill electronics.  The one place that really made sense to mount the electronics was on the mill’s work surface.  Which is a terrible idea when it comes to keeping flying metal out of the cooling fan.  (Hm!  Now I know why there was such poor ventilation on the original controller!)  I installed longer cables that let me put the electronics on the shelf over the mill.
  • Computer – I’m still not where I want to be with this, which would be to run my mill using Mach3 controller software.  But I got a new installation of EMC2 on a faster computer, so my pulse stream to the mill’s motors should be cleaner.
  • Way covers – The mill moves things around using big stepper motors attached to lead screws.  If metal chips or coolant gets on the screws, it can seriously mess them up.  The way covers I had were basically plastic sheeting.  I replaced them with rubber accordion way covers from Little Machine Shop.  It’s a vast improvement that’s hard to appreciate unless you’d spent almost ten years using plastic sheeting.
  • New controller – The Keling G540 controller finally came.  I plugged everything in, set up EMC2 to use it, and away it sang!

One of the big drawbacks with the previous controller was that it did nothing to address something that happens with all stepper motors: midband resonance.  Every stepper motor on the planet acts like a wheel with a detent spring holding it in place.  To move the motor, you move where it wants to detent to by changing the configuration of the magnetic fields in the motor’s coils.  But it’s still acting like a shaft on a spring.  If you make the motor move to the next step by changing the configuration of the magnetic fields being generated by its coils, the motor will very quickly accelerate toward the new position, and decelerate once it hits it.  And it’ll bobble back and forth (very quickly and with very very small moves) kind of like a car with bad shock absorbers will bounce around if you jump on its bumper.  The real catch with this is that at a particular speed, you wind up hitting a harmonic of that bobble frequency, and the motor will resonate.  Typically this results in lost steps and lost position.  And the really unfortunate thing is that this happens at a low speed that you really do want to get past so it can run at high speed.

The G540, in addition to being a 10 microstep driver, also compensates for midband resonance.  So when I said I plugged everything in, set up EMC2 to use it, and away it sang, it really did sing.  The mill is quieter now, doesn’t hit that “growly” sound as it accelerates up to speed, and has no speeds at which it can’t really operate at all.  This is a massive contrast to the way things were.

My mill still isn’t 100% ready for prime time.  There is still some work to be done like adding home switches, installing relays and outlets in the Keling box for spindle control, getting the VFD output from the G540 to drive the Digispeed I’ve got on my mill’s spindle motor so I have closed-loop spindle speed control, and a whole host of others.  But much of that is in the category of “want” rather than “need”.  It can wait.  For now, I have a mill that’s almost ready to go.  I expect the first of the new parts will be coming off the mill this weekend.  Quite frankly, it’s overdue.

– Tom

Posted in Electronics, Engineering, Machining | Tagged: , , , , , , , , , , , | Leave a Comment »

Photosynth from a Kite – Take II

Posted by Tom Benedict on 16/06/2009

Last Saturday I returned to Kiholo Bay to make another attempt at taking a set of pictures specifically for making a Photosynth of the area.  Unfortunately the wind was much lighter than I was expecting, so the first hour was spent almost entirely with my rig on the ground.  The 6′ rokkaku I use for the bulk of my light wind flying stayed up the whole time, but the launch of the camera itself was delayed.  The wind did pick up later, however, and I got several hours of flying time in before the sun and the fact that I’d missed lunch by over an hour and a half finally drove me away.

Because of the shorter time table, I didn’t get to do everything I’d planned.  The first four passes, in particular, had to go.  But in the end I think this worked well since I’m not convinced they were necessary, or would even make for a good synth in the end.

Instead, I used a prototype autoKAP controller to take almost all the pictures used in the synth.  The prototype is loosely based on some code I had written for the Atmel ATmega168 microcontroller a few years ago, but it’s being developed for a much better, much more fully-featured controller that’s currently in the works.  Unfortunately I’m not at liberty to speak further on that subject, but it’s moving along.  Soon… soon…

The idea behind it is very similar to the idea behind the Gigapan camera controller:  Orient the camera through a series of tilt and pan angles so that the resulting images have good overlap, and can be stitched together into a large panorama.  Only in the case of Photosynth the idea is to get good overlap between pictures so that the viewer can look in any orientation from that single vantage point.

But this is where the requirements for Photosynth and the requirements for a panorama diverge:  In order to make a good synth, it’s not enough to have good overlap with adjacent images.  Images of the same part of the subject also need to be taken from different vantage points in order to provide parallax.  It’s this that lets Photosynth generate its 3D representation of the scene, and find all the spatial relationships between the individual frames that go into the synth.

In the case of the Kiholo Bay Inlet I started at one end and flew the camera up to a good working height, about 200′ above the ground and almost on the other side of the pond.  Once there, the camera took a hemispherical set of images, three images high and about 12 images around.  As the camera panned around to its starting point, I walked about 50-100′ along the pond and stopped so that another hemispherical set of images could be taken.  This process was repeated until I reached the end of the pond.  About this time the camera’s chip filled up, so it was time to switch.

The second pass was made at a much lower altitude, closer to 75-100′ above the ground.  I also moved back as far as I could toward Kiholo Bay, putting the camera over the near shore.  A similar set of hemispherical images was taken at several locations along the near shore, and at the lower altitude.   And again, about the time I finished at the last position the camera’s chip filled up.

All in all I took over 1200 images this way.  After rejecting images with large percentages of water, the few blurry frames that happened when I was taking in or letting out line, or frames that couldn’t be tied directly to another frame, I was left with about 860 images.  These went into the Photosynth software.  The result can be viewed here:

Kiholo Bay Inlet – Kite Aerial Synth

One surprising outcome of this set of pictures is that it did a better job of covering the area than the set I took the previous week where I was in manual control of the camera and rig.  This is mostly due to the brute-force effectiveness that autoKAP has of taking so many many pictures.  Even as I was going through the pictures and culling out the ones that wouldn’t work well with Photosynth, I was taking notes on which photographs to revisit from the standpoint of traditional still photography.

Paddlers Heading Out

There was a lot more activity at the pond this weekend than last, so I had some opportunities to photograph different groups of people kayaking, paddling, swimming, or in my case, flying a kite.

Wainanali`i Pond Mouth

I also had my first really successful picture of the mouth of the inlet where it connects to the sea.  The clouds and sun cooperated this time, and I was able to get some pictures that did a good job of indicating the depth of the water, the width of the channel, and the reason why tidal flow really doesn’t cause a great deal of mixing in the water.

Honu Swimming I

But my favorite part, by far, was the honu.  And this is where the limitations of autoKAP make it less than ideal.  Because the camera is moving on its own, it’s difficult to do intentional wildlife photography with autoKAP.  I’ve done plenty of serendipitous wildlife photography this way, but without some ability to aim the camera in a particular direction, making pictures of particular subjects is difficult. The handful of honu pictures I made that day were all done with the rig and camera under manual control.

Most animals, sea and land alike, don’t spend a lot of time looking straight up.  Once the kite is in the air and the camera has been lifted to a good working height, for all intents and purposes it’s invisible to creatures on the ground.  In this case the camera was roughly 20′ off the ground, and because of the line angle I was about 40′ from the honu.  As far as it was concerend, I wasn’t there.  I’m often asked if I use some sort of a video feedback system to see what the camera sees.  I’ve been tempted, but so far I haven’t strictly needed it.  A KAPer can develop a sense of where the camera is and what it’s pointing at, even without video feedback.  In this case, once I knew the kite and rig was flying well and wouldn’t do anything unexpected, I positioned the camera above the honu and off to one side, and started taking pictures as it foraged on the rocks.

At some point I’ll return to Kiholo Bay just to take pictures of the honu.  But this trip was all about the synth.  Having it come out as well as it did really put a smile on my face.


(Note:  I have been calling the Kiholo Bay Inlet by the wrong name: Wainanalii Pond.  This is how it is commonly labeled on maps, hence my mistake.  But during a conversation with Bobby Camara, he pointed out that the village of Wainanalii is a two hour canoe ride to the north of Kiholo Bay, and that it was destroyed by the same lava flow that created the inlet.)

Posted in Electronics, Hawaii, Kite Aerial Photography, Photography, Photosynth | Tagged: , , , , , , | Leave a Comment »