Introduction: Shapes Making Car
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.
Step 1: Making of Chassis
- 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.
Step 2: Assembly 1 : BO Motor
- Align the BO motor to Line A as shown in the image.
- Stick both motors with the glue gun by aligning to line A.
Step 3: Assembly 2 : Caster Wheel
- Stick the caster wheel in front of the chassis with the help of a glue gun.
Step 4: Assembly 3 : Arduino UNO and L298N
- Screw the Arduino UNO and L298N on the chassis with the help of 5mm screws.
Step 5: Assembly 4 : Battery
- Stick the battery in between Arduino UNO and L298N with help of a glue gun as shown in the image.
Step 6: L298N Connections
- 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.
Step 7: Powering the Arduino UNO
- 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.
Step 8: Arduino UNO and L298N Connections
- 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.
Step 9: Setting the Pen
- 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.
Step 10: Calibration for Line
Download and Install the Arduino Desktop IDE
- Windows - https://www.arduino.cc/en/Guide/Windows
- Mac OS X - https://www.arduino.cc/en/Guide/MacOSX
- Linux - https://www.arduino.cc/en/Guide/Linux
- Upload the line calibration code
- Now it's time to put some paper down and put the marker in it.
- Measure the line made by the car.
(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)
Attachments
Step 11: Calibration for Angle
- Upload the angle calibration code
- Again put some paper down and put the marker in it.
- Measure the angle made by the car.
Attachments
Step 12: 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.
Attachments
Step 13: Enjoy
- 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. )