JAVA -- Generate PPM/PWM Signals -- How To

Good Afternoon! I need some help  with a personal project, below is what I'm trying to achieve.

What I'd like to do:

1) Capture input from a Joystick or other USB devices.
2) Convert the input into a PPM signal that can be output through a USB cable.
3) Create a USB to Stereo cable adapter.


I'm pretty sure there are libraries I can use to capture the input, so I'm not terribly worried about # 1 yet.

But what I cannot find on google is how to generate a PPM/PWM signal and then output it via USB.

Any guidance would be appreciated.

NOTE: I know there are already COTS products/software available, but I want to do this all on my own for the learning experience.
P.S. - Any books/reading on how to design hardware/software around signal communication in the application of UAVs will also be appreciated.
Thanks!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • It's pretty easy with a high quality sound card. You'll need JavaSound and basic knowledge of bitrate, amplitude, pulsewidth (e.g. 44.1Khz). Just do the math and send out an array of non-zero values on the outputbuffer. You can verify your signals by connecting mic and audio out and using xoscope or Osqoop. Works great, we do it here.

    Javasound has example code to play square waves, but it's written to follow the output frequency (i.e. to play audio, not PPM/PWM)--one can just modify it for their PWM needs.

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…