Rotate Two Motion Activated Servo Motors In Opposite Directions - A Beginner Arduino Project

Поделиться
HTML-код
  • Опубликовано: 22 июл 2024
  • See how to rotate two motion activated servo motors in opposite directions. This is a beginner Arduino project with an example of how to create opening and closing double doors.
    🔔🔔 SUBSCRIBE 🔔🔔 don't forget to subscribe and click the bell!
    / @bmonsterlaboratory
    Facebook: / bmonster-laboratory-10...
    Twitter: / b_monsterlab
    get code for the project on our Facebook page. search #ServoUnio on Facebook
    check out our Arduino play list!
    • Easy Arduino projects ...
    Chapters:
    0:00 intro
    0:32 component list
    1:24 wiring diagram
    2:39 servos and PIR sensor in action
    3:13 the code
    4:53 example for use of this project
    ---------------------------------------------------------------------------------------------------------------------------------------------------------
    I used 2 different servos in this video, the micro servo with plastic gears and a MG995 metal gear servo. The MG995 servo was used in the cardboard box with door demo. They both rotate at 180 degrees and operate well at 5V power. The MG995 has about 4-5 times the torque of the micro servo when the max voltage (7.2v) is applied. They can bother operate off the same code, which is what I did here. In the interest of making this a short video I cut that out....probably shouldn't have :)
    Here are the amazon links to those servers below.
    MG995 servo:
    www.amazon.com/Control-Angle1...
    SG90 micro servo:
    www.amazon.com/Micro-Helicopt...
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    If you were looking for a way to make servo motors spin in opposite directions or just looking for projects with motion senor functionality, I hope this video was helpful. This motion activated servo motor project is perfect for a beginner Arduino project. If you have any Arduino project ideas, be sure to mention them in the comments below! If you're looking for the programming code for Arduino IDE, check our Facebook page. It will not fit in the comment section below. Thanks for watching~

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

  • @napkin62
    @napkin62 4 месяца назад +1

    TNX..dear sir...sir make vedio on same two servo opposite movement but using IR sensor and megnetic hall sensor...pls

    • @BMonsterLaboratory
      @BMonsterLaboratory  4 месяца назад

      sure. opposite rotation and instead of motion activation, use ir sensor or hall sensor activation?

  • @MFonso-fl8vo
    @MFonso-fl8vo 2 года назад +2

    does the code also work for raspberry pi?

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

      Hey there! Arduino uses C/C++ language. Most of the time you will see Python used with Raspberry Pi but there is a way to use C++ on a pi. I have never done it that way but it is possible.

  • @HappyHermitt
    @HappyHermitt Год назад +2

    I'm about to do this with the servos pulling 2 part poppers.
    We have raccoons that won't go away.

    • @BMonsterLaboratory
      @BMonsterLaboratory  Год назад +1

      Hiya, Dood! Raccoons are no fun at all. I hope it works out for you. 👍

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

      Would this work with a Chinese Nano?

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

      @@HappyHermitt hey there! Sure it would. Elegoo, Sunfounder, or any other Chinese brand would be fine. Make sure you have an external power source for the motors, though! 👍

  • @ohayoch.
    @ohayoch. Год назад +1

    Hello I have an issue with my servo and sensor. In TINKERCAD its working perfectly fine but irl the motors seem to be opening and closing even when theres nothing going through the sensor further more even without the sensor the motors kept opening and closing pls help. Im so confused and tried everything to fix it.

    • @BMonsterLaboratory
      @BMonsterLaboratory  Год назад +1

      hi there! are the motors getting the right about of current? maybe you could add a pull-down resistor to stabilize the input signal to the sensor. A pull-down resistor is typically used to ensure that a pin or input has a defined low state when no signal is present, which can help prevent false signals or erratic behavior.

    • @ohayoch.
      @ohayoch. Год назад +1

      @@BMonsterLaboratory I connected my motor in the bread board and that bread board os connected to the arduino 5v and no i dont have any pull down resistor. Im using SG92R motors.

    • @ohayoch.
      @ohayoch. Год назад +1

      @@BMonsterLaboratory I used your door project as a curtain project of mine since the function og thr doors can be turned into curtain puller. It's for a school project

    • @ohayoch.
      @ohayoch. Год назад +1

      @@BMonsterLaboratory even the light bulb keeps turning on and off, whenever it's on the motors stop moving and when it's off it moves.

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

      Can you send a diagram to me on face book?

  • @ahmadwahyusyaffudin1776
    @ahmadwahyusyaffudin1776 19 часов назад +1

    Delaynya kalo di rubah agak pelan caranya gimana?

    • @BMonsterLaboratory
      @BMonsterLaboratory  10 часов назад

      ubah angka di () untuk mengubah penundaan. penundaan (milidetik) - penundaan (1000).
      Anda dapat menggunakan milis () sebagai gantinya. Dengan cara ini, Anda dapat menangani tugas-tugas lain dalam fungsi loop() tanpa diblokir oleh penundaan().

    • @ahmadwahyusyaffudin1776
      @ahmadwahyusyaffudin1776 9 часов назад

      @@BMonsterLaboratory saya coba aku rubah malah jedanya gerak eg mas yang agak lama...tapi kalo di bikin agak smoth geraknya gimana ya?

    • @ahmadwahyusyaffudin1776
      @ahmadwahyusyaffudin1776 9 часов назад

      @@BMonsterLaboratory biar agak kalem geraknya...

    • @BMonsterLaboratory
      @BMonsterLaboratory  6 часов назад

      @@ahmadwahyusyaffudin1776 Try increasing current. Try an external power supply that can provide 4-5amps if you're using 2 servos. If that doesn't work, post your code and lets take a look 👍

    • @ahmadwahyusyaffudin1776
      @ahmadwahyusyaffudin1776 4 часа назад

      @@BMonsterLaboratory kalo program pake push botten gimana pak?

  • @demux4058
    @demux4058 2 года назад +2

    @BMoster Laboratory--- hello I would like to contact you in gmail for a project I might know what your email is🙃

    • @BMonsterLaboratory
      @BMonsterLaboratory  2 года назад +1

      Sure. email is bmonsterlab@yahoo.com. Happy to help however I can.