Skipping right to the big topic - LENSE is still out there somewhere. I haven't gotten any responses from any radio stations to my perpetual emails...however as soon as i can (within the next few weeks?) i'm going to try and drive out to Toppenish and look around. For now i'm very busy working on an exciting VEX robotics team 917K and Team Top Gun for FIRST Robotics. My microquad project will continue as soon as LENSE is wrapped up - i'm putting off having to purchase $150 of sensors again (they shared the same components and PCB). There is also a definite Tesla coil in my future - maybe a 3000-lb electromagnet as well!
I received the Rev 2.1 PCBs from Advanced Circuits. Most beautiful PCBs i've ever seen! Well, that I've designed myself... Anyway, I had to order a new set of ultra low dropout regulators since I lost the first ones I ordered - literally tore apart my room trying to find them. A fresh MPU-6050 Rev C silicon and fresh BMP085 also got soldered on. Going to get ahold of some Amtek solder paste (per recommendation of Limor Fried, Ask An Engineer). Speaking of which, I won a Chumby NeTV on the trivia question! Arrived yesterday, will upload pics/post soon. Erik Noren will be next to win (thanks for the karma). Back to the PCBS, I hooked up the LDO, had a bit of debugging to do with some pesky capacitor shorts, but now that everything is talking it's time to get started on the code. In the payload I'll have to interface to the MPU6050, BMP085, HMC5883 (all I2C), Adafruit Ultimate GPS versions 2 & 3, Copernicus II GPS, SFE OpenLog, and the ERA900TRS radio (all RS232). The box interior can be incredibly small, only 5x5" because i can stack all the electronics pretty tightly. Batteries will be 3 Energizer Ultimate Lithium cells (3000mah = at least 24 hours of continuous operation).
From top left clockwise, Ultimate GPS v2, OpenLog, V2.1 PCB, Rick Winscot's EasyRadio breakout, and Ultimate GPS v3.
Copernicus II GPS on the bottom
I have mentioned before that the controller for my MicroQuad project doubles as the controller for my high altitude balloon project. Since I have set a launch date for early September, I have decided to put aside the quadcopter project for the next few weeks and focus on the launch. That said, I have been revising my PCB and finally received some new ESCs and props from HobbyKing, some 2.5x1 props and 4 more ESCs to replace the hokey ones I've got. Changes to the PCB include:
- Removal of the TPS61200 boost converter. It never played nice with my other components
- Removal of the USB hosting port. I decided to use a very small bluetooth module instead
- Addition of the TPS73233 ultra low dropout linear regulator. 3.3v, 250ma, and 40mv of dropout
- Addition of the OSHW logo! I'm going to get these files on GitHub soon.
- Fixing the MPU-6050 layout. I had a capacitor on the charge pump that wasn't working correctly and some mixed up pins.
- Fixed/new GPS chip antenna layout. Running antenna feed lines through vias isn't a good idea. I decided to mount the antenna on the bottom of the PCB, as if it was radiating into the ground. But, I cut a slot underneath it and mount the radiation pattern showing through the slot and up towards the sky. This should give a better signal.
When i order Rev 2.1 I also want to get it from Advanced Circuits instead of SeeedStudio. Hopefully it will take less time to get the boards back. Also, I'm waiting on some 50 ohm coax cable I should get on Monday, there will be a big post about that!
Tons has happened! The revision two board is much smaller, 1.5" square and packs the Trimble Copernicus II GPS with chip antenna, HMC5883L Magnetometer, MPU-6050 gyro/accelerometer, BMP085 barometer, 5 PWM outputs, 17 IO pins, USB host capability, data logging, and weighs in at 4 grams fully assembled. The TPS61200 boost converter on board also supplies a solid 3.3v over the full range of the LiPo. Additionally, since this board will be used to test the Ultimate GPS from Adafruit and is compatible for my high altitude balloon projects, Adafruit sent me one of their Ultimate GPS modules to test! It sports unlocked altitude, 1ohz update rates, 25ma of tracking power consumption, onboard data logging, and much more for only $30! Also, through Adafruit's awesome Show-and-Tell podcast on G+ I go on occasionally to update them, Rick Winston agreed to send me a few wireless modules from EasyRadio. If i use a sensitive antenna i should be able to get enough line-of-sight range out of them, and 900mhz should be a quiet band with reasonable data rate. Thanks Rick!
Now for the negatives: the TPS61200 short circuits when the GPS is connected, probably due to RF interference off the inductor, so until i can get that fixed I might move to a 50mv dropout LDO. To make matters worse, after a month of trying with the MPU-6050 and Jeff Rowberg's I2Cdev Library, I still can't get sensor data out of the device. It is Rev A silicon, so I might need to replace it with a Rev C current one, but the MPU9150 is going to be released soon and it has a fully integrated 9-axis sensor array. I have been successful in talking to the barometer, GPS, OpenLog data logger, and the Ultimate GPS. Finally was able to order another set of props and ESCs as well. It's about time Hobbyking.
Oh, and my 1200 gram balloon from Kaymont arrived a few weeks ago. Adafruit was kind enough to post about it.
The Adafruit Show and Tell yesterday.
Just a small note, QwertyBoyDesign based his quadcopter project off of mine, you can see his blog here.
Below are a few photos of the most recent board.
I've done a lot since the last update. The motors are working well, as are all the ESCs, but I have been tackling a noise problem with signal crosstalk. Through lots of troubleshooting and frustration, I swapped out the old wires for a color-coded twisted cable and added a 0.1uf capacitor for each ESC. This got rid of all the noise but several motors weren't responding. After checking all my connections, I re-soldered everything and found that the PCB is defective and one of the traces was ruined, leading to no signal contact. The new PCB should be here any day now, its been about two and a half weeks.
Speaking of which, the Spakfun PCB forum was extremely helpful for finalizing my design, I'll list the changes when they come in. The fresh Digikey and Sparkfun orders came in, this time with the single power regulator, a magnetometer, and GPS with antenna. Version 2 is going to be so much better, lighter, smaller, and more awesome than the first one with completely integrated control and inertial measurements on one thin, small board.
And now for the bad: Waiting for shipping is awful, as usual, and HobbyKing has been out of stock on the 0.3g ESCs for over 3 months now! I can't order replacement propellers either, since I broke one of those as well. Gahh!
Made a good amount of progress on controlling the Hextronik 2g motors with the 0.3g ESCs. As they are not designed for my purpose, it took a lot of tinkering around with the duty cycle and period of the PWM pulse to replicate a standard RC signal. That said, I was rewarded with a very satisfying and terrifyingly fast motor sweep from off to full throttle! In the process of troubleshooting I had one ESC completely lock up and not respond at all, so I'm definitely going to order another batch and another set of propellers very soon as replacements. Speaking of propellers, I got those mounted onto the motors using heat-shrink tubing and carefully boring out the prop holes. One propeller got destroyed (and my finger sliced open), but luckily I have one extra.
In addition, I finished routing the next version of my controller. Major changes include a board size of 1.5" square (as opposed to 2" of version 1), 6mil traces/spaces, 14 mil vias, 0.8mm board, an all-in-one buck/boost converter, the MPU-6050 and BMP085 on-board, no external temperature sensor, and a total of 17 GPIO. I still need to add the silkscreen and I might try to sneak in a magnetometer and "real" bluetooth module like the Roving Networks RN-41 if the USB dongle doesn't work out I plan to order from SeeedStudio who offers 10 boards of 5x5cm size from 0.8-2.0mm thickness for just $10! The base price also gets you a %50 electrical test, another $1o gets you a full test for only $20 total.
Seedstudio's FusionPCB service
How to set up your own 2.4Ghz SuperMicroSystems Brushless 0.3g ESCs
Next I'm going to try to communicate with all four motors, if all the ESCs work as they should.
First, an update on the MicroQuad project. The USB mystery remains unsolved, but for testing purposes we can just disregard the VCC connection as the ground connection on the USB cable is needed for reference, the VCC line is an optional power source. I posted to the SparkFun Electronics forum, lots of people chimed in to help me diagnose this problem. Most likely though, i was just doing something so subtly wrong I assumed it was impossible to make that error...guess we'll never know. While that mystery was building, I did complete a neat little charging box that integrates all four of my homebrew LiPo chargers into one unit, with a fan for cooling, and one power input. It was a REALLY tight squeeze in that tiny box, I practically cut away the entire casing of the little squirrel cage computer fan to get a nice press fit behind the center mounting post. Whoever decided to make the box close with a single screw right in the center wasn't thinking about how annoying it is to design around! In addition to squeezing the fan in, I had to resolder all the status LEDs at right angles so the chargers could be spaced and mounted vertically for optimal airflow. The fan sucks in air through top vents and blows it out the vents between chargers, also promoting airflow around the batteries should they get too hot.
I finally got around to getting the electronics up and running, but there are some discrepancies with datasheets and PCB errors holding me back. The PCB i received was missing the power-in trace to the boost converter, which I am having problems with as well. The datasheet for the SP6641A 3.3v boost converter says it can have an input of 1.5-4.5 volts and output 3.3v even. However, in practice it produces anywhere from 3.3 to 3.8v, enough to pop some parts on my board. To fix this, I plan to order the 5v version of this boost IC (drop-in replacement) and feed the output into the MIC5205 3.3v regulator. This should give me an even voltage across the 3.1-4.2v battery range. For V2 of the board, I want to make it smaller so less of it is under the propeller blades (maybe some smaller props are in order as well?) to increase efficiency and decrease weight. An all-in-one boost/buck IC will replace the two separate circuits as well.
To top it off, I the debugger can't connect to my PIC32 and I have no idea why. So is the life of an electronics engineer.
I’ve built catapults with garage door springs, locks with tiny wooden parts, taken panoramas of cities from mountains, captured the nose of Lincoln on the penny, and photographed the curvature of the Earth. Time for another small project! Quadcopters, are extremely stable versions of the classic helicopter. Sporting four blades instead of a main rotor and tail stabilizer and just four moving parts, they are an excellent platform for autonomous drones and cameras.
The four rotors are arranged in a “+” configuration, opposite motors rotate in the same direction and adjacent ones in opposite direction. This cancels out the gyroscopic forces tail rotors compensate for in traditional copters. Turning is only a matter of increasing the speed of a given set of blades so the rotational forces are unbalanced, inducing rotation. Translating is made possible by increasing the speed of the rotor that is opposite the desired direction and decreasing the forward motor so the thrust imbalance translates the helicopter. However, the total gyroscopic forces remain the same in each direction. This Wikipedia article has a great explanation if you want to know more.
I was inspired by the CrazyFly (great work guys!) for this project and decided to look into making a cheap, highly functional,expandable, palm-sized drone for my own enjoyment. From doing a little research, my initial requirements were:
- Fit in the palm of your hand
- Expandable to a full UAV with barometric, GPS, data logging, temperature sensors, FPV camera system. The do-anything pocket autonomous drone is the goal here.
- Give me an excuse opportunity to dive into surface-mount soldering and PCB design, update and meld it with my Balloon Control Board from the LENSE project. In this way the board pretty much allows me to use this board for a second launch. I also wanted to use all the same sensors from that project again (cheap!).
- Explore 9-axis attitude/heading/orientation computing.
- Give me an opportunity to get into RC and start programming my own toys (<- great word).
- Run on a single cell lithium polymer battery (easy to charge, no balancing, light)
- Be as light as possible (less mass = cheaper, less crash damage, portable)
- Be as cheap as possible.
Starting from scratch, there were several parts I wanted to include from the get-go. The MPU-6050 evaluation board from InvenSense I have left over from LENSE sports a 3 axis magnetometer, 3 axis gyro, and 3 axis accelerometer that can be accessed through a simple I2C bus and a few other pins. This board is a scant 4.3 grams! For further expansion, I wanted to integrate the new Copernicus II GPS from Trimble, the BMP085 from Bosch, Sparkfun’s OpenLog, and two temperature sensors, DS18B20s from Maxim. Combined with 4 PWM ports, I should have an extremely expandable and versatile system!
For the microcontroller, my criteria were very strict. It had to run from 3.3v (I'm a fan of low-power), be widely available, have a fast clock speed >32Mhz, and capable of many different peripherals. From the parts list above, I need I2C, two serial ports, at least 4 PWM channels, and several I/O lines for each device’s specific needs. The fast clock speed is important to update the motors with stabilization data as often as possible to increase responsiveness, an update frequency of 450hz is desired. Enter the PIC32MX795 series. Capable of 80mhz, 1.5-6v operation, lots of I/O and peripherals for your every need, this is the perfect chip. Plus it supports USB hosting! This is important because I can significantly reduce the weight and cost of a radio receiver by using a tiny USB-bluetooth dongle for communications! These weigh almost nothing, are tiny in size, and can go far enough for my purposes. I also decided to break out 5 PWM channels, the optional fifth for a FPV tilt servo. FPVHobby makes an incredible sub-1 gram camera and transmitter system that boasts a 1km range, for a great price!
With these parts picked out, I put a careful schematic together using all SMD parts in Eagle. I included a MIC5205 voltage regulator from Micrel as well as a SP6641A boost ic that lets the entire circuit take in 1.5-15v and run at a constant 3.3v. Thank-you SparkFun Electronics for having such a great library! Because of the tight component density, I learned to route manually for a change. Just after I finished, my computer crashed - three weeks of routing and revision down the drain! GAHH!! I admit it was probably for the best; I was able to switch to a more efficient layout and better routing technique that reduced the board size to 2” square.
BatchPCB is a service from those Sparkfun guys down in Boulder that offers to panelize your PCB designs for cheap prices and have them made in China in 2-4 weeks. Only a fellow nerd hobbyist would understand the agony of waiting for PCBs and parts to ship from China. Speaking of parts, I ordered the rest of the flight components from HobbyKing. Their site has incredible prices and a huge selection. The downside: based in China. 3-4 weeks to ship. Nonetheless, I picked out the following based on help from those great guys over at RCGroups.
- The battery is a Zippy 1S 400mah 20C Lipo, an optimistic 8-10 minutes of flying time. With no luck finding good single-cell LiPo chargers, I designed my own with the MCP73833 charge controller. The recommended 1A charging circuit should give me a 20-25 minute charge. I ordered four of these, so I can charge three while flying one, then set the dead one to charge and load a fresh battery to keep flying.
Once the parts arrived (no PCBs yet though) I got started on tallying up some weights and building a simple frame. I went cheap and easy, something that will make it through prototyping in the very least. Two 5 1/2" x 3/16" x 3/8" balsa spars went under the knife and were slotted together at the center, coated in superglue for rigidity and strength. The resulting structure could withstand 500 grams of pressure in any direction with some minor flex. Looks pretty crash resistant. For now at least.
The stationary shaft of the motors are just over 1/8", so I hand-drilled holes 3/16" in from the end of each arm and filed it just large enough for a press fit. Superglue kept the ends from splitting, though binding with cotton thread it is probably necessary like many have done on this great thread over at RCGroups. Even taking the time to read all 1000 posts only lasted me 6 hours, then I was back to waiting for my PCBs.
The final measurements were 5.5" arms and the motors form a 3.5" square. The frame weighs 1.8 grams.
Between props the clearance is just 1/4", and there is 1/2" under the blades for the control board. The CA glue made the balsa very rigid, it resisted almost ten times the weight as a non-treated piece.
Dec. 1st update
Today I received the main controller and battery chargers from BatchPCB, after 17 days. The date stamp on the package says they were shipped to the US on Nov. 23rd, so assuming 2-3 days shipping from China that's a one week processing time, not bad for $35. But the kicker is that they doubled my order free of charge! That makes 8 battery chargers and a backup controller if my soldering isn't up to par.
The controller is fully assembled, as are the LiPo chargers i made. SMT soldering is pretty easy once you get the hang of it, the hardest part is holding on to those teensy 0603 packages with tweezers! I tested the chargers, they work great and get a 400mah cell to a full charge in less than thirty minutes.
The batteries also now have connectors installed and are pretty rugged. I had a brief scare with a smoking wire, but no harm was done. A weight tally brings me up to 39.9 grams, ready to fly. This is still a bit heavier than I want it, but I could lighten the battery if needed, possibly switch to a 240mah.
The LiPo charger assembled and operating. The right meter monitors the output voltage. This value ended at 4.212 volts. The left meter monitors the current output. It gradually decreases as the charge progresses from 1000 to 80ma.
The MCP73833 gets quite toasty, I used a fan just in case, though it was probably unnecessary.
End of charge. The yellow "Dead" light is off, the green "Charged" one is lit.
December 6th Update
I spent the weekend and tonight assembling everything, looking good at just under 42 grams! For some meager shock-mounting I put some small foam pieces at the corners of the main PCB. The secondary MPU-6050 Evaluation board rides on a set of small electrical tape tubes (so I can remove it for troubleshooting), will be replaced with shrink tubing if necessary. I just attached the ESCs with small dabs of hot glue, FETs out for cooling. Though the wires look tiny, I have put 2 amps through them with no problems. In the corner you can see the Bluetooth radio. It just fits under the blades, I'll either need some smaller props or to relocate it underneath the copter. As for the battery, I'm thinking a small piece of Velcro. The 4 LiPo chargers are in the testing phase, nothing's gone wrong so far.
1s Chargers with connectors and ready for testing.
4 1s 400mah 20c Zippy batteries with JST connectors.
The MPU-6050 is oriented so the arms correspond to the axes.
The PCBs used rolled tape and foam pads for vibration isolation.
The stripped USB bluetooth radio can be used as an ultralight transceiver, if it doesn't get shattered by the prop above it.
The underside wiring for the ESCs and battery plug.