I was wondering how is the communication between a multiwii board and the receiver achieved? For instance, I read here:
[url="http://www.hobbyking.com/hobbyking/store/uh_viewitem.asp?idproduct=27109&aff=136356 "]MultiWii Lite V1.0 Flight Controller w/FTDI[/url] 6 input channels for standard receiver and PPM SUM receiver
What does that mean? How can I emulate these signals from an other arduino board?
Do a lot of goggle searches and read. Start with "RC servo PWM" which is the 'standard' RX to FC interface. Then study "PPM" signal interface. Both of these are pretty easy to code in an Arduino and there are lots of examples on the web. Get a small RX servo to connect to the Arduino for experimenting and testing your code. The SoR web site and forum has lots of examples, articles and discussions on doing this.
Looking for the keywords you gave me turned up a way to control servos and ESC for brushless motors. Actually, I am more interested in how to control the multiwii board which controls the motors. What kind of signals is the multiwii board expecting from the receiver of the RF transmission ?
The typical is called PWM (although this term is not correctly used). I did give you the phrase to look up to learn about what a typical RC RX outputs. It is "RC servo PWM", google this.
Remember that an RC RX was originally designed to control a servo in an airplane to move the control surfaces. MW code then used that same RX output signal to control a multirotor copter.
After you learn how this works and can code it on the Arduino then learn about the one-wire RX to FC interfaces. There are several and have tha names: PPM, CPPM, SBUS and some others.
SoR is the Society of Robots web site. A google search of "SoR' will find this web site. Go there and read the Robot Tutorials since these are written for beginners in electronics and control system for robots. They also use the Arduino quite a lot there so there is much good info for you to learn.
Thank you for your really useful reply. I understand the difference between PPM and PWM. They look alike, but while PWM can have a ON/OFF ratio from 0 to 100 % PPM have an ON time from 1000 to 2000 µs located in a variable time frame (usually 20 ms). This allows for multiple signals to be sent within the frame.
So, from what you tell me, and what I found on the net, the radio receivers convert the signals from the different channels of the transmitter into separate PPM signals which are then sent to separate servos. The multiwii gets in-between the two, and for compatibility reasons also operates by decoding PPM signals.
Thus, if I were to build my own transmitter based on XBee, I could use an on board arduino equipped with an XBee module, and send PPM signals to the varuois inputs of the mulitwii board ? Will it work this way?
If you use Xbee or any other serial communication to control with you can use the MSP protocol to send the RC commands. Here is a working project that converts a incoming PPM to serial protocol for MWii. But you can easily convert it to use Potentiometers or other sensors.
Julia, Yes, you have the TX to RX to FC correct and use the proper term for the pulse signal (PPM = Pulse Position Modulation). However in the RC hobby everyone calls this PWM, quite incorrectly. Your description on PWM is the correct one from an Engineering view point. So in RC the term PWM is a 1 to 2msec pulse at a 20ms repetition rate.
Then in RC the term PPM refers to (again incorrectly) a stream of pulses for all the control channels (each stick or switch position) that is sent on a signal wire or on an RF carrier.
If you were to use an XBee module for the RF link then like PatrikE said, just use the serial (asynchronous) output of the XBee directly to the MW FC.
Now I understand! THank you for writing this sentence. Tx : transmission ; Rx : reception ; FC : Flight controller. English not being my native language, I have a hard time with acronyms.
As for PPM/ PWM, I think I get it : PWM is PPM for one channel. PPM is a stream of 20 ms PPM frames containing multiple PPM pulses for multiple channels.
Now I understand this (this was the missing piece of info for me: communication), I think I will integrate the XBee directly on the multiwii code and emulate this behavior in a first step. Thus, I will probably need to drop most of the TX.h/cpp code. In a second step, once I have established that the copter can fly as expected, I will totally drop the TX code and call the functions directly. I have developed both streaming with error correction and datagram-type protocols for wire / wireless communication that I could use. I'll post the code with instructions once I have it working.
Or I could also maybe take the MSP protocol suggested by PatriKe. PatriKe: is there a documentation about this protocol ? I saw there are three main categories with several files in them. Though some are obviously on the TX or RX side, I do no know what to do with the "extra" files and how to use the library. I don't require extended help, just a few pointers on how it should be operated.
Thank you both for taking the time to answer me. I just have a few more questions: is there a doc about the MW source code, besides the comment in the source itself? If I have questions about the code such as: "which function should I call to make the copter enter hover mode ?" or `Where is the "go-left function"` where should I ask them? Can I use the software developement section, or is it considered a setup issue?
Ultimately, I would like to develop advanced flight, operation, and actuation functionalities on the copter (that's why I need a custom TX hardware).