Contents
|
Quadrocopter MultiWii Arduino Mega Shield
In order to use GPS, an Arduino Mini is not sufficient, it needs a second serial interface. This is provided by the Arduino Mega.
In order to keep the cost low, I used the old Arduino Mega 1280. It is available via Ebay (topengineer1986) for about 21 EUR inclusive shipping.
The following sensors should be placed on the low cost shield board:
Wii Motion Plus (WMP) Gyro sensor (the ITG3205 chip is used only), 10 - 15 EUR
The benefit is, that you can connect the ITG3205 (Gyro) chip directly with the 2.5V I2C bus from ELV BMA020 LLC.
The WMP supplies the ITG3205 with 2.8V.
Have a look at ziss_dm A detailed description is at ziss_dm: WMP ITG3205 Modification
The drawback is, you have to change the direction of the board 90 degree counter clockwise CCW, or do a software modification as described in the Mod. from ziss_dm.BMA020 (ELV) Acceleration sensor and Logic Level Converter (LLC), about 7 EUR + shipping
BMP085 Barometric sensor, either Break Out Board (BOB, 18 EUR + shipping), or chip
HMC5843 (outdated, use HMC5883) Magnetometer sensor, 13 EUR + shipping
Further support is integrated for:
- 4 x ESC for Tri- and Quadrocopter only.
- 4 x Servos for camera suppport.
- +5V for the sensors and RX will be taken from Arduino Mega board regulator only, not from the ESC. A resistor from the 3S battery to VIN of the Arduino mega board will lower the thermal load of the on board regulator.
- +5V for the servos (camera) will come from ESC number 4 only.
LED for Power On and Signal pin 13, because the shield board covers the original LED's.
The Battery Monitor has a 100 nF filter capacitor to prevent a false alarm.
A Current sensor can be connected to analog input A2.
A Bluetooth to Serial module can be connected, see QuadrocopterBluetooth
A GPS receiver can be connected to serial 3
Board Layout
The shield board was designed from the AeroQuad MegaShield board example (Eagle files).
The used acceleration Sensor BMA180 is a little better than the BMA020 (see Link), but the BMA020 has the better price/performance ratio. And the board from ELV has a built in LLC. Therefore I put it on the shield board.
The BMA020 board has a 2.5 V regulator on board. This voltage will also be applied to the other sensors, Magnetometer and Barometer. The ITG3205 on the WiiMotionPlus board does have its own regulator of 2.8 V. From the data sheets you can see that all sensors are capable to allow 400 KHz for the I2C bus. The level shifter on the BMA020 board shift the I2C signals to 5V for the CPU. So, the internal pull ups of the CPU can be used.
Layout Specialties (Eagle 5)
On the Bottom side is a GND Polygon frame, it is included in the routing.
On the Top side the GND Polygon frame must be drawn AFTER routing, then actuate Ratsnest for GND filling. Otherwise the auto routing will generate more vias. In case of a layout change, the Top GND polygon frame must be deleted first, and replaced as a last step.
Using the CAM output select EPS device for further processing. Height will be 3 inch, width 3.5 inch. Deselect "Pad filling", and in case of the Top layer select "mirror". As layers select 1/16 Top/Bottom and 17 Pads and 18 Vias only.
As the next step copy and paste the EPS files into a Libre Office document. In order to avoid unwanted copper etching, place filled black rectangles around your layout. Because the print dialog in Libre Office is not so sophisticated, output a PDF file. Unfortunately the PDF export from Libre Office does not show the EPS images, so print in a PDF file. Then use your PDF Reader to print the layout in best quality on your printer on a film. I use an ink-jet printer Canon i550.
Build Up Sequence
Because the I2C bus is a bus, which means if one device fails the bus no longer works, and it is difficult to figure out the defect device.
So I will start with the WiiMotionPlus gyro board with 5V I2C bus connection. The software is MultiWii_dev_20110928, and has the following config changes:
#define MINTHROTTLE 1300 // for Turnigy Plush ESCs 10A #define MEGA // not needed in version 2.1
Next step is to connect the ELV BMA020 acceleration sensor board. Config changes:
#define MINTHROTTLE 1300 // for Turnigy Plush ESCs 10A #define MEGA // not needed in version 2.1 #define BMA020
The internal 2.5 V I2C bus (Logic Level Converter = LLC) from the ELV BMA020 board is connected to the shield, and the barometer BMP085 is hooked on for test:
#define BMP085
The internal 2.5 V I2C bus (Logic Level Converter = LLC) from the ELV BMA020 board is connected to the shield, and the magnetometer HMC5883 is hooked on for test:
#define HMC5883 // to correct Mag orientation #define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = -Y; magADC[PITCH] = X; magADC[YAW] = Z;}
Unfortunately the magnetometer jumps in the value quite often, no matter if the I2C bus speed is 100 KHz or 400 KHz.- A GPS receiver (NMEA protcoll) is connected to the shield:
#define GPS #define GPS_SERIAL Serial3 // should be Serial2 for flyduino v2 #define GPS_BAUD 38400
The distance from home deviates over 5 minutes up to 16 m.
5. I connected the internal 2.8 V I2C bus (chip ITG3205) from the Wii Motion Plus board to the 2.5 V LLC.
#define ITG3200 // to correct 90 degree turn of Gyro #define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = Z;}
It works, but the direction is turned 90 degrees clockwise. As an positive effect the cycle time lowers from about 4000 to about 3000 us.
Also a benefit is the I2C bus speed up from 100 KHz to 400 KHz. The change in I2C bus speed does not change the cycle speed for an obvious amount.
Links
List of pages in this category:
-- RudolfReuter 2011-10-04 15:01:30
Go back to CategoryQuadrocopter or FrontPage ; KontaktEmail (ContactEmail)