This is a program to stabilize a multicopter (copilot), runs on microcontroller like Arduino or Teensy++ and only a wii motion plus, no other electronics needed. These project started April, 2010. Supported are planes, tricopter, quadricopter (+ and x config), hexacopter (penta and coaxial). The self-leveling capability helps when doing FPV (first person view).
19 Oct 2011
Look at the new quadricopter shop. There are a
lot of item for building it!
21 Jan 2011
First step in the UAV complete system with GPS, this is the first implementation of the DCM filtering with Wii components, and a MARG sensor array, this is really really fast way!
The BaronPilot name & project will be changed, the new SuperEconomical UAV will be main target for this project.
Founding a new company to project&build this vehicles, with no worry for users, cheap, and fast delivery. Target price will be under 180 euros.
3 Nov 2010
Introduced the V60 with the new Multiwii compatible mode, you don't need to modify hardware between the two platform (and to test the GUI).
Take double site tape to eliminate vibration problem
Separate clearly +5V from Arduino/Teensy++ from Servo/Esc
Test single component
't' command give you the channel received
'm' command give you current motor output
'g' command give you current gyroscope read
'a' command give you current angle
Test acro mode
switch channel5 from disabled mode to acro mode (center position).
Test stable mode
Configure the vertical of your vessel with the 'v' command.
Place vessel on a stable flat surface
Give 'vs' command (vertical set)
Check with A command that the two angle pitch & roll (deg) value are near zero
Place vessel with nose up, you must read value like 90;0 (pitch roll).
give EW to save parameters on the eeprom.
Know the correct angle & direction?
Take this image reference, red arrow are positive direction of the angles:
All value are in this order Pitch Roll Yaw for the gyro, or x,y,z for the accelerometer
In order of priority:
Add ultrasonic finder
To start motors:
Have another approach, to engage motor, switch the mode channel on (stable mode) for 2 seconds (look at the flashing led), than put it in acro mode, now motors are engaged.
To switch off motors, put throttle to minimum and rudder to the left.
COMMAND LINE INTERFACE
Baronpilot accept some commands via serial at 115200baud, you can use serial monitor on the Arduino IDE.
All of this command must be lowercase.
PRP,PRR,PRY - Pid Read Pitch, Roll, Yaw
Read the PID parameters of the Roll Pitch and Yaw axis.
They are 3 numbers.
The first one is proportional to the current error between stick and gyro, unit is us/deg/s tipical 2, reduce it if you found your vessel to wobbling.
The second one is the integral, that parameter can reduce the offset of the difference in the motors, unit is 1/sec, typical 4-8. Large values compensate faster the offset.
The third one is the derivative, correct the istant variation of the error, this is a pure number, typical 0.
PWP,PWR,PWY - Pid Write Pitch, Roll, Yaw
Write the PID parameters of the Roll Pitch Yaw axis, to the RAM memory, you must write to the EEPROM to test it.
Ex: PWY 3.6;0.17;0
SRR,SRP - Stable Read Roll,Pitch
Read the 3 parameters about the PID that control the attitude (with the help of accelerometer on the nunchuck).
SWR,SWP - Stable Write Roll,Pitch
Write the 3 parameters about the PID that control the attitude (with the help of accelerometer on the nunchuck).
Ex: SWR 2.5;2.0;0
EE - EEPROM erase
Remove old parameters
ER - EEPROM read
Read from the EEPROM the PID parameters, if they are not found in the memory load the default.
EW - EEPROM write
write current RAM PID parameters to the EEPROM
T - Transmitter
Current channel input read from the receiver, centered to 0, the unit is microseconds (us). Range is [-500,500]
MODE must read 500 in disable mode (>=2000 raw).
TR - Transmitter RAW
Current channel input read from the receiver, the unit is microseconds (us). Range is [1000,2000]
MODE channel must read 500 in disable mode (>=2000 raw).
R - Raw Data
Pitch,Roll,Yaw,x,y,z accel data from the nunchuck continuos print flag, to exit from this mode, send a 'X' Command.
M - Motor
Current motor commands, unit are microseconds, centered to 0. Range is -500,500 us.
G - Gyro
Gyro data continuos print flag, to exit from this mode, send a 'X' Command. Pitch,Roll, Yaw deg/s, printed continuously.
X - Exit
Exit from all of the continuos print mode.
F - Free RAM
Print current free RAM and current allocated memory to the internal buffers.
I - Reset IMU
Perform a calibration on the gyro.
AI - Accel Instant
Give you current angle (in 360°) accelerometer instantaneous, without the help of the gyro, not filtered from the centripetal forces, useful in stand still.
Angles are Pitch & Roll
AF - Accel Filtered
Give you current angle (in 360°) accelerometer filtered with the help of the gyro. Check to see 90° in vertical situation.
AR - Accel Raw
Give you current value read from the accelerometer centered to 0. Warning usefull only if you have correctly calibrated it with 'vs' command. Measured unit is not used, atan2 is used to calc angle so importance is only relative that all 3 value are the same scale.
VR,VW - Vertical read/write
Write or read, the 3 accel zero value that determine the vertical vector (x,y,z), they are 0-1024 (10bit) value (normally near 512). You can adjust these value to find a corrected vertical and planar vessel.
VS - Vertical set
Place vessel on a flat surface, give this command to write current vertical vector for the stable mode.
This is a very dangerous video of the stable mode, look at this instant reactions:
These are images from Teensy++ board for V41 Baronpilot, for a quadricopter:
These are images from Arduino Nano and I/O Expansion board, for a quadricopter:
Do I need a programmer for the Arduino?
No, you can program it with the embedded USB-Serial interface on the nano, you need only a USB cable and the driver.
Can I use other platform compatible?
Yes, you can use also other platform.
Do I need 3.3V?
No, wii motion plus and nunchuck can be used also with 5V
Do I need to solder a Board?
No, you can use a breadboard or a IO Nano Shield
I'm using KEDA/Turnigy 2217/20 860kv 220W, but best overall are the Keda 20-22L 17A 924Kv Hacker Style
Hobbywing/Turnigy 18A programmable. They support Fast PWM also at 500Hz.
structure is made with 10x10mm aluminium frame and plywood
What are the correct values from G A T commands?
Gyro must be zero if you don't touch your vessels, A give you current roll&pitch value so they must be 0 when you have zeroed it with the 'V' commands. T give you number like 1000-2000 and then -500,500. They must react to the radio.
What to do if arduino reset in flight?
Don't power it with the same line of servo or esc.
Hardware jzhaoket for Arduino Nano 3.0 and the Nano IO Shield Giantcod for R/C materials Micron Radio Control for pusher APC 10x4.7 propeller Modelfixing for the small piece that you don't have ElectronicaRC for video radio trasmitter (FPV First Person View) pjrc.com Teensy++ 2.0 (arduino compatible) microcontroller (more ram, more PWM output). Volarerc italian shop Parachutes Parachutes and deceleration devices for rockets, airplanes, helicopters, kite recovery, high altitude balloons, sea anchors
How to build a tricopter (by Signguy)
A very simple project, with only 4 gyro, without a board, but you must have a radio that support heli & 120degrees.
KapteinKUKs Simple and Low Part Count Quad, Hex and Tricopter Flight Controller
simple from the software view, but complex for electronics & without self-leveling. Preferrable if you don't have programming skills.