SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Jun 08, 2009, 01:05 PM
R/C Electro-Gadgeteer
Tomapowa's Avatar
N.E. USA
Joined Oct 2003
815 Posts
Quote:
Originally Posted by Acetronics
there is ~ 15 ns between channels outputs with 4015/4017 decoders ... say hundreds of ns with ÁP decoders.

so, this scheme outputs a low level during the full 4 to 8 channels transmission, due to the diodes blocking time ... not exactly what you were telling us.

see Mr CAM Forum for a logic version of this sequence " reconstructor " ... that is working.

Alain

The recovery times of the 1N4148 is around 4ns.
http://www.fairchildsemi.com/ds/1N/1N4148.pdf
You could always use faster schottkys with reverse blocking times of around ~100ps if you wanted to be more precise.
http://en.wikipedia.org/wiki/Schottky_diode

Test it yourself and tell us if it works! Others are using it successfully... supposedly.
Tomapowa is offline Find More Posts by Tomapowa
Reply With Quote
Sign up now
to remove ads between posts
Old Jun 08, 2009, 02:54 PM
"MAYONNAISE"
Acetronics's Avatar
Le Treport, France
Joined Jun 2004
1,411 Posts
Supposing this recovery time to be 0 ...

what will you do with the ns "needle" positive pulses generated ??? no ( usable ...) electronics is able to detect them !!!
Do you also don't think the wiring load is enough to " wipe" them ... ???

have a look here to confirm it is only supposed to be working !

http://www.rc-cam.com/forum/index.php?showtopic=2064

Alain
Acetronics is online now Find More Posts by Acetronics
Reply With Quote
Old Jun 08, 2009, 03:18 PM
R/C Electro-Gadgeteer
Tomapowa's Avatar
N.E. USA
Joined Oct 2003
815 Posts
needle pulses? Wire? Load? Please explain...
Tomapowa is offline Find More Posts by Tomapowa
Reply With Quote
Old Jun 08, 2009, 05:38 PM
Registered User
Hoofddorp, Netherlands
Joined Sep 2004
3,917 Posts
Both Mr Cam Man and the mikrokopter.de shop sell working PWM to PPM converters for up to 8 channels. The simplest one, which isn't sold is based on some diodes and a single chip, the diagram for which can be found in the thread on getting PPM from the AR7000, which does not have PPM on board so no other way to get at it, unless you just directly interface a satelite receiver with the flight controler. That has also been done with the Mikrokopter. See the mikrokopter.de forum and wiki.
Arthur P. is offline Find More Posts by Arthur P.
Reply With Quote
Old Jun 09, 2009, 06:01 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,986 Posts
Quote:
Originally Posted by Tomapowa
needle pulses? Wire? Load? Please explain...
Alains comments definitely ring a bell now. Photo 1 shows pulse spacing of typical RX and as you can see it is more like 2us so the diode circuit will fail to generate useable PPM. With more expensive high speed diodes output will still not even vaguely resemble the original signal (photo 2, Hitec). These are representative of 99% of units on the market. Don't forget that something, usually a micro, has to make use of this signal. I clearly remember having to put a 300us high time into the code to get useable PPM.

PS I believe Alain's referring to stray capacitance in the wires which will pretty much eliminate "needle" pulses and result in no signal at all.
rich smith is offline Find More Posts by rich smith
Last edited by rich smith; Jun 09, 2009 at 08:18 AM. Reason: ps
Reply With Quote
Old Jun 09, 2009, 06:17 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,986 Posts
Quote:
Originally Posted by Arthur P.
The simplest one, which isn't sold is based on some diodes and a single chip, the diagram for which can be found in the thread on getting PPM.
If by "simpler" you mean 800% increase in component count then you are correct. Then there's the issue that it probably don't work.

BTW I found a couple Mega8 chips labled SRVPPM in my foam trays of prototype ICs and suspect it may be the 7 channel version I referred to earlier. Should work with Tiny26 and and any other AVR with "classic" i/o map. If there's still interest I'll check it out. Hopefully the fuses are not blown.

I also found a couple PIC 629 with same label but as Bush senior used to say "aaaaain't gonna do it....".
rich smith is offline Find More Posts by rich smith
Last edited by rich smith; Jun 10, 2009 at 04:52 AM. Reason: srvppm chips
Reply With Quote
Old Jun 10, 2009, 03:23 PM
R/C newbie
United States, TX, Austin
Joined Mar 2008
181 Posts
Sorry to ask this question again. I am an RC newbie.

I know that the TX/RX use PPM to communicate the codes for the ESC and servos. I believe the RX converts these PPM pulses to PWM so that servos and ESC can understand them.

I still am trying to figure out where this PWM to PPM converter is used.

question:

1: is this muxing all the PWM channels into a single PPM channel?

Thanks!
rkovvur is offline Find More Posts by rkovvur
Reply With Quote
Old Jun 10, 2009, 04:37 PM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,986 Posts
Quote:
Originally Posted by rkovvur
I still am trying to figure out where this PWM to PPM converter is used.

question: 1: is this muxing all the PWM channels into a single PPM channel?
Thanks!

Quote:
Originally Posted by rich smith post #1
It was originally developed for a wireless buddy box but also for FMA and Paparazzi autopilots so they don't have to use special receivers or hack into a regular one to get PPM.
I actually posted my code up here in response to a request from another thread which didn't involve either application but I don't recall the details.

Or as Alain put it:

Quote:
Originally Posted by Acetronics
Hi, Rkovvur
Will be perfect for Wireless link between Master and Pupil transmitters ...
Alain
And yes, it combines several servo signals into a PPM pulse train.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Jun 10, 2009, 06:09 PM
Registered User
Hoofddorp, Netherlands
Joined Sep 2004
3,917 Posts
A number of multikopter flight controlers such as for the Mikrokopter expect the the RX signal as a single PPM train as they themselves decode and further modify the control signals, mixing in their own corrections to keep the crafts stable and controlable before sending them on to ESCs or servos.

As GPS and flight stabilisation systems become more commonplace also in the AP/AV planes, we-ll probably see the interest in receivers which have a single PPM output (only or in addition to separate PWM servo outputs) increase as this does make much more sense for interfacing with an intelligent flight controler.
Arthur P. is offline Find More Posts by Arthur P.
Reply With Quote
Old Jun 11, 2009, 08:06 PM
Registered User
East London
Joined Feb 2009
49 Posts
Quote:
Originally Posted by rich smith
Posted here in response to a request from another thread which didn't involve either application but I don't recall the details.

One thing that puzzles me is Pips connection with Ardupilot. It already has excellent PWM inputs for regular unmodified RX. Don't really see where PPM is needed there.
Hi Rich,

Thanks for the the update. Just to clarify - I'm not using an Arupilot, I'm using an arduino board to make an inexpensive DIY brushless quad (which gets combined with either Sparkfun Gyro / Accelerometer modules, or in my case the bargain $40 sensor board from a Walkera X-UFO 4 or 5 spares list). My recent post about this (in what's become a very long thread mostly driven by some great work by a guy called Mikro) is at:

http://www.rcgroups.com/forums/showp...postcount=1825

In my case, I wanted (for wiring simplicity and also to help improve my code loop rates) to convert the PWM outputs from my Spektrum to RX into a PPM single-pin input into the AVR micro on the Arduino board.

Others on the that thread have opted and prefer to use a multi-pin PWM input in much the same way as the Ardupilot - it just wasn't quite what I wanted to go for with my quad implementation (video of it in flight with your converter at work below!):

Outdoor flight of Arduino & Walkera UFO gyro quadcopter (3 min 46 sec)


By way of background, before I built a version of Rich's converter I tried a converter that I'd bought from this site:

http://www.mftech.de/catalog/product...products_id=44

Like many others, it is really intended to be used to connect a standard RX's servo outputs into PC flight sim interface (e.g. when for a user who's TX doesn't have a buddy box connector). I found, in my case it was way too 'jittery' for use with a real quad (although good enough to use with a flight sim), and at the time I was buying, there were no alternatives in stock from the Mikrokopter or other sources - It was then I gave your code a go on a spare ATTiny13 I had lying around, and it did exactly what i was looking for.

I'm really pleased to have found something that works well for me - So thanks again Rich!

Cheers,

Pip
pipsqueak is offline Find More Posts by pipsqueak
Reply With Quote
Old Jun 11, 2009, 08:17 PM
Registered User
East London
Joined Feb 2009
49 Posts
Quote:
Originally Posted by rich smith
BTW I found a couple Mega8 chips labled SRVPPM in my foam trays of prototype ICs and suspect it may be the 7 channel version I referred to earlier. Should work with Tiny26 and and any other AVR with "classic" i/o map. If there's still interest I'll check it out. Hopefully the fuses are not blown.
.
@Rich,
Hi - if you were able to grab & share the firmware off a 7 channel version, I'd be very interested - I've got some Tiny26's around, so it would actually be ideal!

Cheers,

Pip
pipsqueak is offline Find More Posts by pipsqueak
Reply With Quote
Old Jun 12, 2009, 09:09 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,986 Posts
Quote:
Originally Posted by pipsqueak
@Rich,
Hi - if you were able to grab & share the firmware off a 7 channel version, I'd be very interested - I've got some Tiny26's around, so it would actually be ideal!
Cheers,Pip
Luckily the chips were unlocked so here's code. Should work unmodified on a Tiny26 too or any old AVR with a port B. Pinout should be same as the Tiny13 one with extra channels added on after 4. Just from memory, it's been a few years.

No chance to test it myself because my Futabas batt is dead and also I don't have a Mega8 socket wired up. Please post result so we'll know. Photo would be nice too so others can benefit.

SRVPPM83.HEX:

:020000020000FC
:100000007FE97DBFBC9A61E010D062E00ED064E071
:100010000CD068E00AD060E208D060E406D060E866
:1000200004D0C49A0CD0C498EECF76B37623E9F30B
:10003000C49A05D0C49876B37623E9F7089593E07F
:100040000197F1F708952863292032303036205285
:060050002E536D69746877
:00000001FF
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Jun 13, 2009, 05:54 AM
Registered User
Hoofddorp, Netherlands
Joined Sep 2004
3,917 Posts
Quote:
Originally Posted by rich smith
If by "simpler" you mean 800% increase in component count then you are correct. Then there's the issue that it probably don't work.

BTW I found a couple Mega8 chips labled SRVPPM in my foam trays of prototype ICs and suspect it may be the 7 channel version I referred to earlier. Should work with Tiny26 and and any other AVR with "classic" i/o map. If there's still interest I'll check it out. Hopefully the fuses are not blown.

I also found a couple PIC 629 with same label but as Bush senior used to say "aaaaain't gonna do it....".

The simple PWM to PPM converter described here http://www.rcgroups.com/forums/showp...71&postcount=6 in the thread on getting PPM from a RX without PPM stage such as the AR7000 http://www.rcgroups.com/forums/showt...&highlight=ppm works fine. I-ve been flying multikopters with it for more than a year now. Further improvements to this circuit, including a 3V regulator to ensure better performance and also of including a PIC to capture the AR7000 failsafe mode and correct for that, are described in the RC CAM Man forum here: http://www.rc-cam.com/forum/index.ph...pic=2064&st=20

Another PWM to PPM converter described here:
http://www.rcgroups.com/forums/showt...&highlight=ppm

Using the search function within RC Groups can be very useful to avoid re-inventing the wheel.
Arthur P. is offline Find More Posts by Arthur P.
Reply With Quote
Old Jun 13, 2009, 06:42 AM
7000mw of raw power!
rich smith's Avatar
New Hampshire (not the old one)
Joined Dec 2006
5,986 Posts
Arthur, as I've shown with scope diagrams above those circuits may work with some older RX but the "needle" pulses are too small for popular modern DSP units. If someone absolutley fears flashing ICs (uPhobia) then it is possible to build one with linear components but many RX will not work and even on those that do work the signal does not resemble PPM. Signal timing will be very unfriendly for flight computers. And again the component count is many times that of uP based designs.

That method also fails completely on RX that output servo pulses at the same time.

BTW your last link (James request for PWM2PPM) is the one that prompted this thread. That other application I was trying to recall was Mikrocopter mixer.

Thanks for providing those links earlier like the Turnigy 6a ones. I now have 3 more huge threads to subscribe. Don't know how I missed them before.

Quote:
Originally Posted by Arthur P. RC CAM FORUM
My signal misses the opening 0.3msec spike. And seemingly the MK wants to see a full 0-5-0V transition to trigger the timer. So with the signal straight out of the converter it sees channels 2 through 7 but thinks these are channels 1 through 6. And with the inverted signal it sees channels 1 through 6 as 1 through 6, but doesn't see 7.
Quote:
Originally Posted by Arthur P.
The simple PWM to PPM converter described here http://www.rcgroups.com/forums/showp...71&postcount=6 in the thread on getting PPM from a RX without PPM stage such as the AR7000 http://www.rcgroups.com/forums/showt...&highlight=ppm works fine. I-ve been flying multikopters with it for more than a year now. Further improvements to this circuit, including a 3V regulator to ensure better performance and also of including a PIC to capture the AR7000 failsafe mode and correct for that, are described in the RC CAM Man forum here: http://www.rc-cam.com/forum/index.ph...pic=2064&st=20

Another PWM to PPM converter described here:
http://www.rcgroups.com/forums/showt...&highlight=ppm

Using the search function within RC Groups can be very useful to avoid re-inventing the wheel.
rich smith is offline Find More Posts by rich smith
Reply With Quote
Old Jul 11, 2009, 08:54 AM
Registered User
Joined Feb 2009
166 Posts
Does this code work with mega 8

Quote:
Originally Posted by rich smith
Luckily the chips were unlocked so here's code. Should work unmodified on a Tiny26 too or any old AVR with a port B. Pinout should be same as the Tiny13 one with extra channels added on after 4. Just from memory, it's been a few years.

No chance to test it myself because my Futabas batt is dead and also I don't have a Mega8 socket wired up. Please post result so we'll know. Photo would be nice too so others can benefit.

SRVPPM83.HEX:

:020000020000FC
:100000007FE97DBFBC9A61E010D062E00ED064E071
:100010000CD068E00AD060E208D060E406D060E866
:1000200004D0C49A0CD0C498EECF76B37623E9F30B
:10003000C49A05D0C49876B37623E9F7089593E07F
:100040000197F1F708952863292032303036205285
:060050002E536D69746877
:00000001FF


Does this cod work for mega 8 or any other code for mega 8
kanchana is offline Find More Posts by kanchana
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion how to convert PWM servo signal to DC voltage sahilkit DIY Electronics 15 Oct 05, 2008 10:23 PM
Mini-HowTo Motor PWM to PPM impulse converter quax DIY Electronics 27 Jun 17, 2008 12:38 AM
PWM to servo signal conversion? mcross DIY Electronics 13 Jul 05, 2005 09:48 PM
Futaba PCM receiver servo pulse other than PPM? risto Power Systems 14 Feb 14, 2002 01:18 PM