DIY Arduino Ball and Beam : PID control

Поділитися
Вставка
  • Опубліковано 9 лют 2025
  • This project is perfect if you want to move your first steps into the world of control engineering.
    I'll explain in details how the PID algorithm works, so that you will be able to use it in every project you can think about. The only limit will be your imagination!
    Lengths of wooden beams: 40cm, 10cm, 4cm
    ===============================
    Components :
    1 Arduino Pro Mini
    1 MG996R servomotor
    2 HC-SR04 sensors
    ===============================
    Code : github.com/leo...
    ===============================
    Circuit : github.com/leo...
    ===============================
    #arduino #arduinoproject #engineering #controltheory #robotics #diy #coding #codingtutorial

КОМЕНТАРІ • 66

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

    Thank you.. because of you many people like me can learn easily hard concept of engineering ...

  • @omargomaa8787
    @omargomaa8787 2 роки тому +8

    The capacitor is used to give more power to the moter at the Beginning, it is connected parallel with the motor (negative side with ground and Positive side with 5 V)

    • @omargomaa8787
      @omargomaa8787 2 роки тому +6

      These are all the connections for the project : drive.google.com/file/d/1JrXXs7UJkxqDbQnFygE6pDJnkBuDaLge/view?usp=drivesdk

    • @pumpkin3984
      @pumpkin3984 Рік тому

      code plz

    • @omargomaa8787
      @omargomaa8787 Рік тому

      ​@@pumpkin3984the code in the video description

    • @flowersprague5262
      @flowersprague5262 Рік тому

      THANK U

    • @multitareas9262
      @multitareas9262 Рік тому

      Thank you so much!

  • @carlosnm8617
    @carlosnm8617 Рік тому

    This is awesome, thanks a lot

  • @qzorn4440
    @qzorn4440 3 роки тому +1

    very nice and well done... 👍👍 i just watched a self-balance version using the esp32 pid... thanks.. 😀

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

    Great work mate !

  • @antonioorozco6030
    @antonioorozco6030 4 роки тому +9

    Hello, a question, do you know what the measurements of the structure are?

  • @viper1405ct
    @viper1405ct 3 роки тому +3

    Hi! nice video but i have a question; where do i connect the capacitor? and the HC-SR04 sensor has 4 connections, and on your circuit drawing it only shows 3, do you have any information about this considering the correct connections?

  • @rogelioarmandocarrillonori8621

    What would happen if we use another servo, for example an sg90?

  • @TaySquishy
    @TaySquishy 2 роки тому +1

    Do you you have the lengths of your setup? Like how tall you made it and such?

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

    Ooo niiiice dude!

  • @christianyozimarherreracon6005
    @christianyozimarherreracon6005 2 роки тому +1

    where you implement the capacitor?

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

    Can you please drop the code you used for your project

  • @hasanozkir2953
    @hasanozkir2953 3 роки тому +5

    Hi, a question. Can you write the detailed dimensions of the woods used in the project?

  • @AnhTranQuynh-ec1uz
    @AnhTranQuynh-ec1uz 8 місяців тому

    Thank you for useful video. I have a qs for you if I want to use a sensor HC-SR04, how will can I change the code?

  • @seralathans6581
    @seralathans6581 3 роки тому +7

    where do you connect the capacitor

  • @none-tn5eq
    @none-tn5eq Рік тому

    Hello thank you for this project. Do you have a matlab file and the dimension of the woods? Thank you

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

    No tienes un código para control difuso en este sistema?

  • @rashedabouali9206
    @rashedabouali9206 3 роки тому +1

    where did we connect the capacitor to ?

  • @ientuvui297
    @ientuvui297 3 роки тому +1

    I like this

  • @zachwalckiers946
    @zachwalckiers946 Рік тому

    is it possible to do this project with an Arduino UNO ?

  • @buenanosaskia942
    @buenanosaskia942 Рік тому

    Excuse me, could you please help me with the connection of the arduino, I know you installed the circuit but is it just that or is it missing, since in the video it seems to be more because of the jumpers

    • @sergiorome42
      @sergiorome42 Рік тому

      Bro just connect the sensors and motor, there are tutorials on the internet. All it’s doing is reading the input of one sensor and setting the value as the output to the pic controller. Obviously there is there is a power source in the background, it’s really quite simple, just be creative with it

  • @JIMIN-jl3ks
    @JIMIN-jl3ks 2 роки тому

    Buenas noches disculpe el capacitor que indico en los planos del circuito no esta incluido como es su conexion un favor y se podria usar la alimentacion de 5 voltios en un Arduino mega? ?

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

    hello ise this same project your code so you put it as it is I wase it in arduino uno
    and the cube is not placed at the distance of the cart

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

    Hi, how are you?
    I got a doubt...
    How did you perform the calcus to get the the values for: Kd, Kp and Ki.
    I will really apreciate your help, thank you so much.

    • @homemadeengineering9159
      @homemadeengineering9159  4 роки тому +5

      Hi Liliana, nice question!
      Firstly I used control theory to compute the transfer function between the cart position and the servomotor angle.
      Finally I used simulink to tune the PID values.
      But because of a not perfect mechanical structure these values didn't work well.
      So I used the Model Identification Toolbox from Matlab so as to identify the correct transfer function, and then again I used simulink to tune the values.
      Another option, faster and easier, is try to guess them through some experiments.
      You can set them all to 0.
      Start from Kp, increasing it slowly.
      When you are satisfied with it, start increasing Ki.
      Finally you can adjust also Kd value.

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

      Thank you!!!! :D I really appreciate that you take the time to reply my question.

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

      @@homemadeengineering9159 YOU WOULD HAVE ALSO PUT THOSE OPERATIONS, IF YOU ARE GOING TO TEACH A PROJECT YOU MUST DO IT WELL, EXPLAINING EACH STEP IN DETAIL🙄

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

    how to connect the second ultrasonic sensor you did not explain in the circuit diagram

    • @jossephveliz9270
      @jossephveliz9270 7 місяців тому

      Hello dear, do you know if you managed to carry out that project, did you understand the diagram, could you please tell me.

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

    can i use arduino uno r3 instead ?

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

    Hello. Mi trying yo make this project for school. I want you to know if You can help of solving some douts that i have?
    Thank yuou.

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

    Hello, please share detailed dimensions of the woods used in the project?

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

    What s the length of the lever connecting the motor and the beam ??

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

    Hey, thank you for the Code Breakdown. I'm working on a pretty similar project, and when looking at other's approaches to it online, I struggled to find clear code, yours is much easier to understand. Do you have any tips on filtering out noise/bad data from the distance sensor? Loved the video btw!

    • @homemadeengineering9159
      @homemadeengineering9159  4 роки тому +1

      I really appreciate your comment! My suggestion is to use a digital low pass filter, as I mentioned in the video both to filter the measurements and the derivative action

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

      Hey did you figure out how to add in the capacitor?

    • @knix1980
      @knix1980 Рік тому

      Hi , just wondering the size of servo used here ?@@homemadeengineering9159

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

    can you plz tell us the dimensions of the wood design.

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

    Thank you for this very nice piece of engineering. I am trying to recreate this with some friends and we were wondering whether it would be possible to see the dimensions of the woodwork. Thank you in advance!

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

    Thank you

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

    Can you show us the right circuit diagram sir ?

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

    Hey, the arduino pro mini is 3,3 volts or 5 volts?

  • @jameshunt1822
    @jameshunt1822 3 роки тому +1

    What's the use of capacitor?

  • @bilalrahimaydin6129
    @bilalrahimaydin6129 2 роки тому +3

    Hi. Can you give the exact measurements of the structure please?

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

    Hey,in line 88, how did you get the two values 24,156

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

      its minimum and maximum voltage value of working of servomotor i believe but idk

  • @eliquiroga6450
    @eliquiroga6450 Рік тому

    simulink?

  • @NattanonPhunphuech
    @NattanonPhunphuech Рік тому

    Hello sir. Can you help me please?

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

    hello , i want code. Do you sent it to me by e-mail?

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

    como se hace paso a paso?

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

    Hello
    I am very interested in this model, I would like to contact you to learn more
    How do we contact each other?

  • @mohammedal_kattan4706
    @mohammedal_kattan4706 2 роки тому +1

    Hi! nice video but i have a question; where do i connect the capacitor? and the HC-SR04 sensor has 4 connections, and on your circuit drawing it only shows 3, do you have any information about this considering the correct connections?