fangin.com RC, photos & tech

13Feb/110

Triwiicopter: Building the Brains

 

The next step to the tricopter project is to swap out the 4 HK401B gyros for an Arduino micro-controller hooked up to a Wii Motion Plus 3 axis gyro all mounted on a custom made PCB. The theory is a much more stable platform for getting some decent aerial video and photos.

TriWiiCopter Wiring diagram

The directions I'll be following can be found here;

http://www.rcgroups.com/forums/showthread.php?t=1261382

http://www.rcgroups.com/forums/showthread.php?t=1332876

http://www.rcgroups.com/forums/showthread.php?t=1340771

http://www.rcgroups.com/forums/showthread.php?t=1348268

http://www.multiwii.com/

The parts needed are;

1)  Arduino Pro Mini 328 - 5VArduino Pro Mini 328 5V

2) Wii Motion plus (the innards of) Wii Motion Plus

3) A PCB to lay it all out onMutiWiiCopter.com PCB

4) An FTDI to plug in the USB and provide serial comms to a PC. 

5) Header pins.

The first step is too solder the Arduino and WMP onto the PCB. The hardest part is holding the header pins in place while flipping the board upside down to solder the bottom of the pins. Try using polystyrene foam or masking tape to hold the pins straight. I used double sided foam tape to hold the WMP in place and to provide some form of protection from vibration. I'll look at this again depending on what the output is like from the WMP sensor. Once the Arduino, WMP and header pins are all in place, it's time to upload the MultiWii 1.6 code to the Arduino. This link is quite handy as it appears to be the best place to go to check for updates as opposed to trawling the forums.

 

Here is where I struck the first hurdle. I kept getting error "avrdude: stk500_getsync(): not in sync: resp=0xf8, avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xd1". After an hour or so of Googling and forum reading, I tried reversing the way the FTDI board was plugged into the Arduino and voila it worked. The proper direction is contrary to the images I had looked at on the net. The pin naming on the board didn't help much and is ambiguous probably due to the lack of space. After reversing the FTDI, the code uploaded first go with plenty of flashing "Rx / Tx" LEDs on the Arduino and FTDI board.

USB to Serial FTDI plugged into the Arduino

Once the Arduino is running the code, I start the MultiWiiConf software to check the output from the WMP sensor. This software allows configuration and fine tuning to be made to the parameters governing the stability and responsiveness of the Triwii. For now though I'm just using it to check that all three axes of the WMP are sending a signal. The USB connection powers the Arduino which in turn powers the WMP sensor so at this stage I should be getting output. After selecting the right COM port in the software and then "start", the graphical interface appears to be showing everything working ok. The GYRO_ROLL, PITC and YAW all change in value as I tilt the board. I believe the ACC_ROLL, PITCH and Z are active once the Wii Nun chuck is added in for auto stabilisation. 

Next step, mount the board on the existing tri, unplug the gyros and plug the ESC inputs into the triwii board.

Comments (0) Trackbacks (0)

No comments yet.


No trackbacks yet.

%d bloggers like this: