Reading PWM Receiver Signal Using Arduino

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • Here I show you how to decode a PWM signal coming from a Turnigy receiver using an Arduino Mega board. This program should run on any Arduino board and should be compatible with every receiver.
    If you have any questions or want me to explain something else or in more detail, leave a comment.
    Thanks

Комментарии • 127

  • @laurentmaillard1355
    @laurentmaillard1355 4 года назад +1

    2020 and still relevant ! Thank you !

  • @profsacin
    @profsacin 8 лет назад +4

    Well explained. Just what I was looking for to build an arduino led controller for my plane. I played the video at 1.5 speed though

  • @hilmidwiputranto6944
    @hilmidwiputranto6944 8 лет назад +9

    thank you so much, this video helps me a lot. Now i can switch my led on and off on my quadcopter using remote

  • @ezcook57
    @ezcook57 8 лет назад +15

    Nicely done. Just what I was looking for. Very much appreciate your time and effort expended in this effort.

    • @bbrao778
      @bbrao778 3 года назад

      Just what I was looking for... 👍

  • @joekirklin
    @joekirklin 5 лет назад +1

    Excellent explanation. Thank you for sharing your knowledge.

  • @willridgway2513
    @willridgway2513 2 года назад

    Got the code to work with my Turnigy 9x! thank you

  • @longhornmopar
    @longhornmopar 7 лет назад +2

    Great video! Very clear and well-made. Thanks.

  • @thomasalexander1563
    @thomasalexander1563 7 лет назад +1

    Amazing,,, Very rare tutorial..
    This is very usefull..

  • @AmPleanGaming
    @AmPleanGaming 3 года назад +1

    thanks bro it was too simple than i though bery very thank you

  • @ricardrinaldo4791
    @ricardrinaldo4791 4 года назад +1

    Just what I needed, thanks. :)

  • @MMT_Pii
    @MMT_Pii 4 года назад

    I love you for making this video

  • @Reach3DPrinters
    @Reach3DPrinters 7 лет назад +1

    Most excellent. Thanks Kamran.

  • @MixZTitaniumDubstep
    @MixZTitaniumDubstep 8 лет назад +2

    I'm working on an ECX Circuit model RC. What I'm trying to accomplish is:
    1. convert 2 channels (aileron+rudder) into one steering channel
    1a. aileron=strafe
    1b. rudder=steering
    1c. strafe will add difference from center of aileron then subtract that value via the Arduino clock, therefore simulating what a real car does to change lanes
    2. convert 2 other channels (throttle+elevation) to one drive channel
    2a. elevation is forward/backward drive
    2b. throttle is maximum speed

  • @jakubrendek8406
    @jakubrendek8406 4 года назад +1

    Please can you create a new video about sending recived pwm signals to servos ? Thanks

  • @carlosangelpatriciomartine3903
    @carlosangelpatriciomartine3903 6 лет назад

    Thanks for your video. It helped me with my project.

  • @TheF22raptorang
    @TheF22raptorang 3 года назад

    So easy to understand i love it

  • @furkankuyumcu8243
    @furkankuyumcu8243 4 года назад +1

    Thank you so much.Greetings from Turkey

  • @ishakamrani7891
    @ishakamrani7891 7 лет назад +1

    can i genirate tow pulse signals and controle the dutu cycle of each one ? in real time ? for example the firste signle start with 5V the second start from 0 at time 0s.
    and thanks for eplication.

  • @dronesvisionsaeriennes
    @dronesvisionsaeriennes 5 лет назад +1

    hi Ahmad i've just discovered your video which is very interesting ...i've understand some things and i get a good result with my X8r receiver on Arduino Nano...4 channels run with your program and i get the variables about 1500 to 984 or 2050 etc... when i move the sticks on my Taranis Plus...but when i plug only with Sbus ... + on Vin ( arduino ) then - on GND ( arduino ) then the Signal from receiver to arduino i don't know exactly where i have to connect this yellow ( or orange ) wire ...and i get Nothing...
    thank's for your next answer
    Philippe

  • @robertbuckles3596
    @robertbuckles3596 5 лет назад +2

    i have been searching for this for a very long time! EXCELLENT!!!!

  • @chefseg
    @chefseg 4 года назад

    Great video - thank you!

  • @TheSateef
    @TheSateef 5 лет назад +1

    any reason why you used a double and not an int?

  • @weimarvillarreal2346
    @weimarvillarreal2346 5 лет назад +1

    thank you very much I was looking for a pwm signal reader and it helped me a lot to simplify my code

  • @tayefmahmud9515
    @tayefmahmud9515 4 года назад +1

    can you please help by adding the "if" and "else" code in this function acoding to the value of recever

  • @krisharris4158
    @krisharris4158 7 лет назад +1

    Thanks! Very helpful

  • @fabriciob8960
    @fabriciob8960 5 лет назад +1

    Man, myass belongs to you. THANKS a lot ! Greetings form Mexico

  • @imales40
    @imales40 3 года назад

    Kamran Ahmet Very good work I tried it on Radiolink AT 10, it worked great. Thanks bro.

  • @LeeRaven-rb4dp
    @LeeRaven-rb4dp 3 года назад

    Hey man,just wanted to know if are u using this to make the Arduino as a receiver?Total newbie here.

  • @youtubxkip
    @youtubxkip 5 лет назад

    The only problem here is - copy paste... When there is something more than 1, you just need an arrays and loops...

  • @Raamkrishnadas
    @Raamkrishnadas 9 месяцев назад

    Can I set these times as binary 1,0? Suppose 8ms high is 1 , 16ms high is 11, 8 ms low is 0. Like these.

  • @Raamkrishnadas
    @Raamkrishnadas 9 месяцев назад

    Can I set these times as binary 1,0? Suppose 8ms high is 1 , 16ms high is 11, 8 ms low is 0. Like these.

  • @umairm.5662
    @umairm.5662 6 лет назад +1

    Nice one. Now, I have an idea how to perform it using cortex.

  • @sbpcls
    @sbpcls 3 года назад

    the tx you are using include a ppm out pin and a ppm in pin . on the main board inside.
    if you connect the tx out on the transmitter and solder a wire . can you see the same readings?

  • @dondominic7404
    @dondominic7404 3 года назад +1

    Exactly what I was looking for. Thanks

  • @vamshioruganti6319
    @vamshioruganti6319 5 лет назад +1

    Nice sir.
    Very clear explanation thnksalot.
    I've one doubt
    How to turn on led or relay useing this signal by one moment of the joystick.

    • @atuwa5705
      @atuwa5705 5 лет назад

      how did you do this? I want to control a servo motor with the PWM inputs.

  • @ImperialLightandMagic
    @ImperialLightandMagic 2 года назад

    Hi, thank you so much for posting this video. I have a strange issue however where the arduino runs incredibly slowly if I upload this code (tried on a nano and a mega). My output println only displays about once per second. The arduino's are fine with other example sketches. Any idea what may be causing this?

  • @jamawahid9408
    @jamawahid9408 4 года назад

    u have a beautiful pen

  • @Kotobuben
    @Kotobuben 3 года назад +1

    thanks a lot man, easy & quick, just what I was need!

  • @degklump1999
    @degklump1999 6 лет назад

    Good instructional video! But how to translate the rc pwm signal to 0-5Volt out signal??

  • @atech6580
    @atech6580 3 года назад

    How can I save and output the same signal to another pin on the board.

  • @easyfpv3606
    @easyfpv3606 2 года назад

    U are the best . How we can get ppm out and make ppm in

  • @fandiafrizal5363
    @fandiafrizal5363 7 лет назад +3

    thanks bro

  • @siddharth4662
    @siddharth4662 8 лет назад +1

    great video!!! you got a subscriber. :-)

  • @massimilianonball
    @massimilianonball 8 лет назад

    Hy!!
    Many compliments for your tutorial. Is there a way to receive the pwm input directly in a raspberry pi, rather then an arduino board? I need the raspberry because i must use a linux distribution to make other stuff with the pwm input from the receiver of my drone's remote. Many thanks

  • @drb41602
    @drb41602 3 года назад

    For your next challenge, read a sbus receiver.

  • @HungNguyen-oz1jc
    @HungNguyen-oz1jc 2 года назад

    I used your code but the PWM signal does not print out like yours instead it jumps crazily from 0 -> 10000, what was the problem?

    • @narenku6759
      @narenku6759 Год назад

      hi i have the same issue did you solve it?

  • @captainric2364
    @captainric2364 4 года назад +1

    Just what I was looking for! Thank you!

  • @paveldvorak8245
    @paveldvorak8245 4 года назад +1

    Super, you opened my eyes :)

  • @georgesmith8988
    @georgesmith8988 3 года назад

    Great I’ve been looking for ages for code that can read a PWM signal, thanx

  • @aptoni
    @aptoni 5 лет назад +1

    Hi Ahmad, thank you so much for this tutorial. Easy to understand. Great work!

  • @eletronicaparaohooby
    @eletronicaparaohooby 7 лет назад

    Hi friend, very well explained.
    But I saw a video of your previous explaining about the interruptions.
    I use the Arduino pulsein command, but I do not know if you already tested it with this command? It takes too long wend not a signal !!
    Turn off your radio and implement a messaging routine, for example, to see how long the response time takes when there is no signal.
    I tried to do an if check : if (digital read (channel1, HIGH))
    {Time = pulsein (channel1, HIGH)}
    He does not accept this type of verification.
    There's a video explaining about the interruptions and the 4 ports.
    How can you post a code explaining how to read 4 physical channels in arduino ??
    The other video reading ppm on a single channel is great !!
    Thank you

  • @imamsuryadinata5252
    @imamsuryadinata5252 4 года назад

    and how to output mode from arduino to receiver fs ?

  • @GurpreetSingh-bh3wk
    @GurpreetSingh-bh3wk 4 года назад

    Thanks for the video, very helpful

  • @MrRAJASEKHARi1996
    @MrRAJASEKHARi1996 5 лет назад +1

    Thank you bro ! Appreciate it.

  • @whathefunctr
    @whathefunctr 7 лет назад

    I did it but have some problem motor is every time going to forward not going to back and the second channel ( I put the motor ) is turning to right dont turn to left (my english is very bad I am Turkish ) please help me

  • @unlimitedtechniqs3395
    @unlimitedtechniqs3395 3 года назад

    Pls speak little loud your voice is low..

  • @dronesvisionsaeriennes
    @dronesvisionsaeriennes 5 лет назад

    Hi Kamran, i get 4 channels on my Delta8 receiverthen i add another one ( the sixth) to plug a servo..for this moment i get 5 responses on arduino serial monitor (115200 bauds )....more important i understand what the arduino do....! great thanks to you
    Philippe

  • @noviukx
    @noviukx 5 лет назад

    Change the name to "Reading Multiple PWM Signals Using Arduino"
    Easy to find how to read single signal, but more than one not.
    I skipped this video few times because i thought its about single PWM signal.
    Big Thanks.

  • @pranjal3727
    @pranjal3727 4 года назад

    Nice video.
    Please speak a lot louder.

  • @mikegroger6708
    @mikegroger6708 4 года назад

    My value is keep rising..maybe no change in output signal..but it is bind with transmitter

  • @ramazans8114
    @ramazans8114 7 лет назад

    Hello, is it possible the program it while joystick is middle position , pwm is %,0 , Down side %50 , up side %100. If possible I can remote caterpillar skidloader ;)

  • @kyler2532
    @kyler2532 5 лет назад +1

    Exactly what i was needing. Thanks!

  • @高东-y2f
    @高东-y2f 7 лет назад

    thank you very much. i use hubsan H320f transmission and RX i connect 2 channel on rx with arduino UNO as you do in your vedio.but the serial monitor shows both channel are 0 us.and when i disconnect the GND line , both channel change a lot 8000-10000.Do you know what is the matter ?

  • @Anton-sz6ef
    @Anton-sz6ef 5 лет назад

    Can I do that with an external ADC ? I mean, I do realize it's useless to do that, but still I wanna try it out once my board comes.

  • @simpleman9441
    @simpleman9441 3 года назад

    Thank you Sir

  • @russellking747
    @russellking747 7 лет назад +1

    Perfect! You my friend, are subbed!

  • @lionxuser
    @lionxuser 8 лет назад +1

    this is exactly what i was lokking for, thanks a lot :)

  • @srinivasasatya6797
    @srinivasasatya6797 5 лет назад

    Can you tell me how can we read the values directly from the transmitter directly and send it to another receiver like nrf24l01 or other

  • @dronesvisionsaeriennes
    @dronesvisionsaeriennes 5 лет назад

    hi Kamran, very good job...but is it the same wire to connect a X8R receiver with Sbus and arduino nano...? Thank's a lot

  • @oskanooskano5507
    @oskanooskano5507 3 года назад

    once you get those values, how do you write them to receiver, would you be using analogwrite?

  • @yashrathore2935
    @yashrathore2935 7 лет назад

    is it necessary to connect the Reciever signal pins to the PWM pins of the Arduino or it can also work by connecting with the digital pins??

  • @AhmadFauzi-lc6dp
    @AhmadFauzi-lc6dp 6 лет назад

    hi kamran , can u teach me ? how make it to acces motor driver and servo on arduino with a Tx Tgy 9x . please, show me. thank's .

  • @dronesvisionsaeriennes
    @dronesvisionsaeriennes 6 лет назад

    Hi Kamran, very good explainations...i'll try it because i didn't know how to do this....good video...thank's a lot...Phil

  • @andresgolfgti
    @andresgolfgti 7 лет назад +1

    nice job, thank you!

  • @atomsbaza2
    @atomsbaza2 7 лет назад

    If I write "myservo.writeMicroseconds(channel[0])" It will send value of PWM to other controller?

  • @domel1410
    @domel1410 Год назад

    very goog very good

  • @airdesigner4053
    @airdesigner4053 2 года назад

    Nice video, but how can I use pwm signal to set pin High or Low?

  • @dshep101
    @dshep101 4 года назад

    many thanks, just wanted a simple way to get my board and receiver talking and after alot of overly complex explanations your's did the trick!

  • @LucasVieira-qq5lw
    @LucasVieira-qq5lw 7 лет назад

    do you know how to control ppjoy or another virtual controller with these numbers? tks

  • @fotoamgamgfoto3695
    @fotoamgamgfoto3695 8 лет назад

    this is only good if you have one channel... or 100msec will be the delay

  • @upsamadasakaldiha3132
    @upsamadasakaldiha3132 4 года назад

    use intrrupts

  • @tranthanhhai3239
    @tranthanhhai3239 8 лет назад

    I used flysky i6,, but do not get value from 1000us to 2000us range. Instead, unstable values from 80 to 10000us. Tell me the cause and how to fix it?

    • @Bisofication
      @Bisofication 7 лет назад

      Well, you don't need to fix it because it's not broken. Every company uses numbers and values that can be different from other transmitter/receiver companies.

  • @SkyhanViper
    @SkyhanViper 7 лет назад +1

    thank you buddy, super easy

  • @rahulghosh4289
    @rahulghosh4289 5 лет назад

    Thankyou

  • @yaqubshuaib5060
    @yaqubshuaib5060 5 лет назад

    Sir how can I write this input signal as same as output
    Pls help me.

  • @stavroshouiris
    @stavroshouiris 5 лет назад

    what's the point if you end up with these huge fluctuations, I feel as if this is an unreliable solution because of how un-precise it ends up being

  • @LUIS-yh6nd
    @LUIS-yh6nd 7 лет назад

    hi friend, exelent proyect! I need read the code wltoys control transmitter... can I use this program for that?

  • @ehsanaz1928
    @ehsanaz1928 3 года назад

    دمت گرم داداش

  • @biswaranjanpradhan6248
    @biswaranjanpradhan6248 3 года назад

    Thanks bro

  • @whathefunctr
    @whathefunctr 7 лет назад

    I did push the like button and sub to your channel You are awesome bro :)

  • @SuperUnhappyman
    @SuperUnhappyman 7 лет назад

    im working with a coin reader that releases a pulse width after a coin is accepted
    could i read it if i did the same thing as you did in this video?

  • @yaqop8581
    @yaqop8581 5 лет назад

    Good vid

  • @fade9966
    @fade9966 3 года назад

    i need some help if anyone could help me so i will make an led flash with my car i mean when i reach maximum left or right the led should start flashing how can i do a if statement with that im really struggeling rn

  • @atuwa5705
    @atuwa5705 5 лет назад

    how do I use the PWM inputs to steer a servo motor?

  • @daravind8475
    @daravind8475 8 лет назад

    also, pls tell me how to calculate the phase difference between these receiver signals?

  • @ratankamble2195
    @ratankamble2195 7 лет назад

    i m working on tilt arm quadcopter , so can i use this values for rotate the servos using map ()

  • @meryemerdogan93
    @meryemerdogan93 7 лет назад +1

    thank you realy

  • @raoufsmida6220
    @raoufsmida6220 7 лет назад

    how can reading the impulse from the meter electronic

  • @wathakker-3234
    @wathakker-3234 8 лет назад

    hello bro
    can u give me the code of arduino trans from ppm to pwm ?

  • @demersonrocha
    @demersonrocha 7 лет назад

    Great job, can I connect a servo at the output of the arduino and veil interpreting these signals?