How to read PWM from Rx with Arduino UNO?

Hi all, very sorry if this has been answered elsewhere, but I've spent several hours searching this site and the web in general and have not found a great answer.

 

I'd like to read the PWM servo signals coming out of my receiver (Spektrum Ar600) with an Arduino UNO board and mirror them back out to the servo (so I can eventually add some control in the future). Creating PWM signals with the Arduino appears straight forward, but reading them has not been so obvious.

I've found instructions on doing this with pulseIn but it appears from what I've read that that's a slow method and limited to only 2-3 channels.  I've also seen a lot of discussion regarding using interupts to do this but haven't found any good explanation or code on how I can implement.  Any links to help/example code would be greatly appreciated!

Thanks 

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

Join diydrones

Email me when people reply –

Replies

  • Hello,

    I am implementing reading PWM on arduino mega by interupt by the signal is not perfect, i am wondering if this "noise" some from software signal or hardware? (see attached image)

    Do you have the same noise?

    In the image nomovement i don't move the radio, in the image MinMaxMovement i move the radio to min and max.

    Due to this error i have more error in my PID :-(

    Ghis

    noMovement.PNG

    MimMaxMovement.PNG

    https://storage.ning.com/topology/rest/1.0/file/get/3692445005?profile=original
  • 3D Robotics
    The simplest example we have in in our Blimpduino code. Check the RC tab:

    http://code.google.com/p/blimpduino/downloads/list
This reply was deleted.

Activity

DIY Robocars via Twitter
RT @a1k0n: Starting on a rough guess of the track centerline as an SVG. Then I use svgpathtools to generate equally-spaced points w/ direct…
yesterday
DIY Robocars via Twitter
RT @a1k0n: This rules. My existing code isn't going to work *at all* -- the track planner and precomputed map are out. However, it forces m…
yesterday
DIY Robocars via Twitter
RT @chr1sa: Our new @DIYRobocars track at @circuitlaunch is fiendishly hard & crashtastic fun. Combines hairpin curves with an intersection…
yesterday
DIY Robocars via Twitter
The May @donkey_car newsletter is out, with news about release 4.2, next events and more https://donkeycar.substack.com/p/may-newsletter
yesterday
DIY Robocars via Twitter
Friday
DIY Robocars via Twitter
Friday
DIY Robocars via Twitter
RT @breadcentric: Bingo card for AWS DeepRacer Finale, starting in 10 minutes on https://www.twitch.tv/aws ! #AWSDeepRacer #DeepRacer #Machin…
Friday
DIY Robocars via Twitter
RT @NVIDIAEmbedded: It's #NanoFriday - the RB-0 uses the same suspension concept as #NASA's newer differential-bar rovers. This educational…
Friday
DIY Robocars via Twitter
RT @chr1sa: On May 22, we're returning to in-person AI @DIYRobocar racing at @circuitlaunch. The Amazon @awscloud DeepRacer team will be pr…
Wednesday
DIY Robocars via Twitter
RT @breadcentric: On my CV: Hobbies: Training bananas to race on tracks #AWSDeepRacer #DeepRacer https://t.co/MKe14hNyux
Wednesday
DIY Robocars via Twitter
RT @breadcentric: See how the April AWS DeepRacer races have ended and a couple bits of news: https://blog.deepracing.io/2021/05/09/aws-deepracer-league-2021-update-11-end-of-april-special/ #AWSDeepRacer #Machin…
May 10
DIY Robocars via Twitter
RT @sunilmallya: Representation Learning +Instance Transfer to learn new reward functions along with advantage based filtering of new exper…
May 9
DIY Robocars via Twitter
Apr 27
DIY Robocars via Twitter
Apr 27
DIY Robocars via Twitter
RT @f1tenth: Sliding (autonomously) into the weekend like ... 🤖😎 #f1tenth #robots #AutonomousVehicles @OpenRoboticsOrg @NVIDIAEmbedded @Aut…
Apr 25
DIY Robocars via Twitter
RT @chr1sa: One of the problems with autonomous car racing is that watching software drive is not a very exciting spectator sport. To help…
Apr 25
More…