Це відео не доступне.
Перепрошуємо.

Adventures in Science: Using an RC Hobby Controller with Arduino

Поділитися
Вставка
  • Опубліковано 21 сер 2017
  • AVC homepage: avc.sparkfun.com/
    1 Channel Demo code: gist.github.com/ShawnHymel/52...
    Learning how to control motors and drive your robot is the first step in creating your combat bot. We look at how to read a pulse width signal from an RC receiver using an Arduino and convert that into a PWM signal for driving motors. We use only 1 channel in this video, as mixing channels for steering is saved for another episode.

КОМЕНТАРІ • 60

  • @jesusesquibel4181
    @jesusesquibel4181 7 років тому +10

    As someone who is really interested in coding and physical computing, I really appreciate all of your videos. Thank you for taking the time to explain to those of us who are interested in growing.

    • @ShawnHymel
      @ShawnHymel 7 років тому +1

      Glad to hear that they're helping! Keep tinkering and coding!

  • @domiflichi
    @domiflichi 7 років тому +5

    Thank you thank you! This is almost exactly what I've been wanting to learn how to do for my latest project!

  • @jimbobillybob1959
    @jimbobillybob1959 7 років тому +2

    Great break down! Keep these videos coming.

  • @michaelsteinbach
    @michaelsteinbach 7 років тому

    On my JR XY421, they use the same assembly for both sticks. It's pretty easy to take the controller apart and add a spring to the left stick if you want it to center like the right stick.

  • @Taran72
    @Taran72 5 років тому +3

    Great Video! thank you for sharing the code.

  • @charlespenny9611
    @charlespenny9611 6 років тому +2

    Was having trouble and figured “someone has to of done this before right?”. Very helpful, very fun!

  • @moadtheconquer
    @moadtheconquer 6 років тому +1

    Awesome work bro .. keep going

  • @naboulsikhalid7763
    @naboulsikhalid7763 2 роки тому

    GOD bless you, at last I found it. My project to use RC controller to drive my skateboard. 100000 Thank you

  • @iamamazingist
    @iamamazingist 7 років тому

    very nice and useful video,, clear explanation,, thanks,,

  • @agusbintarto
    @agusbintarto 3 роки тому

    thank you for sharing the code.

  • @BarefootBeekeeper
    @BarefootBeekeeper 6 років тому

    Here's a question for anyone who knows: what happens with the trimmers on the transmitter when you convert it to Arduino? Can they be incorporated do they still do their job? If so, how are they connected? If not, how do you trim the quad before/during flight?

  • @teddymekbib5007
    @teddymekbib5007 5 років тому

    Thank you very much.

  • @TeagueChrystie
    @TeagueChrystie 7 років тому

    Fantastic. Thanks.

  • @learnings...1448
    @learnings...1448 6 років тому

    thank you for the great videos......
    can you create a video on how to manage power in the robot for battlebot.......
    really it is so hard to manage........

  • @jpsalis
    @jpsalis 5 років тому +2

    Ooh boy, I went away with pwm receivers for Arduino, I needed too many channels and didn't want to buy a mega for extra interrupts. PPM and serial are a lot better I've seen, since they use a single output.

    • @JohnDoe-ir8te
      @JohnDoe-ir8te 5 років тому

      Learn how to make an Arduino PCB and add PWM motor drivers like the tb6612

  • @pobringengineer637
    @pobringengineer637 7 років тому

    could you do a video about mixing 4 channel up tp 6 channel with arduino and rc

  • @martinerzberger5419
    @martinerzberger5419 7 років тому +2

    pulseIn blocks until the IO port goes high. So in this case, it's blocked for 19 out of 20ms. If you want to use the Arduino for more than just RC control (e.g. to drive some APA102 LEDs on the robot) then you have to use an interrupt handler for the RC pulse. Since this is not much more complex, I would never use pulseIn to read RC signals.

    • @ShawnHymel
      @ShawnHymel 7 років тому

      Very true, and thanks for pointing it out. Interrupts are definitely the way to go, but pulseIn is a bit easier to explain to beginners if you're just driving some motors.

    • @LSUtiger607
      @LSUtiger607 7 років тому

      Shawn Hymel . Could you do an additional video explaining interrupts? I've been struggling to read multiple PWMs while also doing computation on the arduino and driving outputs. For example, my stepper motor output behaves very erratically when I'm reading multiple PulseIn PWMs. Thanks.

    • @martinerzberger5419
      @martinerzberger5419 7 років тому

      Yes, I agree, the code is easier to understand. I am a tad sensitive about this subject because I once wasted several days trying to understand why stuff did not work as expected. In the end it was pulseIn that blocked the Arduino way too long ;)

    • @martinerzberger5419
      @martinerzberger5419 7 років тому

      @LSUtiger607: If you need more than one RC signal I would use a receiver that can output all channels over a combined line. This way you only need one port of the Arduino, and you have more processing power left. A (German) code sample for one particular type of signal (PPM, or Pulse-Pause-Modulation) is here: github.com/tinue/SUMO_Analyse

    • @ShawnHymel
      @ShawnHymel 7 років тому

      @LSUtiger607 Good to know there's interest in interrupts. I will add it to my list of videos to make (I'd like to get through other basic programming concepts first, though). Geaux Tigers ;)

  • @nikken_s_f3200
    @nikken_s_f3200 3 роки тому

    I like this!

  • @TheTwtwo
    @TheTwtwo 6 років тому

    A really fun way of doing this is using a falling or rising edge interrupt, and a PPM enabled reciever, you can decode 6 channels via 1 input.
    void pulseDetect(){
    pulsePrevious = pulseRising;
    pulseRising = micros();
    pulseLenght = micros() - pulsePrevious;
    if (pulseLenght > 3500 && pulseLenght < 20000 ){ // Sync pulse of CPPM Frame detection max fram length is about 20000 microseconds
    channel =0 ; // To store sync pulse value in ppmValue[0] , now channel 0 is set all other pulses will be read and stored, until next sync pulse.
    }
    ppmValue[channel] = pulseLenght;
    channel = channel+1;
    if (channel > 13){ //this allows incase code starts after sync all pulses will be dumped into these out of bounds channels.
    channel = 12;
    }

  • @CHUMODAN111
    @CHUMODAN111 3 роки тому

    полезно. спасибо

  • @AllThingsGundam
    @AllThingsGundam 6 років тому

    Hello sparkfun, May I use 2 SparkFun Motor Driver - Dual TB6612FNG on 1 uno ardunio? This will be my first time making a robot for the beetle weight class and a robot period. Thanks Derek.

  • @reynery
    @reynery 5 років тому

    The receiver for a FS-I6 is the same as this one?

  • @casbremer7793
    @casbremer7793 5 років тому

    i am trying to use a helicopter receiver with the remote but with the code there is no min -255 and max 255 showing but only the big numbers

  • @christianparedes5625
    @christianparedes5625 4 роки тому

    I love you!!!!

  • @harshitjain4793
    @harshitjain4793 5 років тому

    where should i suppose to connect the APWM and BPWM pins on the arduino

    • @rahulbgautam
      @rahulbgautam 4 роки тому

      learn.sparkfun.com/tutorials/tb6612fng-hookup-guide?_ga=2.57332905.207522859.1591551093-2137521739.1591551093#hardware-setup

  • @jmahan47
    @jmahan47 5 років тому +1

    Has the Demo and code for 2nd channel steering been posted?

    • @yptechtips2420
      @yptechtips2420 3 роки тому

      ua-cam.com/video/Bx0y1qyLHQ4/v-deo.html

  • @RobertCowanDIY
    @RobertCowanDIY 7 років тому

    Hey Shawn, are entering this bot for AVC? What weight class?

    • @ShawnHymel
      @ShawnHymel 7 років тому

      I am not, since I'm having to run the Logistics division as a judge. Otherwise, I considered making a 1 lb bot. I know, a Robert vs. Shawn showdown would have been epic :) Are you entering?

    • @RobertCowanDIY
      @RobertCowanDIY 7 років тому +1

      Bummer. Yeah, I'm registered. I'll be bringing my 1lb robot, Sgt. Cuddles (to defend the title from last year!) and a new 30 pounder, called crippling depression.

    • @ShawnHymel
      @ShawnHymel 7 років тому

      Sweet. I'll have to sneak away at some point during AVC to check them out.

  • @shahadatshishir3816
    @shahadatshishir3816 4 роки тому

    Can you show, how we can control servo motors using PCA 9685 servo driver and a Radio Controller(Flysky CT6B)...?
    We are facing so much problems on this issue..😥😣

  • @abrahamrodriguez6462
    @abrahamrodriguez6462 3 роки тому

    the creme of the creme

  • @lazarusmagellan2367
    @lazarusmagellan2367 4 роки тому +2

    Could I set both sticks to operate multiple servos?

    • @user-ox1dr3ec7m
      @user-ox1dr3ec7m 3 роки тому +1

      also wondering this

    • @HanZie82
      @HanZie82 3 роки тому

      Yes, just make sure you name them differently.

    • @lazarusmagellan2367
      @lazarusmagellan2367 3 роки тому

      @@HanZie82 thank you. I used them in replacement of a Johnson bar for a valve gear

  • @saisravanichavva8578
    @saisravanichavva8578 2 роки тому

    Can you please help me how the same joystick can be used to control 2 DC motors of 90v (heavy duty robot). As all the Dc motor drives are max rated up to 58v on the market.

  • @HungNguyen-oz1jc
    @HungNguyen-oz1jc 3 роки тому

    How do I power up the arduino if I don't use USB cable instead of an external battery coming form a 5V ESC connected to the Receiver?

    • @HanZie82
      @HanZie82 3 роки тому

      If you are sure its 5V connect it to the Arduino 5V line. If you're not sure either dont use it or use the power in port. (on smaller models called Vin)

  • @joseantonioschannel
    @joseantonioschannel 3 роки тому

    I'm using an L298N with an Arduino Uno r3, my RC controller is an Element6 with a paired receiver, and the code just doesn't want to play. Only one channel, forward; anyone else having this problem?

  • @saravanana5419
    @saravanana5419 3 роки тому

    Hello, could you inform how to connect rxsr receiver to arduino?

    • @HanZie82
      @HanZie82 3 роки тому

      Watch the video!

  • @biggusmaximus1651
    @biggusmaximus1651 3 роки тому

    but the signal pwm that received from receiver is unstable so you cant control the pwm is this true sir?

  • @wanghe0001
    @wanghe0001 11 місяців тому

    Not really understand the STBY_PIN =9, which l298n's pin should I connect from Arduino board digital PIN 9 ?

  • @frikkiesmit327
    @frikkiesmit327 Місяць тому

    Speedcontrollers can be expensive

  • @tpc-vids1589
    @tpc-vids1589 4 роки тому

    I'm getting zero in between my values

  • @procactus9109
    @procactus9109 6 років тому

    Sooo, who's under the desk ?

  • @alimustafa2682
    @alimustafa2682 7 років тому

    Cool ! first

  • @pepper669
    @pepper669 7 років тому

    Excellent tuorial, except the war rhetoric.