Bluetooth controlled car with obstacle avoidance || Step by Step tutorial
HTML-код
- Опубликовано: 8 апр 2023
- Hi friends,
In today's video, I am going to show you step by step, how to make a blue tooth controlled car , which also has obstacle avoidance feature, using arduino uno. The car can be controlled using Bluetooth from any mobile phone. The car can be controlled to go forward, reverse, Left & Right. While going forwards, if the car comes across any obstacle, it automatically changes the direction, thus avoiding it. . The project is done with arduino uno , L298 motor driver, HC-SR04 ultrasonic sensor & HC 05 Bluetooth module.
The links for purchasing the items are given below.
1. Arduino uno board : amzn.to/3RPzXw8
2. L298N motor driver : amzn.to/3RO0F8k
3. HC-SR04 Ultrasonic Sensor : amzn.to/3XFNCd4
4. SG 90 Servo Motor : amzn.to/45M1RPs
5. HC-05 Bluetooth Module: amzn.to/3xwFTU6
6. Motors with wheels : amzn.to/3W5EYTW
7. Battery holder, AA x 4 with on/off switch: amzn.to/4cPwJAZ
8. Jumper wires : amzn.to/3xG4FB0
Link to download Code:
drive.google.com/file/d/1ggzs...
OR
www.mediafire.com/file/k1jiv1...
Link to download android remote control software :
play.google.com/store/apps/de...
If the above link is not working for downloading the app, you can download the .apk installation file for the software from the following link and install the app directly in mobile phone.
drive.google.com/file/d/1Mzc5...
OR
www.mediafire.com/file/3yzmvm...
Link to download Circuit Diagram:
drive.google.com/file/d/1OwHe...
Please do watch the video .Thank you...
Please share the video if you like it.
Music by Bensound.com
License code: S4CMDLTCYO637WUY
❤❤❤~~PLEASE SUBSCRIBE TO THE CHANNEL TO SEE MORE SUCH INTERESTING VIDEOS & MAKE LEARING SCIENCE FUN~~❤❤❤
#diy #bluetoothcar #scienceproject #arduino #arduinoproject #remotecontrolcar #obsctacleavoidingrobot Наука
Hello friends..A VERY IMPORTANT INFORMATION..
In this video, I am showing that the positive VCC pin of the bluetooth module to be connected directly to +ve terminal of battery since all the +5V Pins in arduino are already used. But please make note that the bluetooth module works only with an input voltage range of 3.3 to 6V. So if you use battery with voltage greater than 6V, bluetooth module will not work. So, in that case connect the positive of servo motor directly to battery and VCC of bluetooth module should be taken from +5V of arduino..Thank you friends..🙂💓
Thank you so much 🤗🤗
Can 12v safe for servo motor
Please reply I am working on it
@dipalipanchal9102 Yes friend. 12V is perfectly fine.
Can I connect bluetooth module +5 for 3.3v in arduino
Sir instead of that I will connect +5 v of bluetooth to motor driver+5 please reply
bro u are GOAT, thank you very much for this project
Hi friend..thank you so much for your encouraging comment. It means so much to me..💓🙂
Sir can we change mode saprately bluetooth and obstacles avoiding
the code works...you have to check meticulously your connections, proper power supply for the components and make sure that your components are working specially your sensor. Thank you for the tutorial.
Yes friend. You are absolutely right. All the projects are made and tested by me. So Iam very sure that they are working ones. But like you correctly told, some simple mistake in the connections or bad sensor or discharged battery will cause it not to work.
yo another doubt where should i connect the servo... the 5v pin is already connected to the ultrasonic senor and gnd also
There are 2 Nos. Of +5V pins in arduino. There is another +5V pin named as AREF and GND near pin no. 13..This AREF can be used as +5V. Or else servo motor positive wire can be connected directly to +ve terminal of battery also..
sir what did you mean by connect pins 1 , 2, 3, 4 while pairing for the first time when we are connecting the bluetooth module. and sir aren't we suppose to remove the tx and rx pins in from blutooth m... before uploading the code.Sir plz reply
Hi friend. When we are first connecting the bluetooth module to mobile phone, a PIN number has to be entered in the mobile phone. That PIN number is what I have told as 1234..Also, I have seen in many videos, that the TX and RX pins have to be removed for uploading the code. But I was able to upload code without removing TX and RX pins. So if you are also able to upload code without removing RX and TX pins, then that is fine. Otherwise if you face some problems in uploading the code, try removing RX and TX pins and then upload. According to me, both methods should work..
@@Science_4U_ Thank you soo much♥️💫.If I have problems regarding this project I'll ask you, is it okay.
@@LT-or3on Yes sure friend. Please ask. I will clarify them. 😀
Plz tell me every wire is correct but the problem is with sensor part, my sensor as well as servo motor isn't working, my sensor is not able to detect.
Hmm..okay friend..is the wheels rotating?. If yes, atleast the motor driver part is okay. I can help you in identifying the problem. Can you send a hi in my instagram page. I will ask you to do some checks and will try to identify the exact problem.
I am using pin 3 and pin 13 for the ultrasonic sensor and after connecting, the tyres continuously rotate without stopping until i disconnect it. What may be the problem?
Hi friend, the tyres continously rotate just after switching on the battery or only after pressing any button in the mobile software?.
Also, the wheels are rotating in a particular direction only or is it rotating forward and reverse alternately?
Sir can you pls copy the libraries
bro does it works with 4 gear motor If we gave the same from the video
Yes friend. It will work..
thank you bro
bro can why is the rover is moving slow can i make the battery power more it will move fast?
Hi friend. You are right. If we increase the battery voltage, it will move faster..
He used 1.5 v battery😂😂
@@Science_4U_ oh ok bro
I am using L293D driver borad and getting no response from the code ..what could be the issue
Hi friend. Sorry to know that. Most probably, the issue could be due to a bad motor driver board.Have you succesfully used the motor driver board before?.
Also the problem could come due to bad batteries. Please use new batteries and see whether it is working..
Bro can you please provide documentation
can i code the arduino without connecting any wires of the sensor boards only in pc will it work? will the bluethooth work?
Yes friend. Arduino can be coded in PC without connecting any sensors..after coding , the sensors can be connected later.
@@Science_4U_ ok bro thank you bro i have many ideas bro but i dont know how to code it bro
Hi friend. Dont worry about coding. It is not very difficult. There are so many videos in youtube that teach about coding. You can watch them and slowly learn coding step by step...
@@Science_4U_ ok bro thank you
hello , dear friend every think is ok, just obstacle avoidance module not working? i try too much but the result was same
what u think?
Just check connections to ultrasonic sensor once again.If connections are correct, It should be most likely due to a faulty ultrasonic sensor. It can get damaged easily. Have you used this ultrasonic sensor before or is it a new one?
connections were corrected .ultrasonic sensor is new one . u know during uploading programs i heard some sound like tik ,tik from Arduino and yellow lamp lighting very fast ( i dont know it cause of something wrong or normal)
when i disconnected the servo jumper GND ,arduino worked normally (without sound) @@Science_4U_
@@alirezagoudarzi9732 Hi friend.The lamp lighting fast when the code is uploaded is quite normal. Also the tick tick sound is due to slight movements of the servo motor when the code is being uploaded. So that is why when you removed the servo motor wire during uploading the code, the tick tick sound went away. But, now after changing the ultrasonic sensor, is it working friend?
bro can we use 2 li ion battery for bluetooth module
The bluetooth works with an input voltage of 3.3V to 6V only. So bluetooth module will not work if any voltage outside this range is given to it. What is the voltage of a single Li ion battery. Is it 3.7V? If yes 2 Li ion batteries will make it 7.4V which is greater than 6V and hence the bluetooth module will not work.
hi, sir about the battery what's the best alternative for li-on? like it can function just like it
where can I connect the other two gear motor? I'll used 4 gear motor. what's better 2 or 4 gear motor?
Hi friend. Li-ion are the best batteries in my experience. They last really long and are rechargeable also. You can use 2 Nos. Of 18650 li-ion batteries for the project. If you want the wheels to rotate faster, you can even use 3 nos. Of 18650 batteries.
You can connect red wires from 2 right motors together and connect to one terminal of motor driver board at right side. Similarly you can connect 2 black wires of the right side motors and connect to other terminal on right side of motor driver board. You can my following video where i have used 4 motors.
ruclips.net/video/JK6zTM65Rh0/видео.htmlsi=BPWyLmYXhtCLRolc
In my experience, if you use 4 motors, it will be a bit difficult to turn easily. There will be some sliding of the wheels when it turns if we use 4 motors. But if we use 2 motors and a castor wheel, it turns very fast without any problem. If you are using a powerful battery, 4 motors are also okay. But for easy turning, 2 motors and castor wheel is definitely better.
@@Science_4U_where else can i keep in touch with you? cause I have so many questions, if that's okay with you, sir
I need to Connect Ir sensor and Buzzer in this car is this possible 😢
Hi friend, it is surely possible. But the code has to be modified.
Which battery should I use
Hi friend, you can use any battery with voltage from 5V to 12V .. I will suggest you to use 2 x 18650 , 3.7 V Lithium Ion batteries. They last really long and they are rechargeable also..
The connection of Arduino uno and Arduino mega 2560 is same or different?
Yes friend..connections are exactly the same..arduino mega has more number of digital IO and Analog IO pins..the code for uno will work for mega also if you use the same pin numbers for the connections..🙂
After all the connections done and I have install the code the still robot is not moving 🤔
@@binitsapkota6753 Okay friend. There can be many reasons why robot is not moving. We have to identify one by one..it could be a motor driver problem, bluetoorh module problem, connection problem..etc..
@@binitsapkota6753 If you can share the photos of connections in my instagram id..i will see if any connection problems are there. I can also help you to identify the problem by checking one by one..
Okay can U send me your Instagram id
please help me! my car is getting controlled without any problem! but my servo motor is just stuttering and not scanning for any obstacled to change the direction!
if there is any way to send you the video then please do let me know asap as i need to demonstrate my project tomorrow morning!
Okay friend. Can you share to my following instagram id?
instagram.com/_science4u_?igsh=MTM5aXFpdTM5aG5lNg==
Sir, why are the two motors not working even though I have followed the circuit diagram, but the servo is working?
Most probably, it could be a bad motor driver board. I will suggest you to do the following. Connect 5V from arduino to IN1 pin of motor driver board and GND pin of arduino to IN2 pin of motor driver board. Is one motor rotating?.
Also please check if jumpers are there in the motordriver board connecting ENA and ENB to the pins just above it. Without jumpers also, it will not work.
Sir my left side motor is not turning ...even though all connections are right and motors are also good....what is the problem in it ???
Whether right side motors are turning?. Could be a looseness in connection. It could also be poor battery which is able to rotate only right side motor.
where and how do i upload the pin 1 2 3 4 idk where help me project is on tuesday bro
Hi friend. The pin has to be entered in the software when you are connecting smartphone to the bluetooth module for the first time. The space where ypu have to enter the pin is not clearly seen. That is a problem with the software. You have to click on the are where pin has to be entered and enter the pin.
can we use this coding for four gear motor
Hi friend. You need not change the code for using 4 geared motors. You can connect 2 motors on left side and 2 motors on right side. Join the +ve of both left side motors and comnect to motor driver board on left side. Next join both -ve wires from left side motors and connect to motor driver board on left side. Similarly do for right side motors also. The same code will work.
You can watch the following video of a bluetooth car that i have made with 4 motors, for reference.
ruclips.net/video/JK6zTM65Rh0/видео.htmlsi=5I3oCVfpr9yA58Or
Super😊👌
Thank you☺️
What to do after open codes, which board must select for it?
@@saurabhtambde8259 Arduino Uno board should be selected after opening the code in IDE software.
Bro very nice project bro I done this but when I give left it is going right what is the reason bro? Please tell
Hi friend..That is because the control pins 4,5,6&7 from the arduino are connected to the motor driver board in the worng order. You can interchange pins 4&5 with pins 6&7 and see if it solves the problem..By trial and error you can correct the motor rotation direction by interchanging pins..
Thank you bro
Hello sir this works for a 4 wheels robot?
Yes friend. The same code works for 4 wheels also. Just attach 2 more motors in the front. The wires coming from the front motors can also be connected to the motor driver board alongwith the wires coming from the back motors..I have done a similar project with 4 motors. You can watch that video below for better understanding..
ruclips.net/video/JK6zTM65Rh0/видео.html
But only problem I have seen with 4 motors is that it is a bit difficult to turn.
Life savior this is my uni projext😊
Hi friend. Please try this project and ask if case of any doubts..
Hello friend, i did as you did and it’s not moving, i kept the vcc connected to motor and didn’t change it, bluetooth worked normally and I connected. So whats the problem if you can help, thank you.🫶🏻🫶🏻🫶🏻
@@taboo3274 Hi friend. Do you see light on the motor driver board?. Are 2 jumpers connecting ENA & ENB pins available in the motor driver board?. Have you used the motor driver board before or is it a new one?
@@Science_4U_ new one
@@Science_4U_ no lights
hi, sir I'm confused with the jumper wires. do I need all of these, male to male, female to female, and male to female? need your rep asap, thank u sm
sir
Hi friend. Sorry for the late reply. You need the following
Male to female :
Bluetooth module- 4 Nos.
ultrasonic sensor - 4 nos.
Connection of motor driver board to arduino- 4 Nos.
Male to male :
Connecting servo to arduino : 3 nos.
Connecting battery to arduino : 2 Nos.
You dont need any female to female jumper wires.
thank you so much siirrr, so very kind of youuu🙌🏻
@@Science_4U_ what size should I get? the 10 cm or the 20 cm?
i wanna make it with L293D motor driver what should i do for the connections i am new to arudino
Hi friend..there are two types of L293D motor drivers..
1. L293D motor driver shield..that is kept on top of arduino board. It has 4 motor controls and 2 servo motor controls also..
2. L293 motor driver module board with only 2 motor controls..that is kept separatley..
Which one of the above do you want to use?
your tutorial is so easy to understand but my project needs 4 wheels thats the problem for me and i dont know how to give connections for 4 wheels in the motor shield :(
and code too but i think i can manage the code somehow
if u have a tutorial for 4 wheels can u send me the link for it! pleasee
@@pradishvaidya okay..you can watch my another video of bluetooth controlled car, where I have used 4 motors. You can do in similar way..The video is given below.
ruclips.net/video/JK6zTM65Rh0/видео.html
Can i use 4 motor in the place of caster wheel
Yes..ofcourse friend. You can use four wheels. But only problem that I have noticed is that, if we use 4 wheels with motors, the robot will not turn that smoothly. This is because while turning, there will be some resistance due to skidding of the rubber wheels. But definitely, using all 4 motors will also work!!!
Thank you so much 😊😊😊😊
@@ARCHANASINGH-by6vv okay friend..🙂
How many current should I give to this robot
@@ARCHANASINGH-by6vv How many current means what friend?. The geared motor consumes around 200 mA per motor. So total 800 mA for 4 motors. Then arduino + servo motor + bluetooth module + ultrasonic sensor + motor driver everything put together another 700mA. So total around 1.5A maximum current capacity will be required for the battery.
Sir please share me the code here because i cant open the link you give in description, please😭😭 my project due date is tomorrow
Sure friend. I have uploaded the code in another file sharing site. Please check whether you are able to download code from the following link...
www.mediafire.com/file/k1jiv19uo41xxe9/Bluetooth_controlled_car_with_obstacle_avoidance.ino/file
can we connect 4 gear motors instead of two?
Yes sure friend. Connect 2 motors on either side.
brother i made my project by watching sritu hobby's video ( the same obstacle avoiding car ) but after i uploaded the code the servo motor moves once randomly every 5-10 secs ( doesnt work by placing hand in between ) also only 2 tires start spinning randomly in full speed and the other 2 tires just dont spin! can it be a motor driver issue ? please help!@@Science_4U_
2 or 4 motors?@@Science_4U_
@@aryankaj7167 Hi friend. The two wheels are on opposite side or on one side only?. Most probably, the problem is with the ultrasonic sensor. It is not detecting obstacle.
sir my all connections are same , but my bluetooth module is not showing in bluetooth network.
Make sure you give input voltage of 3.6 to 6 volt only to the bluetooth module. Otherwise it will not work. Also plesse try searching bluetooth module in another phone and see whether it is getting detected. If still bluetooth module is not getting detected, it may be faulty.
How many jumper wire have you used
Hi friend. I have used the following jumper wires..
1. 4 Nos. Male to Female for connecting motor driver board to arduino uno.
2. 4 Nos. Male to Female for connecting ultrasonic sensor to arduino uno.
3. 4 Nos. Male to Female for connecting bluetooth module to arduino uno.
4. 3 Nos. Male to Male for connecting servo motor to arduino uno.
5. 2 Nos. Male to Male for connecting arduino uno to battery.
@@Science_4U_ thank you so much 😊😊
@@ARCHANASINGH-by6vv okay friend..🙂
Hello I am having a problem ,I have upload the code for the Bluetooth Control Robot, when i connect the the servo motor and the ultrasonic sensor , when I turn the power on the servor begin shaking and the ultrasonic sensor does not work, both the servo motor and ultrasonic work in the previous" non bluetooth" code robot, what in the circuit could be killing the bluetooth control,
hoping to find the solution
Hi friend. Since the servo motor and ultrasonic sensor worked in the non bluetooth project, we cannot doubt the working of the sensor. Servo motor shaking is very common. It will jerk occassionally when it is not moving and it is normal. Can you please check the connections once again. Also the bluetooth module could be faulty?. Bluetooth module has to be supplied with an input voltage of 3.3 to 6 V only. Please check that. Also please check if the batteries are in good condition.
Sir thank you for the quick response I will check the motor driver which I suspect from the beginning, today when I turn the power on nothing moves not even the servo or ultrasonic sensor, I will let you know what I find today
@jerryrichard4994 Okay friend. If nothing moves, I would suspect the battery also. Batteries are the most overlooked things in these projects. The components draw large current and so the batteries get discharged quickly. Without noticing that, we would be suspecting the other sensors.
Sir I have been trying new ultrasonic sensor with one that works on my non bluetooth board and everything works ,this one bluetooth will active the motor with bluetooth but will not detect anything in front of sensors
the servo just barely move maybe just a few degrees, could the code be the problem or the board, I'll try a new board and will try again
@jerryrichard4994 Hmm.okay friend. The code shouldn't be a problem because I have already tested the code and I am showing the working of the robot in the video. Please do try friend. I think you will be able to solve the problem.
i did everything same but when i press forward or any other button my orders get done very late it goes forward after like 4-5 seconds can you help me please
Hi friend. Can you tell after 4-5 seconds it is behaving normally?. Or is it moving very slow after 4-5s..?
Bro again another problem I changed the pins then all the board lights are glowing but motor is not working please tell me
Bro please tell
Hi friend. Sorry for that. Can you give the connections like pin no. 4 of arduino to IN1of motor driver board, pin No 5 to IN2, pin no 6 to IN3 and pin no 7 to IN4 in that order and tell what happens...
Hi sir when I upload code and the car is working but when I do forward it id not stop it is going frequently and not stop what I have to do please reply 😢
😢 please reply it is not stop it is going farward but it is going backward and left and right 😅😅
😢😢 please reply sir
Hi friend. After going forward it is not stopping even if the forward button is not pressed in mobile application?
When I press forward button it is gowing but not stoping 😢
Please reply
@@alhamdulilla01did you fix it?
is there a way to put all the code on one sketch
No friend. In one sketch, we can put only one code..
The Android app is not showing in both the link .. please help
Hi friend. You can try downloading the app from the following link.
www.mediafire.com/file/3yzmvmsqt3ffobc/BluetoothRCcontroller.apk/file
Can we use 4 gear motor and wheels rather than using a castor wheel ?
Yes..sure friend..both the left side motors can be connected together and connected to left side of the motor driver. Similarly both the right side motors can be connected together and given to the right side of the motor driver..It will definitely work..
But only problem that I have seen is that it will be slightly difficult to turn left or right since 4 wheels are there..The rubber wheel has good grip and hence for turning with all 4 wheels, there will be some difficulty due to extra friction from the rubber tyres. But if only 2 tyres at the rear and a castor wheel is given, it can change directions very quickly..
So it means it will cause a little difficulty to turn it right and left
@@Science_4U_ ohh thanks for the information cause im a 8th class student and im having a exhibition which is being held in our school thats why i was curious about this
@@kikamemouse8124 okay friend...if possible you can try both options and see which you feel is better..
Bro how can i connect hco5 module to my mobile
Hi friend. It is very simple. First download the bluetooth control android app from google playstore. The link to download app is there in the description box. I am giving the link here also.
play.google.com/store/apps/details?id=braulio.calle.bluetoothRCcontroller&hl=en&gl=US
Once you have downloaded app, open app..search for devices and click HC-05. If it is being connected for 1st time, use 1234 as the PIN.
That is it!!!!. The mobile will be connected to HC05 module..
Thanks bro
we can run the car on both controlled and mannual and voice code theres any edit to be done in the code
Yes friend. We need to edit the code to provide these functions.
@@Science_4U_ I can get code from any websites is there
@@kevincelestine7020 No friend. If you want your car on bluetooth mode, manual mode and voice control mode, we need to write specific code for that. I haven't seen any code from website with the exact same functions.
I am sorry that I want to ask you the motor driver when I give power to 12v is not responding but I give to 5v motor driver is on but motor not working
@@kevincelestine7020 The motor driver should work perfectly in 12V DC supply also. I am not sure why it is not working in 12V. Could be a problem with the board.
hi, can I possibly make the move faster? if yes, how can I do that?
please I need your reply
Yes friend. You can make it move faster. The easiest way to make it move faster is to use a battery with a higher voltage.
@@Science_4U_ elaborate sir
@@ricamaemartinez6307 Now suppose you used 6V battery for the project, you can use 9V or 12V battery to increase the rotational speed of the motors. Is that clear friend?
@@Science_4U_ if I used 2 battery Lion WZS 18650 4800mAh 3.7V, will it work?
bro can we use 12v battery for this project
please reply bro
Hi friend. Surely you can use 12V battery for this project. 12V can be given to both uno and motor driver board without any issue. The bluetooth module cannot be powered directly from this 12V. It needs 3V to 6.6V input voltage only..so it has to be powered with 5V from arduino..
bro but Arduino we need to give 5v only know bro
can you send circuit diagram for what he asked this may help him
how we need to connect
Why the car is so slow
And
Will the code works on a 4 whealer car to run 4 motors
Hi friend, You can increase the car speed by increasing the battery voltage.
Also this code will work for 4 motors also. Instead of one motor, you can connect 2 motor on either sides of the motor driver board..
Thanks
I have made the connections as shown in the video and my car is not moving or working.
Hi friend, there can be so many reasons why the car is not working. But the following are the 3 most probable reasons. Please check them.
1. The ardino board or motor driver board could be faulty. Are you using new ones or arleady used and tested ones?
2. The car will not work if the batteries are discharged. Make sure you are using new batteries.
3. Is the code uploaded properly?. Did the IDE software show the message that the code upload is succesful?.
hey bro why us my servo motor not rotating fully kinldy reply fast ......
Most likely it should be due to poor battery. Can you explain further?. Servo motor is not turning 90 degrees to both sides?.
@@Science_4U_ it is just stuck and i have tried several times i am using 2 rechargeable batteries 3.7v+3.7v 18650 battery
@@Science_4U_ and also when i have completed all the wiring again ok then i have uploaded the code the Bluetooth is being connected but it js not responding
@@maviaqaiseriqbal3098 okay friend. The bluetooth car not moving could be due to several reasons. It could be due to bad bluetooth module, faulty L298N driver board, wrong connections etc. We have to check one by one. If you can come to my instagram page, I can chat and guide you to identify the problem.
@@Science_4U_ ok what is your Instagram handle
Sir i upload the code, my car is running with the help of my phone which means Bluetooth module is working properly but my car is not detedting the obstacles and my servo is not moving properly also.which means my servo and sensor is not working Properly?I am not using rechargeable batteries, please answer what should I do?
Hi friend. Most likely the ultrasonic sensor is not working. Please check connections once again. If all connections are correct and still not working, then most probably the ultrasonic sensor is bad. You can relace the sensor to solve the problem...
But I have made obstacle avoiding car before which works properly,where my sensor and servo both were working properly
@@ShariyarSajid-fr4vt Okay..then please check connections or some looseness in connections etc..check battery voltage also..
I have checked connections but I Don't have anything to check voltage
@@ShariyarSajid-fr4vt hmm..okay..
Hello sir,, Bluetooth module connection with app is successful,but robot is not moving. Please give me solution. I've done everything exact same as you.
If you remember,,I commented on your obstacle avoider video,,I have implemented it and it works perfectly
Can you double check the connections?. Is the bluetooth module that you have used a working one?.
@@Science_4U_ Sir,,I've been successful to run the project☺️
But I have a query. While checking obstacle,,the code is not advanced. Like it does not measure left and right distance. Will the algorithm from your advanced obstacle avoider video will work in this project if I add?
@@sk.ahsanabid941 yes friend that is true, this code is not advanced. It simply looks both left and right but always goes in the right direction only. You can use the code from the other project with advanced algorithm. It searches for obstacles in both left and right and accordingly decides whether to go left or right. But only thing is , please watch that video also and make sure the pin numbers are correct. Pin numbers may have to be changed in arduino, if you run that code with advanced algorithm..
@@sk.ahsanabid941 have the same problem, what did you do?
@@slchlml placed the tx and rx of bluetooth module at rx and tx port of arduino,,and adjusted the code a little
sorry i have another problem every time i enter a code it works but when i enter another it get like overwritten idk how to solve it
Hi friend. It is like that only. Only one code can be stored in arduino at a time. When a new code is uploaded, it overwrites the code already present in memory of arduino.
so how am i supposed to make the robot work if ony 1 code works at a time im supposed to input 6 codes is there any other way@@Science_4U_
Thanks man!
Keep going!
Thank you so much dear friend..🙂❤️
I have made the connections as per video. But after connecting to the apps, the motor not responding. What should I do?
Hi friend. There could be different reasons for this problem. The bluetooth module could be faulty or the motor driver board could be faulty.
What I will suggest is that can you do the connections for making the obstacle avoiding robot alone. I have a separate video on that. That doesn't require a bluetooth module. So if that works, atleast we can make sure the motor driver board is working fine.
Can you upload the circuit diagram
Yes sure friend!!!. I have made the circuit diagram and uploaded in the following link.
drive.google.com/file/d/1OwHegQmTAUb7mbW_RdNSIqG0zmkmCL0W/view?usp=sharing
Please ask me if any further doubts are there. I will clarify to the best of my knowledge!!!
Sir I can’t connect the code to the aurduino 😭because of the application can you help
Have you connected the arduino to PC or Laptop using USB cable and uploaded the code using IDE software?. What is the error that it is showing?
Sir tomorrow is my submission plz reply me
I have made this car and I have chacked all the connections also and car is working but it can't work more than 2 minutes after connecting batteries it hardly run for 2 min I thought my batteries are dead so I gave 9v battery connection in Arduino board so it worked for while but now it's stop again...
Hi friend, surely I will help. Don't worry. I think it is because of batteries. 9v transistor batteries and 1.5v AA batteries will not work for long time. 18650 3.7V rechargeable batteries are the best. These batteries are used inside laptop batteries and power banks. You can use 2 X 18650 batteries which will work for really long time.And you can recharge them also..
I have another doubt. When it stops working does it stop all of a sudden ?. Or the speed reduces and reduces and then finally stop working?. Also when it stops working, do you see that the light in the bluetooth module starts blinking and in the mobile phone does the message come that bluetooth is disconnected?. I am trying to understand whether it stops working because the blutooth module is loosing connection due to low input voltage.
Also another thing is that if your battery is weak, when the servo motor rotates, it takes large current which reduces the input voltage. The bluetooth module works in a narrow input voltage range of 3.6-6v only. So if the voltage drops suddenly when the servo motor rotates, the bluetooth module can get disconneted and it stops working.
Please check these points. Please ask further questions and I will be happy to help..☺️
Hi friend. Whether the problem is solved?
I have made the connections as per the video and uploaded the code. But after connecting to the app, It's not responding..what do i do?
Please check the connections once again. When the bluetooth module is not connected to app, the light in the bluetooth module blinks rapidly. After connecting to app, the blinking pattern changes indicating that it is connected to app. Also, when the app is connected to bluetooth module, does it display the message that it is connected to the bluetooth module?
@@Science_4U_ no I'm not getting any message like that
Do you see any blinking light in the bluetooth module when switched on?
@@Science_4U_ yes
Whether the blinking pattern change when you connect to app?. Also in the app, whether a red blinking light change to green light when paired to bluetooth module?
How much might it cost sir?
Total cost of all the components for the project will be approximately 1200 Rs to 1500 Rs..
The cost depends on where you purchase the components from. You can get the components at a very cheap rate from some online sellers.
Sir plz edit and give fresh circuit link
Hi friend. Are you not able to download the circuit diagram from the link provided?
but the problem is when I acclerate, the motor stops functioning but the left right are working
Ooh.that is strange..is reverse working friend?
@@Science_4U_ nvm, it wasn't the code error, just my battery was low
@Anonymous-gq2wg okay friend. Glad that it is working now..🙂
Can we use 4 gear motor?
Yes sure friend. Just connect 2 motors to the motor driver board. I mean +ve terminals of both motors can be connected to one terminal of motor driver board and -ve terminals from both motors can be given to other terminal of motor driver board..
@@Science_4U_ can you give me your Instagram
@@Science_4U_ im getting this error what to do? Sketch uses 5886 bytes (18%) of program storage space. Maximum is 32256 bytes.
Global variables use 148 bytes (7%) of dynamic memory, leaving 1900 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't set com-state for "\\.\COM6"
Failed uploading: uploading error: exit status 1
please reply fast tomorrow is my project submission date
@@Science_4U_
@@ninzagames Hi friend, This error normally comes when the correct port is not detected. In IDE software, please goto tools>>port..make sure that you have selected the right port there. IF this os alos not working, try unplugging and plugging again to different USB port. Also pelase try in a different PC or Laptop.
Where is the library link
Hi friend. The only library required is for the servomotor #include servo.h This can be installed by searching for adafruit servo in tools>library manager and can be installed.
@@Science_4U_ thanks a lot
Sir please copy the code and paste it sir because the two link is showing that the file format is not supporting 😢
Okay friend..Sure..The code is given below..
#include
#include
SoftwareSerial bluetooth(11,12); // RX, TX
Servo Myservo;
char t;
#define MLa 4 //left motor 1st pin
#define MLb 5 //left motor 2nd pin
#define MRa 6 //right motor 1st pin
#define MRb 7 //right motor 2nd pin
#define trigPin 9 // Trig Pin Of HC-SR04
#define echoPin 8 // Echo Pin Of HC-SR04
long duration, distance;
void setup()
{
Serial.begin(9600);
bluetooth.begin(9600);
pinMode(MLa,OUTPUT); //left motors forward
pinMode(MLb,OUTPUT); //left motors reverse
pinMode(MRa,OUTPUT); //right motors forward
pinMode(MRb,OUTPUT); //right motors reverse
pinMode(trigPin, OUTPUT); // Set Trig Pin As O/P To Transmit Waves
pinMode(echoPin, INPUT); //Set Echo Pin As I/P To Receive Reflected Waves
Myservo.attach(10);
}
void loop()
{
if(bluetooth.available()>0)
{
t = bluetooth.read();
Serial.println(t);
}
switch(t)
{
case 'F':
{ //move forward(all motors rotate in forward direction)
digitalWrite(MLa,LOW);
digitalWrite(MLb,HIGH);
digitalWrite(MRa,LOW);
digitalWrite(MRb,HIGH);
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH); // Transmit Waves For 10us
delayMicroseconds(10);
duration = pulseIn(echoPin, HIGH); // Receive Reflected Waves
distance = duration / 58.2; // Get Distance
Serial.println(distance);
delay(10);
if (distance > 3) // Condition For Absence Of Obstacle
{
Myservo.write(90);
digitalWrite(MRb, HIGH); // Move Forward
digitalWrite(MRa, LOW);
digitalWrite(MLb, HIGH);
digitalWrite(MLa, LOW);
}
else if ((distance < 2)&&(distance > 0)) // Condition For Presence Of Obstacle
{
digitalWrite(MRb, LOW); //Stop
digitalWrite(MRa, LOW);
digitalWrite(MLb, LOW);
digitalWrite(MLa, LOW);
delay(100);
Myservo.write(0);
delay(500);
Myservo.write(180);
delay(500);
Myservo.write(90);
delay(500);
digitalWrite(MRb, LOW); // Move Backward
digitalWrite(MRa, HIGH);
digitalWrite(MLb, LOW);
digitalWrite(MLa, HIGH);
delay(500);
digitalWrite(MRb, LOW); //Stop
digitalWrite(MRa, LOW);
digitalWrite(MLb, LOW);
digitalWrite(MLa, LOW);
delay(100);
digitalWrite(MRb, HIGH); // Move Left
digitalWrite(MRa, LOW);
digitalWrite(MLa, LOW);
digitalWrite(MLb, LOW);
delay(500);
delay(10);
}
break;
case 'B':
{ //move reverse (all motors rotate in reverse direction)
digitalWrite(MLa,HIGH);
digitalWrite(MLb,LOW);
digitalWrite(MRa,HIGH);
digitalWrite(MRb,LOW);
delay(10);
}
break;
case 'L':
{ //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
digitalWrite(MLa,LOW);
digitalWrite(MLb,HIGH);
digitalWrite(MRa,LOW);
digitalWrite(MRb,LOW);
}
break;
case 'R':
{ //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
digitalWrite(MLa,LOW);
digitalWrite(MLb,LOW);
digitalWrite(MRa,LOW);
digitalWrite(MRb,HIGH);
}
break;
case 'S':
{ //STOP (all motors stop)
digitalWrite(MLa,LOW);
digitalWrite(MLb,LOW);
digitalWrite(MRa,LOW);
digitalWrite(MRb,LOW);
}
}
}
}
Thank you very much sir ❤
You are most welcome dear friend...💓🙂
@@Science_4U_ how to copy
I had done all thimgs as described in the video but my car was not working
Hmm..okay friend. It could be due to several reasons. Are you sure that all the components that you have used are working and not faulty?. Are they used before or new ones?. We have to check one by one.
Please give a circut diagram fully🤧🥶
Okay friend.. I will draw the full circuit diagram and upload soon..👍
Code are not compiled why
Hi friend, Do you mean that you are not able to compile the code?. There could be a problem with your PC/laptop. Please try compiling the code in a different PC or laptop.
My car is moving only left and right when I touch forward and backward please help tomorrow is my submission
Hi friend. I think the solution is very simple. When you press forward, one wheel will rotate forward and other wheel backward. Just interchange the wire connection of the backward rotating motor at the motor driver board..
Hello sir we did the same steps but not getting any output nothing is happening
Hi friend. There could be many reasons why it is not working. We should identify one by one. There could be a problem with the motor driver board or the bluetooth module. I would request you to make the obstacle avoiding robot (without bluetooth control) by watching video in the following link, so that we can atleast confirm that the motor driver board is working fine..
ruclips.net/video/kPSBpfUpHt0/видео.htmlsi=5G2SljrhVpCBrLVH
Thank you so much we will do as followed
Okay friend. 👍
Please my name is Emanuel am having a robotics competition and your help
Hi Emanuel..How can I help you?.
Show me the code closely
Sir code is not uploading
Upload error failed uploading uploading error exit status 1
This error show and code is not uploading
Avrdude stk500 recv programer is not responding error shows please reply soon
Okay..have you selected the correct port?. In tools..port..you have to select the correct port before uploading the code..
Sir code uploaded but it's not working
What is the problem?. Is it not responding to commands in mobile phone?.
Can you give me correct circuit diagram
Hi friend. The circuit diagram can be downloaded from the google drive link given in the description box. I am giving the link below also.
drive.google.com/file/d/1OwHegQmTAUb7mbW_RdNSIqG0zmkmCL0W/view?usp=sharing
@@Science_4U_ I want the circuit diagram that comes after changing the Bluetooth module you mentioned
The VCC of the bluetooth module has to be connected to 5V from arduino. That is all. Remaining circuit diagram is same.
@@Science_4U_ thanks bro
@@Science_4U_ Then don't you have to remove the wires from the servo motor and connect it somewhere else?
why r u connecting gnd of Bluetooth module to the power of motor driver and Vcc of bluetooth module to the gnd of motor driver?
Hi friend. I am really sorry. There is a mistake in the video. I also noticed now only. The gnd of bluetooth module should be connected to gnd of motor driver and Vcc of bluetooth module to the power of motor driver.
Please follow the audio instruction. There was a miskake in the video. Iam really sorry for that.
Bro plz give me circut dig
Okay friend. The connections are already explained in the video itself. The circuit is also shown during the video at different instants, when the connections of different components are given. Thank you..🙂
Sir app link was not working
Hi friend. You are right. The app has been removed from playstore.
You van download the .apk installation file for the software from the following link and install the app directly in mobile phone.
drive.google.com/file/d/1Mzc5KGRzhqFgvPnWan8b5mDisAgMnkMK/view?usp=sharing
Sir could it work in first attempt please reply fast sir 😢
@@Science_4U_sir it will work in first attempt please tell me fast sir 😢
@durgatelugugamerff1937 Hi friend. It will definitely work in first attempt itself, provided all the components are in good working condition. Especially the bluetooth module and L298N driver board can be sometimes faulty, especially when it is a new one. If these are used before and is definitely working, then the project will work in first attempt itself..
Its only working for left part of motor controller.....Right part is not working....
Hi friend. Can you explain the problem in little more detail?. When you press the forward, reverse, left or right button in mobile phone, , in all cases only the left side motor is rotating and right side motor is not rotating..is it like that?
@@Science_4U_ Yes, it works for only one motor i.e. forward, reverse and left only works for single motor.... no reaction on another motor....
I tried testing it using led but only one side is accepting connection
@@riteshkashyap14887 hmm...okay friend..can you check whether the motor which is not working is good or bad?. Can you connect the motor that is not working directly to a battery and see whether it is rotating or not?
@@Science_4U_ yes its working, and like i said i am testing with with LEDs to detect wheather current is passing through or not.... but again only left side led works not the right one.... thinking of changing code to check if it captures signal for right...
But if you have any clue then please let me knwo.
I am not able to understand why one side alone is not working. Either it works in opposite direction, if the pins are interchanged or it doesnt work at all..
I can’t download the code?
Hi friend..I have given 2 links to download the code, in the description box.
I am giving both the links here also. Atleast one link will work..
drive.google.com/file/d/1ggzs2R8YUCkfu-xahoCeaGAAlYEJ0T3f/view?usp=sharing
OR
www.mediafire.com/file/k1jiv19uo41xxe9/Bluetooth_controlled_car_with_obstacle_avoidance.ino/file
Which software to download from play store ??
Link you have given in description is not working
Hmm..yes friend. I have also searched and the software is not available in playstore anymore. They would have removed it.
You can search in google for Bluetooth RC car by Andi.co
Then you can download apk version of software and install it..
Koi dusri link dijiye nhi to code ki Ek video Bna dijiye
yeh hai doosra link..
www.mediafire.com/file/k1jiv19uo41xxe9/Bluetooth_controlled_car_with_obstacle_avoidance.ino/file
Sir can you share the code plzz
Hi dear friend. The links to download the code is already given in the description box below the video. I am giving the download links here also..
Link to download Code:
drive.google.com/file/d/1ggzs2R8YUCkfu-xahoCeaGAAlYEJ0T3f/view?usp=sharing
OR
www.mediafire.com/file/k1jiv19uo41xxe9/Bluetooth_controlled_car_with_obstacle_avoidance.ino/file
But sir there is nothing
Then there is some problem. Are you not able to download a small file?. You should dowload the file and open in Arduino IDE software..
when i click any button it starts and never stop its movement how can i resolve this??
Hi friend. Can you confirm that the movement happens in all the directions?. Like if you press back, then will it continously move in the reverse direction without stopping?
yes@@Science_4U_
in every direction it moves like this
@@Science_4U_
and also when it moves like this the rx stops blinking and wont light up until reset button on arduino is pressed@e_4U_
@@Science_4U_ yes it's moving like this in every direction
Code download nhi ho rha
hi friend. app mediafire link bhi try kiya? download link description box mein hai..Yahan bhi mein de raha hai..neche doosra download link hai. try kar dijiye
www.mediafire.com/file/k1jiv19uo41xxe9/Bluetooth_controlled_car_with_obstacle_avoidance.ino/file
Bro my phone is not connecting to my rodot
If it is not connecting, it might most likely be a problem with the bluetooth module..can you try with another phone?. Also is the light in the bluetooth module blinking?
Also, in this video, I am showing that the positive VCC pin of the bluetooth module to be connected directly to +ve terminal of battery since all the +5V Pins in arduino are already used. But please make note that the bluetooth module works only with an input voltage range of 3.3 to 6V. So if you use battery with voltage greater than 6V, bluetooth module will not work. So, in that case connect the positive of servo motor directly to battery and VCC of bluetooth module should be taken from +5V of arduino..This also you please check..
Bro I can connect the car with my phone but the car is not moving
@@user-gs4xz6mj2r okay friend. There could be something wrong. We have to check one by one to find out the problem..If you can send the photos of the connections in my instagram id, I will check and help you identify the problem..
I am only 10 years old becouse of that I don't have a Instagram account
Isme wheel nhi move kr rha h 😢
L298 motor driver board gharab ho saktha hai. Aap driver board pehli baar upyog kar raha hai? Driver board mein 2 jumpers hona chahiye. Check kar dijiye..
please send me the code bro
Hi friend. The code can be downloaded from the links given in the description box, below the video. The links are given below also..
Link to download Code:
drive.google.com/file/d/1ggzs2R8YUCkfu-xahoCeaGAAlYEJ0T3f/view?usp=sharing
OR
www.mediafire.com/file/k1jiv19uo41xxe9/Bluetooth_controlled_car_with_obstacle_avoidance.ino/file
@@Science_4U_ ok friend👍🏻
Sir its not avoiding obstacles
Ooh..Most likely your ultrasonic sensor is damaged. Replacing it with a good one will solve the problem..👍
I have changed
But Still this problem
Sir give me code and circuit diagram please 😢
@@gadgetguru0108 Hey friend. The link to download code and circuit diagram is given in the description box, below the video..
Bro, my Arduino Uno doesn't have the code to connect with red wire servo motor
Hi friend, I will surely help. I didn't clearly understand the problem. Can you please explain?
@@Science_4U_my Arduino Uno doesn't have the "Ioerf" like your diagram circuit shows. The "Ioerf" need to connect with the red wire servo motor like ur video shows. How can I fix that ?
@@nursyairahatiqahbintihusain Hi friend, IOREF is basically a 5 volt reference voltage that is given from arduino uno. Some boards will not have this IOREF pin. Instead, in its place 5V pin will be available. You can connect to that 5V pin also.
ruclips.net/video/eJsSn740mec/видео.htmlfeature=shared @@Science_4U_
ruclips.net/video/eJsSn740mec/видео.htmlfeature=shared . I doesn't have that in my Arduino Uno 🥲