Hello, I ran into a problem, I have an arduino nano and multiwii 328p, my necessity is to control the imputs on multiwii of throttle, pitch and roll that normally would be controlled by a receiver output signal PPM. So in other words what can I do with arduino to generate a PPM signal for these three "servos" (multiwii) having, for example, an int value, as is usually done with the library servo for PWM servos?
The servo library is a PPM system not a PWM system.
Really? You save me, thanks much ![]()
Grumpy_Mike:
The servo library is a PPM system not a PWM system.
Previous discussions pretty much settled on PPM being the wireless transmission format between the RC tx and RC rx. The servo control format between the RC rx and the servo is PWM. I think the servo library duplicates the output of the RC rx. Bottom line, the servo library does the heavy lifting.
hei, I've faced similar situation. I want to control "MultiWii" board with arduino.
Just to confirm, can I use Servo library to generate input signals for MultiWii board (e.g throttle...)
thanks,
Serge
I don't know anything about the multiwii but I have written a short sketch to generate a 7 channel PPM signal that goes to a 2.4Ghz R/C transmitter.
The transmitter needs a series of 7 PPM pulses each one of which is equivalent to the pulse that would be sent to a single servo. The receiver separates the pulses and sends the pulses to the appropriate servo (or ESC).
I uploaded the sketch on this page Hobby king receiver stopped functioning after upgrades on RC Mower with arduino - #8 by Robin2 - Project Guidance - Arduino Forum. You will probably need to adapt it, but it should give you the general idea.
...R
thanks for pointing this out, Robin
In my case there is no necessity to combine everything into one PPM signal(as I understood you compose one "7 channel" signal). Multiwii has 4 separate inputs for throttle, rudder, aileron and elevator. But following the documentation and spec, it has: "Input signal: 50hz standard PPM". So the question appear how to produce 50 Hz standard PPM for each channel.
inputs are depicted below:
thanks,
Serge
ok, I think the specs are quite disappointing for this board. As far as I know ppm protocol is used between transmitter and receiver to pack everything in 20 millisecond wave. After it' converted by receiver lets say into 4 different PWM channels which are input signal to ESC controllers.
sergius:
ok, I think the specs are quite disappointing for this board. As far as I know ppm protocol is used between transmitter and receiver to pack everything in 20 millisecond wave. After it' converted by receiver lets say into 4 different PWM channels which are input signal to ESC controllers.
No that is not what PPM does. It stands for Pulse Position Modulation and is a fixed width pulse generated at intervals proportional to the modulation value. It IS what the servo libary produces, look at the output on a scope.
The usual input to a servo is a pulse with a width between 1ms and 2ms (there can be some variation on this) repeated at 20ms intervals (hence 50Hz).
My sketch is designed to create a stream of 7 such pulses within the 20ms interval - one for each channel. Each pulse will have its own width depending on what the relevant servo is being commanded to do. As I said the receiver takes all this in on one pin and separates out the channels.
If your board takes in the signal for each function on a separate pin then all you need to do is treat it like a bunch of servos with the servo signal from the different Arduino pins going to the relevant pin on your board. And not forgetting to have a common ground connection and a suitable power supply for your board.
...R
Robin2:
If your board takes in the signal for each function on a separate pin then all you need to do is treat it like a bunch of servos with the servo signal from the different Arduino pins going to the relevant pin on your board. And not forgetting to have a common ground connection and a suitable power supply for your board....R
basically this is what I wanted to confirm. I don't need to generate a stream of pulses within 20ms (as in case with PPM signal) . Should be enough to have separate channel connection from Arduino PWM pins to relevant multiwii board inputs as you mentioned, Robin. The thing which confused me is board spec saying it requires 50hz PPM as input having in the same time 4 separate channel inputs for each control. Why do they need "multichannel" PPM signal for one single throttle control input..? But anyway, my board will arrive shortly so I'll be able to test this in real conditions.
thanks
Basically the board takes the signals (PPM -PWM call it what you like) from the receivers slots intended for servos or esc hence the four slots for throttle, rudder,elevator and aileron on the input side of the board. Then the board depending on what the dip switch is set at will allow the control of mainly esc's at 400Hz or servos at 50Hz PWM intended for multi rotor craft.
While you are waiting for it here is the manual ( took a little digging- could not find it on HK's product page).
406500306X7478X32.pdf (933 KB)
justone:
... here is the manual ( took a little digging- could not find it on HK's product page).
justone,
thanks for documentation provided. Seems it's much more clear now.
Hi Guys
Any one on this post were able to generate the PPM signal through arduino to MultiWii. If so can you please give me a sample coding
Thanks