Convert Receiver channels to PPM with arduino

Electronic projects that are either related to the firmwares for the 9x, or simply great for radio control applications.
lebenj
Posts: 83
Joined: Wed Jan 23, 2013 4:12 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by lebenj »

i tried powering the D4R-II with a regulated 5v source and also with a direct lipo 2S source....

when i check the voltage of the ppm signal, i have 2,78V all the time

if i plug a jack cable on the student radio, the ppm signal has a voltage of 4,35V.
may be the D4R-II does not has a signal strong enough
My problem is that i don't have any oscilloscope do see how is the signal.


it exists oscilloscope on windows PC working with the microphone input of the sound card, but before i must make me a voltage divider to get less than 0,7v to protect mu sound card.... and remember how to use an oscilloscope... the last time i used one, it was 25 years ago!!! :D :D

if someone can help me....

User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Convert Receiver channels to PPM with arduino

Post by MikeB »

It may be the voltage from the D4R-II does not go high enough.
You could try adding a diode (1N4001) in the GROUND conection between the d4R-II and the radio, anode to D4R-II, cathode to ground on the radio. This would move the output from the D4R-II up by around 0.6 volts, so a logic '0' would be 0.6 volts, but a logic '1' would be 3.9 volts (up from 3.3 volts).

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Convert Receiver channels to PPM with arduino

Post by gohsthb »

I am using a d4r-ii with my setup. It works just fine. For power I am using an old 4 cell receiver pack. Maybe somehow the ppm in line is loading it down?
-ghost

Sent from my LG-P999 using Tapatalk 2
lebenj
Posts: 83
Joined: Wed Jan 23, 2013 4:12 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by lebenj »

ok, i have to find a diode! i know i have some "Schottky diode", but they are not good for this application because they would add only around 0,3v, or even less...

sure i will find something in a old electronic board ....
lebenj
Posts: 83
Joined: Wed Jan 23, 2013 4:12 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by lebenj »

gohsthb wrote:I am using a d4r-ii with my setup. It works just fine. For power I am using an old 4 cell receiver pack. Maybe somehow the ppm in line is loading it down?
-ghost
can you confirm you use the D4r-II to receive info from a slave TX, then the D4R-II send the ppm signal to the trainer jack of the master TX?
and it works for you?

lebenj
Posts: 83
Joined: Wed Jan 23, 2013 4:12 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by lebenj »

ok,

so using the FR sky voltage sensor (it's a voltage devider), i manage to get the ppm signal going out CH1 when CH3 and CH4 are "bridged" on my D4R-II receptor

it looks like a normal ppm signal...
Image

with another voltage divider, another stereo phone jack wire, i could compare the ppm signal of a slave radio with the ppm signal of the D4R-II rx, but i don't have all the stuff right now!

i really don't understand why it does not works!
lebenj
Posts: 83
Joined: Wed Jan 23, 2013 4:12 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by lebenj »

So for the fun, i had to look for some resistors to make another voltage devider, giving more or less the same voltage result for both ppm signal

the D4R-II gave me 2,78V so with the FRsky votage sensor on 3S position it give me 0,72V
the 9X ppm signal gave me 4,35V. i find a 10K (but 8,87K in reality) big resistor, and a 47K resistor on a electronic board... this devider give me a 0,75V

buy this way i will be able to compare the signal with the same voltage level. And also will try to not fry my laptop sound card!


i manage to make the circuit:
Image

Image

the result is nice:
the red one is the signal from the D4R-II
the green one is the signal from the turnigy 9X.

Image


I'm really a newbie in electronic, but the red one looks cleaner, but they are the same!

so if the only diference is the voltage level, i must find a way to make a bigger voltage level coming out the D4R-II EASYLY!!!!

any idea?
lebenj
Posts: 83
Joined: Wed Jan 23, 2013 4:12 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by lebenj »

trying to think a little, i remember i bought long time ago this thing:
http://www.hobbyking.com/hobbyking/stor ... v_5v_.html

i connected it between the D4R-II receiver and the jack going to the master radio....


but still nothing!

WHY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
lebenj
Posts: 83
Joined: Wed Jan 23, 2013 4:12 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by lebenj »

this signal amplifier does not do the job!

the voltage signal is 4,2V (with a simple voltmeter), but when i connect the same voltage devider, to see the signal on the scope: BRRRRRRRRRR!!!!!!
Image

it's normal it does not works!!!! nothing compared to a normal PPM signal
if someone can tell me how to make an amplifier for this signal!

regards
lebenj
Posts: 83
Joined: Wed Jan 23, 2013 4:12 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by lebenj »

MikeB wrote:It may be the voltage from the D4R-II does not go high enough.
You could try adding a diode (1N4001) in the GROUND conection between the d4R-II and the radio, anode to D4R-II, cathode to ground on the radio. This would move the output from the D4R-II up by around 0.6 volts, so a logic '0' would be 0.6 volts, but a logic '1' would be 3.9 volts (up from 3.3 volts).

Mike.
i'm note sure to understand what to do:
in "my things", i find a M4 diod, wich is, i think, the same as a 1N4001 diod,

i tried 2 differents options, but nothing better.
in option 1
the voltage go down to around 0,53V, wich is the voltage when i test the diode with my multimeter

in option 2:
the voltage is near 0, wich is logical as the diode stop everything

Image

regards
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Convert Receiver channels to PPM with arduino

Post by MikeB »

I was thinking your option 2, but it doesn't work.

With the double 'scope trace (red and green) above, are these signals with the jack plug plugged into the 'Teacher' transmitter?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
lebenj
Posts: 83
Joined: Wed Jan 23, 2013 4:12 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by lebenj »

MikeB wrote:I was thinking your option 2, but it doesn't work.

With the double 'scope trace (red and green) above, are these signals with the jack plug plugged into the 'Teacher' transmitter?

Mike.
Image


the red one is the signal from the D4R-II connected only to my sound card with one side of the stereo input. the rx is binded with one of my 2 turnigy 9x
the green one is the PPM signal from the other turnigy 9X in "student" mode (power switch on "OFF" position, but trainer jack plugged).

thanks for your help mike....

having a look on google, the solution can be an "Operational Amplificador" with 2 resistors, but first i must find one in a electronic board!!! i live in a small village where nobody sell electronic components!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Convert Receiver channels to PPM with arduino

Post by MikeB »

Can you repeat the 'scope measurements with the signal connected to the 'Teacher" Tx? See whether the signals are being loaded in some way.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
lebenj
Posts: 83
Joined: Wed Jan 23, 2013 4:12 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by lebenj »

hello mike,

i can do it, but not today.... my wife came back home with the kids!

regards
handsomejackuk
Posts: 23
Joined: Mon Oct 20, 2014 11:00 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by handsomejackuk »

got this working a treat thanks to all involved.. especially Buzz.... whoever he is.. thanks
handsomejackuk
Posts: 23
Joined: Mon Oct 20, 2014 11:00 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by handsomejackuk »

works a treat using this to convert an 8 channel flysky receiver to input ppm to a d.i.y. arduino flight controller so i have full 8 channels ppm to it.. there was not enough data line inputs on my pro mini arduino to give me 8 pwm channels... so basically i have converted a pwm receiver to ppm... Nice...
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Convert Receiver channels to PPM with arduino

Post by jhsa »

Yes it is a nice project.. I have this working as a a wireless buddy box system. I connected a frsky receiver to it as you could see in my posts above.. Glad it was useful to you.. ;)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
handsomejackuk
Posts: 23
Joined: Mon Oct 20, 2014 11:00 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by handsomejackuk »

João

were you involved with this much specifically the arduino firmware..? as i just curious to know if the failsafe works, and if the throttle channel default failsafe setting can be altered.. i got a bit mixed up when setting my channels and my pitch seems to be my faisafe channel at 900 'us

or if you know of any other firmware similar to this...
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Convert Receiver channels to PPM with arduino

Post by jhsa »

no, I only built it and posted it here.. This was a while ago and I don't remember very well.. I think I tested a few and found one that worked best..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
handsomejackuk
Posts: 23
Joined: Mon Oct 20, 2014 11:00 pm
Country: -

Re: Convert Receiver channels to PPM with arduino

Post by handsomejackuk »

yeah it seems to work ok i was quite surprised actually i built this in one night.. there is some seting in the arduino sketch to alter the failsafe settings i will try tomorrow

thanks for the quick reply..
waverunner1962
Posts: 4
Joined: Sun Jun 05, 2016 1:17 pm
Country: France

Re: Convert Receiver channels to PPM with arduino

Post by waverunner1962 »

hi all,
and thanks for this OLD interesting post
im trying to use the code from : https://github.com/davidbuzz/BuzzsArdui ... _to_ppm328
but i'am really really new with arduino things
i think the file.h is only a part of a library and seem arduino need a .cpp file to make this complete
i just want to test this to convert a turnigy 9x original receiver in a ppm one
its just for undertsand where i fail because i ordered a commercial converter
and its funny to try ;)

i hope somebody can help me for this

best regards
Eric
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Convert Receiver channels to PPM with arduino

Post by jhsa »

Welcome to the forum ;) :)

Please see this post

viewtopic.php?f=84&t=3348#p49171

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
waverunner1962
Posts: 4
Joined: Sun Jun 05, 2016 1:17 pm
Country: France

Re: Convert Receiver channels to PPM with arduino

Post by waverunner1962 »

;) thx
i read it since a long time :?
but when i try to verify the code, i always got an error for ppm_encoder.h

i reinstalled the Arduino IDE and everything seem ok now..
i will have a look inside the code and will try this now

many thanks, you saved my afternoon :D

Eric
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Convert Receiver channels to PPM with arduino

Post by jhsa »

Good :)
I wish someone would save mine on another project :( :o

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
waverunner1962
Posts: 4
Joined: Sun Jun 05, 2016 1:17 pm
Country: France

Re: Convert Receiver channels to PPM with arduino

Post by waverunner1962 »

i wish i could do it! tell me where is your project on the forum, i will have a look and if i can do something for you, i will do it!
but you seem much more comptetent than i am! let's try! :?
anyway thx again 8-)

Eric
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Convert Receiver channels to PPM with arduino

Post by jhsa »

It is not related to the model flying.. it is something for my guitar amplifier.. I can't code, so I am not very competent :( :D

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
waverunner1962
Posts: 4
Joined: Sun Jun 05, 2016 1:17 pm
Country: France

Re: Convert Receiver channels to PPM with arduino

Post by waverunner1962 »

if its more "electronic" maybe i can help

Eric
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Convert Receiver channels to PPM with arduino

Post by jhsa »

It is a coding problem only ;) :)

but thanks anyway :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
deaconFlyer
Posts: 76
Joined: Fri Apr 05, 2013 11:22 am
Country: Canada
Location: Ontario

Re: Convert Receiver channels to PPM with arduino

Post by deaconFlyer »

There are several drag and drop coding visual programs out there. If you can describe what you want to do in detail, the actual code wireframes out quickly.

If you can describe exactly what you want to happen, and when it is to happen, and when it is to no longer happen you are literally a few steps off a program.

Post Reply

Return to “General RC Electronic Projects and Discussion”