My idea this week was to make a self-driving police car that can overcome obstacles, as we can see in this video and the attached picture, and it will be for children's games.
We designed the circuit on Tinkercad
We have used several tools in this project as a
tool component:
-Screwdriver -Iron pliers - Soldering iron -ruler -scalpel -Rotring compass
-wax gun -scissors
electronic component:
-ON/OFF Switch -DC Power Adapter -DC Jack to terminal block converter
-Jumper Wires (Male-Female) -Crocodile Wires
We have used several tools in this project as a
tool component:
-Screwdriver -Iron pliers - Soldering iron -ruler -scalpel -Rotring compass
-wax gun -scissors
electronic component:
-ON/OFF Switch -DC Power Adapter -DC Jack to terminal block converter
-Jumper Wires (Male-Female) -Crocodile Wires
Tool Component
Arduino
adapter power
adapter power
Buzzer
on/of switch
L298D
wire male or female
LED
Tool to use prototype.
LED
Buzzer module
resistor
Arduino
L293D
DC gearbox Motor
Ultrasonic module
We started by assembling the components that we chose from the software tools store, then we started assembling, as we can see in the pictures, connecting the light-emitting diode and choosing two to be the color exchange as the police siren light and we connected them on the Pin 7, 8, and connect the rectifiers to the negative terminal with grounding, and connect Closure. button and the operation connected to the power source
We connected the transonic model as shown in the figure, the negative end with the ground and the positive one with the power source, then we connected the Tiger with Pin 2, then Echo on Pin3, because it brings a variable value
Then we connected the sound bazaar to a whistle to be able to produce the sound of a police sirenIn order for it to be programmed like the rest of the components, we connected it to Pin 9 and the negative terminal to ground
In the end, we connected the motor driver to be able to move the wheel and equal the energy needed by the motor module, and we connected them to the driver for M 293D, and we connected the bin as we see the ground to the ground terminals, and we connected two motors to the same outlet so that the driver is composed of two models, but the outside 4 I can then control the direction by stopping two wheels and turning on two more
I used IF condition to make sure if there is an obstacle 30 cm away, it stops the two right engines to make it rotate around itself to avoid the obstacle, then it continues walking, and the matter is repeated because it is within the loop.
If there is an obstacle at a distance of 30 cm, it stops the two right motors to make it possible to rotate around itself in order to avoid the obstacle in order to continue walking, and the matter is repeated because it is within the loop.
I used IF condition to make sure if there is an obstacle 30 cm away, it stops the two right engines to make it rotate around itself to avoid the obstacle, then it continues walking, and the matter is repeated because it is within the loop.
After that, we put them inside the command to review the condition of the car every time
If the IF condition is to make sure if there is an obstacle at a distance of 30 cm, it stops the two right motors to make it possible to rotate around itself to avoid the obstacle, then it continues walking, and the matter is repeated because it is within the loop.
I installed the buttons as they should be, and we saw it in the delivery on the simulation
I installed the ultrasonic as seen in the plugin on tinkercad
Here we see that we have made all connections are good
I connected a button to turn the game off and on
I connected the components to the Arduino as we can see
A picture of the owner of the project is nothing more
The problem we are facing:
1- There was a problem with the L298D driver.
2- It was difficult to figure out how to attach the wheels to the engine because it has four wheels, not two
Solve the problem :
1- The bus has replaced the damaged drive with one that works fine
2- After searching, I found that I have to make both wheels on the same side, whether it is right or not, apply to the same point of contact so that they work together and stop together, because if we see the right side stopping and the left movement, the cart moves around the axis of the right side and thus makes a turn and avoids hindrances