RC servo controller using PWM from an FPGA pin

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ส.ค. 2024
  • In this tutorial, I use the Lattice iCEstick FPGA board to control a TowerPro SG90 RC servo. I walk you through my generic VHDL module for controlling any RC servos that use pulse-width modulation (PWM).
    Radio-controlled (RC) model servos are tiny actuators typically used in hobbyist model planes, cars, and boats. They use a special kind of PWM where the high pulse timing is critical, while the duty cycle and the duration of the low period are of less importance.
    Download the code for free from the VHDLwhiz shop:
    vhdlwhiz.com/p...
    Read more and download the code from:
    vhdlwhiz.com/r...

ความคิดเห็น • 13

  • @jorgealonso2238
    @jorgealonso2238 3 ปีที่แล้ว

    Great video. Thank you for sharing your knowledge

  • @diegogarridomendoza2828
    @diegogarridomendoza2828 ปีที่แล้ว +1

    Hi Jonas. What is the little board that interfaces the iCEstick? Is it an array of voltage regulators, or a driver? Thanks!

    • @antnew176
      @antnew176 9 หลายเดือนก่อน

      See Jonas' answer further below - I think it's an Arduino level shifter.

  • @damny0utoobe
    @damny0utoobe 4 ปีที่แล้ว +4

    Dang Jonas, have you added a little bit of weight training to your VHDL courses. Haha.

    • @stevema2
      @stevema2 3 ปีที่แล้ว +1

      🤣🤣🤣

  • @serdarkalay6244
    @serdarkalay6244 4 หลายเดือนก่อน

    ı could not understan why did you multiply with 10^6 inside the function

  • @bobdole27
    @bobdole27 4 ปีที่แล้ว

    Very informative

  • @ahmadafrakhteh7094
    @ahmadafrakhteh7094 2 ปีที่แล้ว

    Thank you so much. Your tutorial was great. Is there a way to find out which PWM pulse frequency/min pulse width/max pulse width is needed? I don't find anything on the datasheets.

    • @VHDLwhiz
      @VHDLwhiz  2 ปีที่แล้ว +1

      I did find it in a datasheet for the SG90 servo. If you can't find it for your servo, you can experiment to see which values will move the motion to the extremes. The values I used are listed in the blog post: vhdlwhiz.com/rc-servo-controller-using-pwm/

  • @baobuiquoc7219
    @baobuiquoc7219 3 ปีที่แล้ว

    hello sir, i'm using FPGA to control 6 servos. But i don't know how to control it. If i put direct to FPGA, it's not engouh current. I use servo HS422. Can you tell me how to control them. thank you

    • @VHDLwhiz
      @VHDLwhiz  3 ปีที่แล้ว

      You have to use some kind of driver circuit because the FPGA pin has too low voltage and current to drive anything more than a tiny LED. As I wrote in the attached blog post, I'm using a breadboardable level shifter. You can buy them for a dollar on eBay or AliExpress. Just search for "Arduino level shifter".

  • @ahmadafrakhteh7094
    @ahmadafrakhteh7094 2 ปีที่แล้ว

    Is the reset if-statement needed at 9:48 ?

    • @VHDLwhiz
      @VHDLwhiz  2 ปีที่แล้ว +1

      You can do without it, but then you will get "metavalue" warnings in simulation, unless you specify a default value, but then you may get "default values not supported" on some architectures, like Lattice. But in my opinion, there is no reason to omit the reset value because the flip-flops already have a reset input, and if you don't use it, it's essentially wasted.