Arduino Obstacle Avoiding Robot Car 2WD With AA Battery

Sdílet
Vložit
  • čas přidán 25. 06. 2021
  • Today, I will show you how to make an Arduino Obstacle Avoiding Robot With Only AA Battery.
    - Full instructions:
    goldscrew.blogspot.com/2021/0...
    - Source code:
    www.hackster.io/goldscrew/ard...
    ** Individual Components **
    - Arduino UNO
    www.banggood.com/custlink/KKm...
    - L298N Motor Driver or L293D Motor Shield
    www.banggood.com/custlink/GDm...
    - Chassis(including motors and wheels)
    - Wires
    - Battery Holder
    - Micro Servo Motor SG90
    www.banggood.com/custlink/DGv...
    - HC-SR04 Ultrasonic Sensor
    www.banggood.com/custlink/33G...
    - Sensor Mount (Optional)
    ** Tools (Optional) **
    Soldering Iron
    Hot Glue Gun
    Wire Cutter
    Screw Driver
    !!! DO NOT COPY & REUP !!!
    ***********************************
    - Website: goldscrew.blogspot.com/
    - Facebook: / goldscrew-diy-10836235...
    - Twitter: / screwgold
    - Pinterest: / goldscrew
  • Věda a technologie

Komentáře • 62

  • @garvmangal4853
    @garvmangal4853 Před 2 lety

    1st comment congrats 2021 garv mangal

  • @SardarTeacher
    @SardarTeacher Před rokem +1

    super

  • @jilax_vloger
    @jilax_vloger Před rokem +1

    Thanks

  • @abirojha2896
    @abirojha2896 Před 10 měsíci +1

    can i use 2A motor driver

  • @user-bb5fo5ij7y
    @user-bb5fo5ij7y Před 10 měsíci +1

    why is the wiring so complex can you please wire it for me?

  • @goodKazuma
    @goodKazuma Před rokem +3

    May I know what type of switch did you use? Also can the 9V battery holder with switch replace the four AA battery with a connected switch as shown in your diagram? Thank you!

    • @GoldScrew
      @GoldScrew  Před rokem +1

      It’s 12V DC switch. You can check the link to buy in the description!
      And of course you can use 9v battery because Arduino Uno board supported it.
      Thanks for your comments!

  • @rowdyboy2757
    @rowdyboy2757 Před měsícem

    very good... bro..
    😊

  • @gracemargaretha5092
    @gracemargaretha5092 Před rokem

    may i know where did u get the white wheel?

    • @GoldScrew
      @GoldScrew  Před rokem

      You can buy it on Amazon or Aliexpress, Banggood…

  • @edriansaguano5525
    @edriansaguano5525 Před rokem +1

    What length is your F/M jumper wires sir? Is it 10 or 30cm?

  • @chandimachandima985
    @chandimachandima985 Před rokem +1

    This is really

  • @marcoseverini9741
    @marcoseverini9741 Před 2 lety

    6:32 did you connect 2 cables to the same "pin" of the button ?

    • @marcoseverini9741
      @marcoseverini9741 Před 2 lety

      from a button should start only 2 cables or I'm wrong?

    • @GoldScrew
      @GoldScrew  Před 2 lety +1

      Yes. I’m using only 1 battery tray for all DC motors and Arduino.
      You can using separate with 2 battery tray/block if you want.
      Thanks for your question!

  • @mumtaj532
    @mumtaj532 Před 2 lety

    Bro from where you get that codes you write themselves or you download from somewhere

  • @ammadghias7575
    @ammadghias7575 Před rokem

    Can’t I use the arudino board 5v and GND too

    • @GoldScrew
      @GoldScrew  Před rokem

      Check again your wiring diagram. I think it’s wrong somewhere!

  • @Robinsingh5237
    @Robinsingh5237 Před 2 lety +2

    Can it really run with 4 AA battery?

    • @GoldScrew
      @GoldScrew  Před 2 lety

      Why not?
      You can try it ☺️

  • @peterpiper8806
    @peterpiper8806 Před rokem +1

    The assembled car are the demo car are not the same

  • @MGRobotics1
    @MGRobotics1 Před rokem

    what are the libraries that i need to install can you comment the link

    • @GoldScrew
      @GoldScrew  Před rokem

      You need 2 libraries:
      1- Servo.h
      github.com/arduino-libraries/Servo
      2- NewPing.h
      www.arduino.cc/reference/en/libraries/newping/

    • @Seajayyysss
      @Seajayyysss Před rokem

      Where should i paste my new ping file? It keep asking my new ping file

    • @GoldScrew
      @GoldScrew  Před rokem

      @@Seajayyysss NewPing file is a library.
      That you need is install it:
      Open Arduino IDE and go to Sketch > Include Library > Add.zip library.

  • @mustafaalzinkee5688
    @mustafaalzinkee5688 Před rokem +1

    i keep getting message saying (no such file or directory)

    • @GoldScrew
      @GoldScrew  Před rokem

      Did you installing all the libraries?

  • @kiwi__4801
    @kiwi__4801 Před 4 měsíci

    my robot is making a low buzzing noise and not moving, what’s the issue?

    • @GoldScrew
      @GoldScrew  Před 4 měsíci

      It’s seem wrong source code or wiring not correctly!

  • @ashennethsara7119
    @ashennethsara7119 Před rokem +2

    what the coding icon bro

    • @GoldScrew
      @GoldScrew  Před rokem

      Source code here: goldscrew.blogspot.com/2021/07/arduino-obstacle-avoiding-robot-car-2wd.html

  • @killerstain4715
    @killerstain4715 Před 2 lety

    Why motor back forward?

    • @GoldScrew
      @GoldScrew  Před 2 lety

      It’s moving by code (arduino) and motor driver module!

  • @Noxx06
    @Noxx06 Před 2 lety

    i can not upload the code please help me i must make this for school

    • @GoldScrew
      @GoldScrew  Před 2 lety

      Check your main board and port again. Select correctly on Arduino IDE!

  • @ammadghias7575
    @ammadghias7575 Před rokem

    My car dosent turn it just goes back don’t know why pls help need to submit tommorow

    • @GoldScrew
      @GoldScrew  Před rokem

      Maybe has issue with your sensor. You can debug it (to check the distance), and adjust it!

  • @ya3hrajput
    @ya3hrajput Před 7 měsíci

    Bro my car is moviing backward so much distance, how can i change it?

    • @GoldScrew
      @GoldScrew  Před 7 měsíci

      Change the source code or your sensor has problems!

  • @harutosato6439
    @harutosato6439 Před 2 lety

    i need help. both dc motors arent moving. i double checked all wires and im not sure if its properly placed or not. help me pls thanks

    • @GoldScrew
      @GoldScrew  Před 2 lety

      If your motors and wiring correct:
      - Check again Drive module (it’s can be damaged)
      - Charge full battery or change other new batteries
      - Reupload the source code to Arduino (check carefully the Port)
      Ask me anything if you have any other questions or issues!

    • @morhelm
      @morhelm Před 2 lety

      The wiring for the in1, in2, in3, and in4 in 6:34 is incorrect. It should be adjusted by one pin slot towards the right. The video shows that the first orange wire is in enA and in4 is empty.

  • @voltagegaming1822
    @voltagegaming1822 Před 6 měsíci

    Bro i did not understand wireing please help me

    • @GoldScrew
      @GoldScrew  Před 6 měsíci

      In the video had wiring diagram already. You can print and check it!

  • @AnanYa-ci6ui
    @AnanYa-ci6ui Před 2 lety

    Could u please share the code plssss bro

    • @GoldScrew
      @GoldScrew  Před 2 lety

      I’m sharing source code already.
      Check it in the description. Thanks!

    • @thoughtsofrz8587
      @thoughtsofrz8587 Před 2 lety

      #include //Servo motor library. This is standard library #include //Ultrasonic sensor function library. You must install this library //our L298N control pins const int LeftMotorForward = 7; const int LeftMotorBackward = 6; const int RightMotorForward = 4; const int RightMotorBackward = 5; //sensor pins #define trig_pin A1 //analog input 1 #define echo_pin A2 //analog input 2 #define maximum_distance 250 boolean goesForward = false; int distance = 150; NewPing sonar(trig_pin, echo_pin, maximum_distance); //sensor function Servo servo_motor; //our servo name void setup(){ Serial.begin(9600); pinMode(RightMotorForward, OUTPUT); pinMode(LeftMotorForward, OUTPUT); pinMode(LeftMotorBackward, OUTPUT); pinMode(RightMotorBackward, OUTPUT); servo_motor.attach(10); //our servo pin servo_motor.write(115); delay(2000); distance = readPing(); delay(100); distance = readPing(); delay(100); distance = readPing(); delay(100); distance = readPing(); delay(100); } void loop(){ int distanceRight = 0; int distanceLeft = 0; delay(50); if (distance = distanceLeft){ turnRight(); moveStop(); } else{ turnLeft(); moveStop(); } } else{ moveForward(); } distance = readPing(); } int lookRight(){ servo_motor.write(50); delay(500); int distance = readPing(); delay(100); servo_motor.write(115); return distance; } int lookLeft(){ servo_motor.write(170); delay(500); int distance = readPing(); delay(100); servo_motor.write(115); return distance; delay(100); } int readPing(){ delay(70); int cm = sonar.ping_cm(); if (cm==0){ cm=250; } return cm; } void moveStop(){ digitalWrite(RightMotorForward, LOW); digitalWrite(LeftMotorForward, LOW); digitalWrite(RightMotorBackward, LOW); digitalWrite(LeftMotorBackward, LOW); } void moveForward(){ if(!goesForward){ Serial.println("==moveForward=="); goesForward=true; digitalWrite(LeftMotorForward, HIGH); digitalWrite(RightMotorForward, HIGH); digitalWrite(LeftMotorBackward, LOW); digitalWrite(RightMotorBackward, LOW); } } void moveBackward(){ goesForward=false; Serial.println("==moveBackward=="); digitalWrite(LeftMotorBackward, HIGH); digitalWrite(RightMotorBackward, HIGH); digitalWrite(LeftMotorForward, LOW); digitalWrite(RightMotorForward, LOW); } void turnRight(){ Serial.println("==turnRight=="); digitalWrite(LeftMotorForward, HIGH); digitalWrite(RightMotorBackward, HIGH); digitalWrite(LeftMotorBackward, LOW); digitalWrite(RightMotorForward, LOW); delay(500); digitalWrite(LeftMotorForward, HIGH); digitalWrite(RightMotorForward, HIGH); digitalWrite(LeftMotorBackward, LOW); digitalWrite(RightMotorBackward, LOW); } void turnLeft(){ Serial.println("==turnLeft=="); digitalWrite(LeftMotorBackward, HIGH); digitalWrite(RightMotorForward, HIGH); digitalWrite(LeftMotorForward, LOW); digitalWrite(RightMotorBackward, LOW); delay(500); digitalWrite(LeftMotorForward, HIGH); digitalWrite(RightMotorForward, HIGH); digitalWrite(LeftMotorBackward, LOW); digitalWrite(RightMotorBackward, LOW); }

  • @kanavmittal
    @kanavmittal Před rokem

    CAN I USE 9 VOLT BATTERY ?

    • @GoldScrew
      @GoldScrew  Před rokem

      Yes. Arduino mega board supported 9v

  • @praveenyadav6006
    @praveenyadav6006 Před rokem

    CODE

    • @GoldScrew
      @GoldScrew  Před rokem

      I'm attached full source code in the description, so check it there!

  • @sharadkokare6729
    @sharadkokare6729 Před 2 lety

    I can not upload code please help me I must make this for school. Help me Bro!

    • @GoldScrew
      @GoldScrew  Před 2 lety

      Check again your settings: select correct the Port and Board name in arduino IDE.
      If everything fine, I think you can upload code without any issues/bugs.

    • @sharadkokare6729
      @sharadkokare6729 Před 2 lety

      I am not use laptop use mobile but mobile in not option make a video for making codeing in Mobile . plzz Bro

    • @GoldScrew
      @GoldScrew  Před 2 lety

      If you’re using mobile phone to upload code!
      Could you try other OTG usb?
      Right now you can try again following this guide (not mine): create.arduino.cc/projecthub/Vishalsoniindia/arduino-programming-via-mobile-arduinodroid-57a62f
      I will make other video guide how to upload with mobile soon asap!
      Good luck 👍

  • @pietrodilucca1712
    @pietrodilucca1712 Před 11 hodinami

    le code est une plaie et défaut un peu partout....!

  • @Abd4u.
    @Abd4u. Před 18 hodinami

    Tumhary chkr me pura setup bna lia ab ni chla ...k tumhara demo b fake he...assempled gari or thi

  • @johnharoldamatus1450
    @johnharoldamatus1450 Před 2 lety

    is this legit?