2

I want to WRITE a Pulse Position Modulation (PPM) to an arduino from a raspberrypi. Is the board capable to do this and if so, from which port/pin?

A pulse position modulation is a signal that consists of a priod of silence (sync reset) and alternating pulses separated by periods of constant silence.

Here's an example

EDIT:

As per the suggestions down below in the comments:
- Channel max pulse width: 2000us - Channel min pulse width: 1000us - A constant number of 8 channels - Frame rate: One frame every 10 milliseconds

The information is read from a server via C sockets (in a client-server application)

I receive the message from the server and after being decoded we are left with:

1000:1520:1200:1000:1000:2000:2000:1300

This will be broken up into chunks and assigned to variables. A function uses these variables to create the signal and send it via GPIO.

sendPPM(args[]);

Could you point me to what C library I could use to do this or point me to further reading on this subject?

EDIT 2:
Apparently @joan has a library on this. I read the specification on this site, but unfortunately I don't know python and I don't know where to start with C. I see the C examples on PPM are missing. I am happy to share my code with the owner of the site if someone could guide me on it afterwards.

bem22
  • 121
  • 4
  • What sort of PPM? Like that used by hobby radio controllers? Can you edit your question to give the salient characteristics of the type of signal you want to generate. – joan Oct 26 '19 at 22:07
  • Exactly. Update posted. – bem22 Oct 27 '19 at 01:09
  • You might like to read my answer to the following PPM question and see if it is helpful. I am happy to give a more detailed answer tailored to your specific requirement: https://raspberrypi.stackexchange.com/questions/104408/using-a-raspberry-pi-to-control-a-model-of-the-uss-nimitz-and-possibly-using-an. Cheers. – tlfong01 Oct 27 '19 at 02:05
  • That's a really sophisticated answer. Indeed. I want to do what you achieved in channel 1. I would like to create a pulse train that is read by arduino in INT0 (interrupt routine). Is there way to generate this in C/Cpp on rpi? I need to integrate it with other things and it would be neat – bem22 Oct 27 '19 at 08:37
  • 1
    It would be helpful if you included the diagram and explanatory text in your question. That would allow your question to stand alone. You have given some indication of the expected outputs. You have made no mention of the expected inputs. The Pi can easily perform this task (I have a Python program to generate PPM). However the question is still too vague to warrant an answer. – joan Oct 27 '19 at 10:15
  • I attached an image with what I am looking for. That's the exact format I would like to have my 1 pulse train contain (channel1, channel2, channel3, channel4, channel x and a last chanel for encoding) – bem22 Oct 27 '19 at 19:08
  • @bem22 You need to edit ALL relevant information into your question (not as comments). If you don't you are unlikely to get any useful answers. – joan Oct 27 '19 at 20:31
  • @joan, could you suggest what I could add to make this more clear, please? – bem22 Oct 28 '19 at 08:49
  • Minimum/maximum channels. Minimum/maximum pulsewidth. Minimum/maximum frame rate. How is this information provided to the program? For that input precisley what is the output created. Don't say look at the linked diagram, that is an overview. – joan Oct 28 '19 at 09:13
  • @joan I updated my question as requested – bem22 Nov 03 '19 at 16:49

0 Answers0