Categories: all aviation Building a Biplane bicycle gadgets misc motorcycle theater

Fri, 27 Jun 2014

Finally: The Delivery

Note: pictures are on the way, check back in a few days

I found myself unemployed early this year, and so when a friend approached me about a job to build a kind of odd mechanical thing, I was receptive. "So, money, you say?" I said, Zoidberg-like. Plus, it sounded like a very interesting commission: build us a miniature version of the ball-drop they have in Times Square, which takes 60 seconds to go from the top to the bottom, making it a perfect countdown to New Years.

This version would be about 8 feet tall, and miracle of miracles, he had a real budget for me to work with. I said yes, of course. Someone willing to pay me to weld and build a weirdo device? No question.

So, I was off into the planning stage. It would be made of steel pipe! With a disco ball! And maybe one of those cheap Harbor Freight hoists providing the motive power! I called upon my friend Alex (possessor of welding know-how and a similarly slightly-mad genius for all things mechanical and off-beat) and we spend a couple of hours batting back and forth design ideas. We eventually settled on a steel mast with the hoist mounted at the base; the hoist cable would run up the inside of the mast to a pulley, which would grab a cable draped across the top of two pulleys at the top of the mast. The ball itself would be mounted on a steel core, sized just bigger than the mast. It practically builds itself!

I then went window shopping, and came up with an estimate for Todd. It was nearly $2800 for parts and labor, and to his credit, he didn't even blink. "Sounds great!" he said. I triple-checked that everything was cool, then I went shopping for real.


An early drawing to establish scale and show the top-sign

One of the sticking points was the mirror ball. It seemed like such an obvious choice, but when I started talking to the mirror ball distributors, the word that came back was, "We don't recommend doing what you're thinking about doing." I was talking to them about cutting a 6" hole in the top and bottom of the mirror ball and installing my own core, so that the whole thing could move up and down the mast. But they were having none of it.

Interesting side-note: a 30" mirror ball is fairly easily available, and cost about $900 when I was doing my research. A 24" ball (which is the size I ended up going with) was about $350. They're made of fiberglass at that size (with a vast quantity of glass mirror tiles on them, they're quite heavy), and have a stout steel rod that runs from the north pole to the south pole. The sticking point was some variety of either 45° or equatorial stay that would mess up my "cutting a big hole" plans. No one ever described it beyond that level of detail.

So, I threw my hands up in the air, and sought other options. I considered and discarded a 24" styrofoam ball, and eventually found an acrylic sphere at a place called California Quality Plastics. A mere $200 (plus $44 shipping) later, and I had my ball on the way. I found a fantastic material made by Rosco (who I know for making colored gels for theater lights) which is a 15 foot long roll, 24" wide, of little half-inch sized circular diffraction spots -- like a sheet full of tiny, dime-sized CDs. It's even adhesive backed, making it perfect for my use.

In the mean time, I'd retrieved my steel bits, picked up the hoist, and ordered the surprising amount of electronics I was going to stuff into this thing. I'd had this great idea: why not add an embedded controller (I'm getting all giddy over embedded hardware these days) so that the control would be a dead-simple, "Push button, it moves the logical direction," type control? I thought about it, and realized that it would be very simple to create: you just need a limit switch at each end of the travel, a user pushbutton, and some relays.

I sat down and wrote the code using my now-favorite method of test-driven development, and in a few hours had it done. I consulted with my dad on the electrical gubbins of the motor control, and he suggested adding hard logic external to the microcontroller so that even if the controller freaked out, the limit switches would kill power to the motor. We decided on solid-state relays, which offer a number of advantages over mechanical relays.

The next step was to take Alex up on his offer, and go over to Bainbridge Island to do the welding. I loaded up the truck, and got on the ferry. Eight hours of cutting, drilling, grinding, and flying sparks later, we had our bits ready to go: one 8' mast, one base plate, one ball carrier, and one somewhat complicated-looking mast topper, with pulleys and a little frame on which to mount the top sign. It's amazing what you can do with an angle grinder and a MIG welder.

Once I got home with the finished pieces, I had to puzzle through how to mount all the electronics and the hoist together. I'd gotten a piece of the thickest plywood I could find to use as a base. The plan (which worked as well as I might have hoped) was to cut the sheet in half for a 4x4' base piece, and use the rest to make a box which would fold down over the motor and control board. I sized the box to be a bit too big (good thing), and it all fit in with a bit of Tetris-inspired thought.

I put a lot of thought into how to make this thing as safe and foolproof as possible. So the microcontroller program is designed with a bunch of failsafes built in, it has external logic that will force the motor off, there's an internal circuit breaker, and a big red kill switch. In addition, the user interface (a single button) is designed to be as simple as possible: no matter where the ball is or what it's doing, the pushbutton does the logical thing. If the ball is sitting at the bottom of the mast, the pushbutton starts it going up. If it's at the top, it start going down. If it's moving, the button stops it. If it starts again, it's going the opposite direction it was previously going. The limit switches make sure the motor can never be switched on in the wrong direction.

Everything seemed to be going perfectly. I had the contraption assembled, and had run it up and down the mast a few times with no problem, and my girlfriend arrived, so I eagerly showed it off to her. "Voila!" I said proudly, and pressed the button. The ball didn't move. The motor made the loudest buzzing noise I've ever heard. I slammed down on the emergency kill switch, puzzled. I tried again. Buzzing. Kill switch. Again. Buzzing. Kill switch. Huh.

There followed a distressingly long period of time in which I was utterly baffled. Multiple phone calls with my dad (an electrical engineer in his working life, and vastly ahead of me in all electronic knowledge), testing, thinking, testing again. All seemed to come to naught. My pace faltered, and I stopped working on the project as some more immediate things came up. But it was a looming presence: I was being paid for this, and the deadline wouldn't move. It had to be done in time for the Pride parade, on June 29th.

Finally, I had some time again (having in the mean time applied my sparkly stickers to the ball, created a slightly cheezy carrier for the ball itself, and figured out the mounting of the ball to the core), and tried to tackle the problem methodically. Of course, the only place I could set this thing up, being so tall, was outside, and of course the weather didn't particularly cooperate. There was a several-week period where I had a big tented blue tarp on my deck as I waited for breaks in the weather. Putting it up and taking it down is enough trouble for one person that I wasn't eager to do it more often than I had to.

My methodical testing didn't seem to be going all that well. The problem was that apparently at random, the motor would go into this buzzing state. In discussions with my dad (who researched and figured out the circuit I was trying to replace with my control system), it seemed that the motor-run capacitor wasn't getting switched on correctly. I replaced the solid-state relay, but that didn't really change anything. I checked and re-checked that it was getting the signal it needed to switch on. I confirmed that it was failing the way we thought it was.

Finally, it was just idle, disconsolate fiddling that uncovered the problem: I noticed that the buzzing only happened some of the time, specifically when I stopped the ball mid-mast, and tried to start it again. If I let it go up to the top or down to the bottom (thus hitting the limit switches), it almost always restarted with no problem. Of course I could take out the feature of being able to stop and restart mid-run, but that seemed silly. I stared at the logic schematic, and it hit me: if the ball went to one of the limit switches, the external logic instantaneously shut off the up or down switch, but the microcontroller took a little bit longer, maybe 5-10 milliseconds, to shut off the capacitor switch. That must be what was making it work.

This didn't entirely make sense, of course: the control switch Harbor Freight ships with the hoist certainly doesn't have a 5-10 ms delayed action anything going on. It's just a switch. The whole thing costs a hundred bucks. There's nothing fancy going on. However, I modified the circuit so I could separately control the capacitor, and as soon as I started switching it off a little bit after the up or down switch, the problem disappeared.

I called my dad to explain my solution, and we figured out what's really going on. The solid-state relays (awesome cool devices that they are) have a thing called "zero crossing switching." What this means is that the SSR waits until it sees the AC voltage crossing up or down through zero volts (it swings between +120 and -120 volts (actually +170 and -170, but that's a different topic) 60 times a second) before it switches on.

A capacitor, for the purposes of this discussion, can be thought of as a sort of instant-charging battery. It takes a fraction of a second to reach a full charge, and a fraction of a second to dump its charge, but it will hold onto a charge for quite a while -- one of the dangers of working on CRT televisions is that the giant capacitors they use can remain charged and dangerous for years.

Well, when you have any voltage, it has to work against some reference to actually be a voltage, which is what ground is for. The difference between ground and your hot line is what voltage is. So, AC power should be going -120 to 0 to +120 to 0 and so on. But if there's a capacitor between ground and your hot line, the capacitor can effectively float up the whole equation so that (for instance), the AC signal could look like it's going from 0 to +120 to +240 to +120 and back to 0 before starting over. It's still swinging over the whole range it's supposed to, but bumped up relative to ground. So, and this is the important part, it never crosses zero.

As you may recall, my solid-state relays have a feature called "zero crossing switching," which prevents them from turning on until they see the voltage on the AC line cross zero. If the voltage on the AC line goes from 0 to +240 and back, then it never actually crosses zero.

Capacitor discharged Capacitor half charged Capacitor fully charged

One of the clues that helped me find the problem was that I would connect the capacitor switch manually, and hear the motor make a little clunk noise. This supported our theory: by leaving the capacitor connected a little bit longer than the up or down switch, the capacitor had time to discharge into the motor. Then, it wouldn't be charged next time the motor got switched on, and the SSR would see a zero-crossing, and switch on like it should. Of course the stock control handle never had this problem: it's a mechanical switch that cares not for zero-crossings. It will switch the capacitor on, no matter its state of charge.

Once we finally figured this out, it was a huge load off my mind. I was dreading the problem, because I knew it would come out at the least opportune possible time. The ball drop is destined to live on a parade float for about four hours, and I just knew if I didn't solve the problem, it would crop up somewhere mid-parade. Obviously not acceptable.

In the mean time, as I mentioned earlier, I had sorted out the ball itself, which was more trouble than I'd expected. The first problem was that it wasn't quite the twenty-four inches in diameter that CQP had promised me. It was, in fact, more like twenty-two. Not a huge deal, except for the fact that Alex and I had carefully welded up support arms onto the ball core to fit, you guessed it, a 24" ball. It hadn't arrived by the time we were welding, so there was no way to measure it and know its exact size for sure. Not having any welding equipment myself, and being unwilling to dedicate another day to crossing over to Bainbridge and back, I decided to take the easy way out: I cut the extraneous two inches off the bottom of the ball core, and made up wooden blocks to support the bottom of the ball.

Applying the diffraction sticker was also troublesome. The sticker material wasn't stretchy at all, so getting it to fit on the compound curve of the sphere would be a bit tricky. I ended up cutting a ton of 2" squares of material, and applying them one at a time. Fortunately, this allowed me to take in-progress shots that looked like the Death Star under construction, which was pleasing in its own way.

With all the big problems solved, I took the whole thing apart and applied a coat of paint, and the mini ball-drop was nearly complete.

The final touch was to design and build the top-sign. Todd and I had decided on a cylindrical sign, so I made up a graphic file with horizontal rainbow Pride stripes, and the words "Getting to Zero" arrayed across it (the Lifelong AIDS Alliance, for whom this thing was being built, has the theme, "Getting to Zero Cases of AIDS" for the parade this year). After some back and forth with the local FedEx Office store, I got the graphic printed on styrene, which I epoxied to the plywood disc.

Thus, it was with a fairly substantial sense of accomplishment that I loaded everything up in the truck, tied it down, and carefully drove to the Lifelong headquarters on Capitol Hill to drop off my crazy creation. Todd and I set it up according to the steps I'd laid out in the User's Guide (for what crazy contraption can be considered complete without a User's Guide?), and it is even now set up in the Lifelong offices, awaiting the arrival of their rented flatbed truck for the parade on Sunday.

Having done all this, I'm hooked. I want to do more. I'd love to be able to make a living off doing this kind of thing (although I am practical enough to know that I probably can't). Building crazy contraptions and props and learning how to weld and build better embedded controllers.

This was the first official Dangerpants Industries project, and I'm definitely hoping it won't be the last.

Update: I helped Lifelong set up the Ball Drop on their float Sunday morning, and we discovered that, when hooked up to the generator they were using to power their sound system and the Drop, the hoist motor ran slower than when it was connected to wall-power. The problem? My controller cleverly included a 7.5 second cutoff so that if the motor was on too long (such as if a limit switch failed), it wouldn't destroy itself. The traversal had previously been almost exactly 7 seconds, but on the generator, it was more like 9 or 10. So the ball stopped about a foot short of the top of the mast at 7.5 seconds.

After all that work on the control system, they ended up having to use the manual control after all: I'd forgotten to bring my computer with me, so I couldn't reprogram the limit. It's a simple change in the code, but without the computer handy (it would have been a 40+ minute round-trip), there was no way to fix it. I hadn't anticipated that the generator power would cause the motor to change speed so much.

The lessons from this? Always bring the computer if the project is field-programmable, and always test using the actual setup as much as possible. Fortunately, my contingency planning was fine, and there was no practical problem.

Posted at 15:00 permanent link category: /gadgets


Categories: all aviation Building a Biplane bicycle gadgets misc motorcycle theater