Please help with PPM coding.

hi guys

Hope somebody could help me with a simple code. I'm using an arduino uno and need to convert/change a PPM signal. The arduino will receive a PPM signal with value between, say 1000-2000. (from rc radio reciever) The arduino needs to output a PPM value with a pre programable range. for an example: PPM value input = 1000 - output = 1500 PPM value input = 1500 - output = 1600 PPM value input = 2000 - output = 1700 Also the full range within. so the variable range 1000-2000 must become a variable range like 1500-1700.

best if it is capable to run on an attiny. (dont know if this is posible) please the full code, i know the basics but im not a genius programmer haha

Purpose: my servo device is way over sensitive. full input range of the devicem is between value 1450 to 1600 (aprox) so 1000-2000 is pretty out of range. The device is is extremely sensitive en freaks out when the ppm is out of range. I would like to place the atmega/attiny inline with the servo leads. then re-calculate the proper ppm range

This is all the arduino has to do.

with kind regards Robbert Loos

Hi,

If you want your value from 1000 to 2000 to be from 1500 to 1700 you can use the map function like this:

convertedvalue = map(value,1000,2000,1500,1700);

Hope this helps :)

Thats my problem haha

how do i read-convert-output

i noticed a lot of people have the same issue with this device thats why im gonna try to solve this with an IC to correct the value and hope to help others.

I really appreciate!

The arduino will receive a PPM signal with value between, say 1000-2000. (from rc radio reciever)

The signal you're talking about is a PWM signal. PPM in R/C systems only exists between transmitter and receiver; the receiver demultiplexes the PPM stream to individual channels of PWM.

my servo device is way over sensitive.

Please post a link to the data sheet or product page of the "servo device".

Link for ppm decoder http://rcarduino.blogspot.sg/2012/11/how-to-read-rc-receiver-ppm-stream.html

https://github.com/kiuz/PPM-Signal-Reader-ARDUINO

AWOL: The signal you're talking about is a PWM signal. PPM in R/C systems only exists between transmitter and receiver; the receiver demultiplexes the PPM stream to individual channels of PWM.

Thanks for making this clear to me! didnt know this!

So its a PWM signal that comes from the receiver and goes to the gimbal. Between those two, the values must change. thats why i was thinkin about adding a micro processor in between the two to take care of this. Sadly i cant change settings in my transmitter to make it suitable for the gimbal.

The device is a Quanum q-2d gimbal. All users with a Quanum nova or Cheerson CX-20 have the same issue with this gimbal. A Few degree rotation on the Aux knob is all it takes to tilt the Gimbal forward and down. When you rotate to far the gimbal freaks out. this is realy F*** while in flight haha

Thats why i want to limit the aux signal so it keeps in the range the gimbal accepts.

http://www.hobbyking.com/hobbyking/store/__55238__Quanum_Q_2D_Brushless_GoPro_3_Gimbal_suitable_for_Nova_Phantom_QR_X350_and_others_.html

outputServo.writeMicroseconds(map(pulseIn(readPin), 1000, 2000, 1500, 1700));

I don't know if the ATtiny core supports the servo library (which uses a timer interrupt).