Introduction: ZAPpelin, or How to Train Your Blimp With an Arduino and IR Remote
No it's a ZAPpelin, an Arduino controlled indoor blimp, setup to learn in the signals from an IR remote to command it.
This project came to life at the third Arduino Jam Februari 15th to17th 2013, at Timelab, Ghent, Belgium.
Our team consisted of:
The main challenges we set ourselves:
- Keeping the weight down. The Zappelin should be reasonably small to be used in a living room.
- Keeping costs down by using an ordinary "TV style" IR remote most of us have lying around at home. (the high inertia of a blimp made this possible).
- Using the advantage of an Arduino over standard modelling RC equipment to use an alternative propulsion concept.
Here's a video of the ZAPpelin in action:
If you like this Ible, please give it your vote. Thanks!
Step 1: Parts and Materials:
For a DIY Arduino board:
• 28-pin DIP IC Socket
• 16MHz crystal
• momentary push-button (optional)
• 10 k0hm resistor
• 2 x 22pF capacitors
• ATMega168 or 328 microcontroller chip
• breadboard style perf board
• a row of 6 female headers
• some thin wire
• we used a PNA4602 type (as the ones Adafruit)
Hardware to program:
•USB to UART converter
•Arduino board (used as ISP for changing fuse bits)
Any "TV style" IR remote control. We used an Apple one, but other worked too.
•Arduino 1.0 (or later)
• Two ultra micro servo under 2.5g (a regular type, not linear ones). We used a so called HK-5320 1.7 g servo, which actually weighs 1.9g with wires and connector. It turns out these have alimited mechanical range of about 100°. The slightly heavier (actually 0.5g heavier). HK-282A does have a 180° mechanical range, and would be my choice for a new build. I was not yet able to determine the mechancal range of the intermediate (in weight) HK-5330.
• Two extension leads with connectors compatible with the servos and one for the battery (the Hobby King servo connectors are compatible with the common “minium battery connectors”)
• A 1s LiPo battery around 2.5 to 4g. Obviously you will need a suitable charger (not shown).
Balloon and helium:
• You can have your ballons filledat the balloon shop for a couple of euro or bring home a helium bottle (rented or bought, around 50 EUR for a canister + 50 balloons).
• The lift capacity of the balloon needed depends on the gear used. It should be about 20 to 25 g. Our first attempt was based on my favourite Zeppelin NT Mylar balloon carrying a good 17g. The Zeppelin NT blimp balloon can be ordered from Deutschen Zeppelin-Reederei GmbH (you can find it by clicking klick on "Produktubersicht", choosing "Accessoires" and scrolling down).
• To add an extra control function we needed more lift and added a latex balloon. Depending on temperature and moisture a latex balloon will last longer or shorter. The spare buoyancy needed for this project lasted roughly a day.
Remark: with an Arduino pro mini 3.3V we would have saved about 5 g and this would not have been needed.
For the fins:
• Some EPP sheet (Expanded PolyPropylene), 3 mm thick. We used a triangle with two 22 cm long to start with.
• Three times about 5cm of 0.8 to 1mm diameter carbon rod.
• a piece of extruded polystyrene (Depron or similar), 3mm thick, 35cm long, 5cm wide.
For assembly and trimming:
• Some sewing thread.
• Scotch tape.
• A couple of grams of putty, to be used as trim ballast.
• A precision soldering iron and solder
• A scale accurate to 0.1g.
Step 2: Making a Lightend Arduino Board + Changing Fuse Bit
We built a simplified perfboard Arduino. Something like this, but without voltage regulation, and a minimum of connectors. The row of headers is for power and uploading with an FTDI USB to serial cable.
The IR sensor is connected to Pin2 (input), Ground and VCC.
An Arduino pro mini 3.3V would be a ready made solution. Instead we built a minimal Arduino board and made it work on one LiPo cell (3.7V). The standard brownout voltage (low battery switch off) was below that value, but takes in account such a large margin that it didn’t work without changing it to a lower value.
We set it to 1.8V using avrdude.
To set the brownout voltage to 1v8, we have to reprogram the extended fuse bit.
First, make sure your arduino-board is functioning and the chip has the bootloader on it.
Then upload the arduino as ISP sketch on another arduino board (in this example, Arduino Uno)
Now, wire up the arduino board with your own board like shown here.
Now, install winavr. (Search on google or click here)
Go to cmd and type this line of code:
avrude -p m328p -c avrisp -P COM3 -b 19200 -v
Change m328p to m168p if you are using an ATmega168.
Change avrisp if you aren't using an arduino as ISP to your own ISP
Change COM3 to the COM port where your ISP is connected to
As shown in the picture, you can now read the fuse bits.
Standard arduino fuse bits are:
lfuse = 0xFF
hfuse = 0xDE
efuse = 0x05
We need to change the efuse to 0x06.
Type the following line of code in cmd to do this:
avrude -p m328p -c avrisp -P COM3 -b 19200 -v -U efuse:w:0x06:m
Again, you have to change this line to your own situation.
If everything worked out, the ATmega chip should be ready to handle lower voltages.
Step 3: Testing in Preparation of the Sketch
We first determined the range and speed of the used tiny servo's with a classic sweep sketch on an Arduino Uno.
Unfortunatly, the tiny servos can only use values from 25 to 145 (instead of 180 normally achievable with Arduino commands), and in reality the corresponding range is only 100° (instead of 120° as expected. Dismantling such a servo showed the tiny potentiometer has this limited range. So there is not such a simple solution as changing the mechanical stop on the servo output axis. So we had to do with this range, but that worked out OK.
Step 4: Fins
The carbon rod is attached to the servo horn with some sewing thread. After tying down, the thread is soaked in super glue for a stiff attachment. Excess thread and horn ends are cut, to allow for free movement of the horn later on.
The carbon rod is attached to the tail fin with some tape. Align carefully, so the fin will be perpendicular to the servo and fix in place with some drops of superglue where the rod protrudes from the tape.
We made the fins pretty large to start with to allow for trimming. The surface was finally almost halved. It was also clear the carbon rod stiffening the fin shouldn't be to long (first the rods were 8-9 cm instead of about 5-6 cm).
The servo horn is carefully bent to keep the fin away from the body of the blimp.
Step 5: Assembly of the Zappelin
Mounting the parts on the balloon is all done with scotch tape. The board gets a backing in EPP sheet to brotect the balloon from the sharp component ends on the back of it. Also the servo's were isolated from the balloon with some foam, because the tiny servos can become quite hot in use.
A first test was made with one fin on the bottom. This allowed a limited control similar to my nano air swimmer.
Adding a latex balloon as a "head" (simply attached wit scotch tape on the knot) made room to add a second servo and fin. The two fins were put on the side, pointing downwards in neutral position.
Unfortunatly, the tiny servos used have a range of only about 100° (instead of 180° normally achievable with Arduino commands) so full backwards or forwards flapping is not possible. But, as upwards thrust is to be combined with any movement, this proved workable.
To get enough stearing response we did need to put the fins more outwards (larger lever arm). So we put them on a light beam (the length our extenson leads allowed, about 34 cm in total). The beam was from Depron (extruded polystyrene sheet) and scotch tape
Step 6: The Sketch
We use a sketch in two parts:
one for reading/learning in a IR transmitter
one for flying
Click on the end of the page to download the ZIP file that includes the sketches
First, we used the sketch called IRsniffer to "snif" the IR pulses coming from the remote.
You have to connect a usb to serial converter to the arduino board.
First, press the key a on your keyboard.
Then, press the button on the remote you want to program.
You have to copy the IR data code from the serial monitor to the IRcodes.h file in the right command(forward, backward, ...).
And, That's all!
Then, just upload the final IRcommanderservo sketch.
Disconnect the usb-serial converter.
Plug in your battery and...
Here you see a demonstration on how to program a new IR remote to the ZAPpelin
Step 7: Flying
As usual with RC blimps the weight is trimmed (with putty) till it slowly floats downwards.
Flying is done with the following functions
Forward + up
Backwards + up
left + up
right + up
Everything off = down
The weight is trimmed so any movement brings a slight upwards moment. The time of the intervals you chose to stop all movement is used to level out the flying altitude.
We enjoyed spending a lot of time trimming the servo parameters for each movement, to optimise the control for use in small spaces.
Step 8: Some Ideas on Further Work:
The IR response could be improved in the sense that it would be good if 'is faster. That way the intervals between servo commands can be shortenned.
Making the learning completely "self contained" in the Arduino, thus without connecting to a computer would be handy.
Switching to an ATtiny would reduce weight and cost.
A helium friendly battle blimps version could be made by adding an IR transmitter (with some barrel to make it not to easy). When a blimp is "hit" by a shot it falls "dead" for some time. Of course battling with needles on the nose is more spectacular, but it waste a valuble natural source: helium.
We have a be nice policy.
Please be positive and constructive.