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

STM32 Programming: Read PWM Input signal for Radio controller

Поділитися
Вставка
  • Опубліковано 8 сер 2024
  • This video explains how to communicate with the Radio transmitter by reading the input PWM signal on STM32 MCUs.
    STM32 Intro Course:
    www.steppeschool.com/courses/...
    Website:
    www.steppeschool.com
    Source code:
    www.patreon.com/user?u=80399744
    Callback function:
    void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
    Starting the Interrupts:
    HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_1);
    HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_2);
    00:00 Introduction
    00:35 General principles
    03:05 STM32CubeMx Timer configuration for reading PWM Input Signal
    05:02 Callback function to get the Stick position of the Radio controller
    10:53 Testing the code
    13:12 Demo
    15:04 Explaining the Timer parameters

КОМЕНТАРІ • 27

  • @orides5976
    @orides5976 7 місяців тому +1

    Thank you for giving us your time and your work to teach us the joy of modern technology.

  • @electrobrains
    @electrobrains 9 місяців тому +1

    LOVE YOUR WORKS ,KEEP WHAT YOU ARE DOING MAN

  • @dwieztro6748
    @dwieztro6748 2 місяці тому

    Hii can you use stm32f030 to read ppm and work with servo pwm?

  • @electrobrains
    @electrobrains 9 місяців тому +1

    Hi Yerke ,can i suggest a tutorial video,so its nice to read pwm signal but its lots of cable when you want to read 10 channels,so can you make a tutorial for reading tis values with ppm encoder

    • @steppeschool3629
      @steppeschool3629  9 місяців тому

      Thanks for the suggestion. I will definitely check it out.

    • @electrobrains
      @electrobrains 9 місяців тому

      @@steppeschool3629 hi i figured we dont need the encoder the receiver itself has a ppm pin,when we set the controller it produces ppm signal for each channel,please make a video please

  • @farziverse4209
    @farziverse4209 3 місяці тому

    I think HAL_TIM_IC_CaptureCallback is wrongly mentioned as a fn which calculates the pulse width. It just detects the rising and falling edges of the PWM signal. You need to change its CCER Register Value to make it detect the signal

    • @kratomleaf8937
      @kratomleaf8937 2 місяці тому

      wdym? isn’t that what he said in the video?

  • @aliumar7859
    @aliumar7859 10 місяців тому +1

    I am an intermediate Industrial Automation engineer from Tashkent and Working one of the biggest pharmaceutical company in Tashkent, 4th year bachelor degree student. I started to do some projects like, I designed HMI for Suppository Machine .Now I am obsessed with HMI and PLC programming to Tablet making machine and soon finish it. What I want to say is, I really want to learn STM32 and Circuit design , and will watch all your videos, !!!is it possible to contact with you ? I need some advice , thank you very much

    • @steppeschool3629
      @steppeschool3629  10 місяців тому +1

      Thanks for your interest👍. If you have questions, you can write to my email contact@steppeschool.com. For STM32 programming, I have an online course in STM32 Programming that you can find at this link:
      www.steppeschool.com/courses/stm32-programming-course
      Good luck with your projects!!

  • @user-er5ck9pb5e
    @user-er5ck9pb5e 8 місяців тому +1

    hi, can you tutorial read muti-RC Channel?

    • @steppeschool3629
      @steppeschool3629  8 місяців тому

      Hi, you can use multiple timers to read several RC-channels. It should be very similar to what I did in the video.

    • @user-er5ck9pb5e
      @user-er5ck9pb5e 8 місяців тому

      @@steppeschool3629 yes, but other timers just 16 bit and timer overflow occurs. Do you know how to fix this?

  • @sugiyartosugiyarto1587
    @sugiyartosugiyarto1587 9 місяців тому

    Sir making lookup table using input adc....😊😊

    • @steppeschool3629
      @steppeschool3629  9 місяців тому

      Thanks for the comment. What exactly are you asking?

    • @sugiyartosugiyarto1587
      @sugiyartosugiyarto1587 9 місяців тому

      @@steppeschool3629
      i use input adc with stm32cube ide( 0-1024).
      ×=input adc,
      If (x100 &&200 &&300 &&400 &&500 &&600 &&700 &&800 &&900 &&

  • @aliumar7859
    @aliumar7859 10 місяців тому

    Hello dear Master, are you from Uzbekistan? if so , do you have a school in Tashkent

    • @steppeschool3629
      @steppeschool3629  10 місяців тому

      Hi,
      I am from Kazakhstan (Almaty), but living in France for several years. I have only online courses: www.steppeschool.com/pages/course-list-page

  • @offensivebias3965
    @offensivebias3965 9 місяців тому

    Hi can you make a video on Read PWM Input signal for Radio controller but wtih multiple channel, also if you have something like that already can you send me a link of it .

    • @steppeschool3629
      @steppeschool3629  9 місяців тому

      Hi, you can configure other timers exactly as I did on the video, and you will end up with multiple channels. It is relatively easy to do. Tell me if you have problems with that

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

      @@steppeschool3629 need help on that i have a FS 6 channel receiver so for that we need 6 timers??

  • @offensivebias3965
    @offensivebias3965 10 місяців тому

    Hi i have copied your code and debug works fine no errors , but when i try to do live expressions it shows , failed to evaluate expression , btw im using mac m1 not sure if this cause the problem , any idea how to fix this ? , please help tnx in advance

    • @steppeschool3629
      @steppeschool3629  10 місяців тому

      Hi,
      variables that you want to see in real time, are they global? LIve expressions can be used only for global variables.

    • @offensivebias3965
      @offensivebias3965 10 місяців тому

      @@steppeschool3629 Hi tnx for the reply, turns out i made a mistake on this part
      mine is
      duty_cycle = 10000 * HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_2) ;
      capture_value;
      should be
      duty_cycle = 10000 * HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_2) / capture_value;

    • @steppeschool3629
      @steppeschool3629  10 місяців тому

      great @@offensivebias3965. I am glad that you found an error