Shapes Making Car

by arnavssgk4770 in Circuits > Arduino

299 Views, 1 Favorites, 0 Comments

Shapes Making Car

WhatsApp Image 2021-12-05 at 7.07.45 PM.jpeg
WhatsApp Image 2021-12-05 at 7.07.45 PM (1).jpeg

Hello Everyone,

In this instructable, I will instruct you how to make a car that can draw shapes. There will be a marker in the car and when the car moves it will draw shapes. The code which I have written for this car allows you to make squares, triangles and rectangles.

Making of Chassis

drawing robot_compressed-page-034.jpg
drawing robot_compressed-page-033.jpg
drawing robot_compressed-page-032.jpg
drawing robot_compressed-page-031.jpg
drawing robot_compressed-page-030.jpg
drawing robot_compressed-page-028.jpg
drawing robot_compressed-page-027.jpg
  • Take a piece of MDF board and cut it with the size of 14.5cm x 9.5cm.
  • Make a line A from 3.7cm above the breadth, from line A make another line B above 2.5cm as shown in the image.
  • Mark a point in the centre of line B.
  • Place Arduino UNO and L298N and mark them for making holes.
  • At the centre of line B where the point was marked, make a hole of 5mm.
  • Also, make holes for screwing Arduino UNO and L298N which was marked earlier.
  • Take a small pipe (I have taken a pen's cap) make sure that the marker which you will use fits loosely in the pipe you are taking.
  • Stick the pipe to the hole of 5mm with the help of super glue as shown in the image.

Assembly 1 : BO Motor

drawing robot_compressed-page-026.jpg
drawing robot_compressed-page-025.jpg
drawing robot_compressed-page-024.jpg
  • Align the BO motor to Line A as shown in the image.
  • Stick both motors with the glue gun by aligning to line A.

Assembly 2 : Caster Wheel

drawing robot_compressed-page-023.jpg
  • Stick the caster wheel in front of the chassis with the help of a glue gun.


Assembly 3 : Arduino UNO and L298N

drawing robot_compressed-page-022.jpg
  • Screw the Arduino UNO and L298N on the chassis with the help of 5mm screws.

Assembly 4 : Battery

drawing robot_compressed-page-019.jpg
  • Stick the battery in between Arduino UNO and L298N with help of a glue gun as shown in the image.

L298N Connections

drawing robot_compressed-page-018.jpg
drawing robot_compressed-page-016.jpg
drawing robot_compressed-page-015.jpg
  • Connect the BO motor to L298N.
  • Connect the (+) wire of the battery with the VCC of L298N and connect a wire to the GND of L298N.
  • Connect a switch to (-) and GND wire of L298N.
  • Stick the switch to above the bo motor as shown in the image.

Powering the Arduino UNO

drawing robot_compressed-page-014.jpg
drawing robot_compressed-page-013.jpg
  • Connect a jumper wire to GND of L298N and GND of Arduino UNO.
  • Connect a jumper wire to 5v of L298N and VIN of Arduino UNO.

Arduino UNO and L298N Connections

WhatsApp Image 2021-12-05 at 7.00.18 PM.jpeg
drawing robot_compressed-page-012.jpg
  • Connect pin3 of Arduino UNO and ENA of L298N with a jumper wire.
  • Connect pin4 of Arduino UNO and IN1 of L298N with a jumper wire.
  • Connect pin5 of Arduino UNO and IN2 of L298N with a jumper wire.
  • Connect pin6 of Arduino UNO and IN3 of L298N with a jumper wire.
  • Connect pin7 of Arduino UNO and IN4 of L298N with a jumper wire.
  • Connect pin9 of Arduino UNO and ENB of L298N with a jumper wire.

Setting the Pen

drawing robot_compressed-page-011.jpg
drawing robot_compressed-page-008.jpg
  • Take a small rounded metal disc to get some weight on the marker so it can draw shapes properly.
  • Stick the disc to the end of the marker with super glue.

Calibration for Line

December 5, 2021
drawing robot_compressed-page-004.jpg

Download and Install the Arduino Desktop IDE

(If any motor moves in opposite direction reverse the direction of the motor's wire which is moving opposite)

(If your car does not move increase the speed in code a little bit)

Calibration for Angle

December 1, 2021
drawing robot_compressed-page-001.jpg
  • Upload the angle calibration code
  • Again put some paper down and put the marker in it.
  • Measure the angle made by the car.


Uploading the Main Code

  • Write the line made in mm and angle covered in the code there is a dedicated section for doing this.
  • Write square, rectangle or triangle, the shape which you want to draw, at the end of the code there is a dedicated section for this.
  • Upload the code after the changes are done in the code.

Downloads

Enjoy

December 5, 2021
WhatsApp Image 2021-12-05 at 6.58.59 PM.jpeg
WhatsApp Image 2021-12-05 at 6.58.58 PM.jpeg
WhatsApp Image 2021-12-05 at 6.58.57 PM.jpeg
  • Now your car is ready. Have Fun!!

(Sorry, for the less quality of video given above, my camera was having some shutter speed problem that's why it is so. )