fangin.com RC, photos & tech

19Feb/110

TriWiiCopter: Connecting the brain

Today I disconnected the 4 HK401B Gyros from the three ESCs and 1 yaw control servo for the purpose of hooking up the new Arduino control board.

Tips:

1) Create a new model on my transmitter. I made the mistake of trying to re-use the existing model memory setup to fly my Tricopter where the Tx is programmed to do all the mixing and 120° CCPM. That job is taken over by the Arduino so a new model with just the basic config can be used.

2) Adjust (increase) the Throttle ATV such that the minimum throttle shown in the MultiWiiconf software is about 950. Once the Arduino sees a low enough throttle output, it will be able to arm the motors and set them at idle. If the Arduino reads anything above minimum throttle, the motors won't start as a safety feature.

3) Adjust the rudder / yaw control Dual Rate, ATV so that the output is in the 1000 to 2000 range in MultiWiiConf.

I'm still using the MultiWiiConf_prebis_1.6 only because I'd already configured it and had it up and running. Version 1.6 is the current version which I just need to configure and upload to the board. When the time comes, I'll try out the online configurator here http://ardupirates.net/config/MW_Config.php.

Now that everythings moving in the right direction in the software, it's time to put the props back on for a test flight. The old gyros will stay on till I'm sure everythings working ok.

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.

   
%d bloggers like this: