Fix Servo Motor 180 Deg Only Turn 90 Deg MG995 Arduino Nodemcu ESP8266

Поделиться
HTML-код
  • Опубликовано: 3 окт 2024
  • Load test, just for demo. Excessive weight, may damage the circuit
    Test normal command, for Servo Motor 180 degree Arduino Uno or Arduino Nano
    Below command without problem.
    On Arduino Nano and Arduino Uno.
    Servo Motor turn 180 degree, no need special command
    Just put myservo.attach(7) // pin 7
    And servo angle, example turn 180 degree
    Command to be
    my.servo.write(180)
    Below example code
    //Arduino Uno or Nano
    Servo myservo;
    void setup() {
    Serial.begin(9600);
    myservo.attach(7);
    }
    void loop() {
    myservo.write(0);
    Serial.println("Servo 0:");
    delay(2000);
    myservo.write(180);
    Serial.println("Servo 180:");
    delay(2000);
    }
    ============================
    NodeMCU like Lolin NodeMCU ESP32 and Servo Motor
    Servo Motor 180 degree only turn 90 degree
    Servo not start from 0 degree, but start 45 Deg angle
    You can fix the servo 180 deg, only turn 90 deg. Add below command.
    myservo.attach(14, 500, 2400) work on Tower Pro MG995 180 degree.
    Other model may different range
    Easy to fix, modify command inside Attach() to be
    //NodeMCU Lolin ESP32 ESP8266
    Servo myservo;
    void setup() {
    //myservo.attach(14);
    myservo.attach(14, 500, 2400); // Change this code for ESP8266 Arduino board
    }
    void loop() {
    myservo.write(0);
    delay(3000);
    myservo.write(180);
    delay(5000);
    }
    ============================
    //Test for slow motion servo motor, can add Command delay
    delay(15) slow
    delay(1000) 1 second

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

  • @mohamedtharwat6360
    @mohamedtharwat6360 Год назад +4

    Thanks from egypt , it works great for SG90

  • @zipengsong6888
    @zipengsong6888 6 месяцев назад +2

    thanks for you sharing. It resolves my issue. :)

  • @prakashdutt1520
    @prakashdutt1520 10 месяцев назад +4

    Thank you brother i am searching for this problem every where finally you solved it.... I am using it with ESP-01.. 😊

  • @brightphoton4200
    @brightphoton4200 5 дней назад

    Thanks from San Marino 🌴🌴🥥🥥

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

    Life saver!, worked with MG945 as well

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

      Happy can help you :-)

    • @adisayanbose2176
      @adisayanbose2176 5 месяцев назад

      Hello, can you provide me an idea how did you power mg945

  • @akshaybhawar842
    @akshaybhawar842 10 месяцев назад +2

    works i tried here is the code
    #include
    Servo servol;
    void setup()
    {
    servol.attach(D7, 500, 2400);
    // servol.attach(D7);
    }
    void loop()
    {
    servol.write(0);
    delay(1000);
    servol.write(90);
    delay(1000);
    servol.write(180);
    delay(1000);

    }

    • @ObengwareID
      @ObengwareID  10 месяцев назад

      Nice info
      Thank so much Aks

  • @GuilhermeFerreira-po1ky
    @GuilhermeFerreira-po1ky 7 месяцев назад +1

    Estava com este problema é o vídeo me ajudou a resolver

    • @ObengwareID
      @ObengwareID  7 месяцев назад

      Fico feliz em ajudar! 😄

  • @oguzhan8956
    @oguzhan8956 Год назад +5

    thank you so much! you saved me a lot of trouble 👍

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

    Very very very thank you :D

  • @traviswood66
    @traviswood66 2 года назад +4

    Thanks mate. This was a big help!

  • @nurullahcsgn2779
    @nurullahcsgn2779 Год назад +3

    its working. thank you so much!

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

    is there anyone here solved the problem usign arduino uno?

  • @conversationwithgod272
    @conversationwithgod272 5 месяцев назад

    Thanks lots.it works fine.

  • @narutokun8970
    @narutokun8970 9 месяцев назад +1

    Waohhh thanks broo ,i can try this code

    • @ObengwareID
      @ObengwareID  9 месяцев назад +1

      🙂 you are welcome Nar

  • @yucelyazc9489
    @yucelyazc9489 6 месяцев назад

    bu sorunu yaşıyordum ve sizin sayenizde çözdüm. Neden herkes yaşamazken ben böyle bir sorun yaşadım ?

  • @PratikzEditz
    @PratikzEditz 8 месяцев назад

    Code for 360degree and again reverse till 0degree with 1 min delay code please

    • @ObengwareID
      @ObengwareID  8 месяцев назад

      Different command Ed
      360 deg, command with pulse
      180 deg, command myservo.write(pos); Pos is Position (deg position)
      www.makerguides.com/how-to-control-a-360-degree-servo-motor-with-arduino/
      Just add delay on the program
      I hope can help your project

    • @PratikzEditz
      @PratikzEditz 8 месяцев назад

      @@ObengwareID can u give me Instagram id i am still having doubts

  • @julian16180
    @julian16180 Месяц назад

    Very good, also works for Wemos D1 Mini

    • @ObengwareID
      @ObengwareID  Месяц назад

      You are welcome Jul
      Btw, thank about Wemos

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

    life saver, thank you very much!👍

  • @rmaul3128
    @rmaul3128 9 месяцев назад

    Mantap Gan... Auto subscribe... Buat mrogram hardware nya pake software apa ya?
    Saya belajar dari 0

    • @ObengwareID
      @ObengwareID  9 месяцев назад +1

      www.arduino.cc/en/software/
      Belajar dari lampu kedap kedip.
      Ngak lama pasti ngerti fungsinya kak
      Selanjutnya, tinggal copy paste kode kalangan pro
      Semoga membantu

    • @rmaul3128
      @rmaul3128 9 месяцев назад

      @@ObengwareID Terimakasih Master OP...

  • @tanjunjie4428
    @tanjunjie4428 10 месяцев назад

    I am using uno i do flw the code but the servo motor keep rotate what is the problem ? i using to let my mg995 rotate 90 degree only but it keep rotate

    • @ObengwareID
      @ObengwareID  10 месяцев назад

      Server motor have 2 version,only 180deg. Other full rotatation 360 deg.C
      You can check the servo model
      More simple, in Arduino IDE program
      Have a few sample program, and usefull for check the servo too.
      I hope can help

    • @tanjunjie4428
      @tanjunjie4428 10 месяцев назад

      How do i check my model is 180deg or 360deg@@ObengwareID

    • @tanjunjie4428
      @tanjunjie4428 10 месяцев назад

      my model of servo is same as this video@@ObengwareID

  • @adisayanbose2176
    @adisayanbose2176 5 месяцев назад

    how did you power the 5v servo mg995 with 3.3v from esp 8266??

    • @ObengwareID
      @ObengwareID  5 месяцев назад

      Input PIN (VIN)
      Connect with +/- microUSB the same voltage VIN
      In the video, the servo power is taken from 5V (VIN), not 3.3V
      You can check first, the design of each board is different.
      But this is just a demo
      Correct
      The servo power voltage must not be taken from the PIN board
      Because the PCB track can easily be damaged, it cannot withstand the large current of the servo.
      Hopefully this information can help

    • @adisayanbose2176
      @adisayanbose2176 5 месяцев назад

      @@ObengwareID yeah I failed to power mg 995 using Arduino then I tried using l293n motor driver 5v output even then I find no movement in the servo what kind of other external source should I prefer

    • @adisayanbose2176
      @adisayanbose2176 5 месяцев назад

      hello brother can you please help me
      @@ObengwareID

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

    Bro which pin to connect servo

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

      During test
      myservo.attach(14)
      In video description
      Depend you board
      Specially, ESP8266 label pin diffrerent pin GPIO
      Please the graphic board too, like Lolin have different position between label number and GPIO number
      ESP32 board series, label pin the same name pin GPIO
      Arduino Nano (example), pin label the same pin GPIO number
      I hope can help

  • @OnOff538
    @OnOff538 2 месяца назад

    Thank you!

  • @manecior1
    @manecior1 11 месяцев назад

    Thank You

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

    Thanks!!

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

    Mas/Mba/Bpk/Ibu saya mau nanya, kok saya punya bahkan engga berputar sama sekali ya? kalo di board arduino yg konek ke 5 volt dan ground nya bisa, tapi esp8266 yg konek ke pin 3v dan groundny engga berputar sama sekali ya? apa karna tegangannya kecil atau konek pin sumber tegangannya bukan di 3v esp8266? mohon pencerahannya. Terimakasih.

  • @emrecik09
    @emrecik09 Месяц назад

    thank youuuuuuuuuu

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

    Hey, can you please make video or something how to connect that servo to esp directly without breadboard 🙏 i would really appreciate it.

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

      I tried multiple codes but it is now working

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

      Thank for ino Trix

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

    Kak itu kalo servo dicopot dari arduino nya apakah nanti programjya masih tersimpan di servo atau sudah hilang kak

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

      Motor hanya menerima sinyal dari MCU board
      Motor mendapat perintah sinyal, untuk sudut atau putaran.
      Program yang mengatur, disimpan di dalam board
      Dari program mengatur mau geser berapa derajat, mau cepat atau lambat dan lainnya
      Ada motor yang berputar sampai 180 derajat
      Yang lain berputar kontinue atau 360 derajat.
      Seperti itu kak

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

    But this is not working for sg90 servomotor , they don't complete 180 degree rotation . Tell me what to do

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

    Wow literly i can do that ❤❤❤❤❤

  • @yuditsantoso9291
    @yuditsantoso9291 8 месяцев назад

    Mantap mas. Bangga deh. Terimakasih banyak

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

    Большое спасибо!

  •  Год назад

    Very very very thank you.

  • @mmrx428
    @mmrx428 9 месяцев назад

    I know that the mg995 servo motor rotates 360 degrees, how do you move it between 0-180 degrees?

    • @ObengwareID
      @ObengwareID  9 месяцев назад

      Hi M
      Please check this
      howtomechatronics.com/how-it-works/how-servo-motors-work-how-to-control-servos-using-arduino/
      Continues rotation only control position, but no sensor position. Like Step Motor, MCU send pulse signal
      I hope can help

  • @action-techq
    @action-techq Год назад

    Thanks a lot

  • @rafael.sousa.9705
    @rafael.sousa.9705 Год назад

    Vc é um herói, cara.
    You are a hero, man.
    Tu es un héroe, amigo.
    Ты герой, друг.

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

      Thank you Raf

    • @rafael.sousa.9705
      @rafael.sousa.9705 Год назад +1

      @@ObengwareID np man. I was thinking that my servo motor was damaged. You saved my day

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

    Thank you❤

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

    Extremely helpful!