Type Here to Get Search Results !

How to make a 3d printed car using arduino

A 3D printed car is a car having all its part printed by using a 3D printer. In other words it is also a car with fully designed 3D parts. A 3D printed car is much more than a normal rc car because we can customize the 3D parts to give a better look for our car. We can also change the shape and size of the 3D parts to provide a variable look in your car. This is so easy and anyone can do this by using some 3D designing software like SketchUp, TinkerCAD, Fusion360 and much more. The final execution of the designs are done by a 3D printer. To control the car you can use arduino or any other microcontroller. For best practice you can use arduino because it is much easier to build a circuit using arduino. Now the question come to your mind is –

How to make a fully customized 3D printed car using arduino?

A 3D printed car is very easy to build. Just you have need of this gadgets like 3D printer, a 3D designing software and the other electronics component like arduino, Bluetooth module etc. In this post I will discuss each and every steps that you need to know for building a 3D printed car. Now take a look at this steps one by one.

3D Printed Car Model –

The first and most important thing is to design the 3D parts. For this you have to use any 3D designing software SketchUP, TinkerCAD, Fusion360 etc. If you are a beginner you can use TinkerCAD. TinkerCAD is an online platform to design 3d models. It is much easier to design a 3d model in TinkerCAD than any other software. Now take a look at the 3d parts that I have designed for my car.

Note – You have to design all the 3d parts in .STL format. Because STL file is readable by all types of 3d printer. Also the STL file is easy to read and it gives a better printing.

These are the parts that I used to make the front and rear axle of the car. The customized design of the 3d parts help me to build a more flexible front axle as well as rear axle. After assembling all the 3d parts the front axle and the rear axle will look like this –

Now we need to print one 3d part that will hold the front and rear axle together. Basically this will be the chassis of the car. So designed a chassis and print it out. In the design I include the text “TECH STUDIO”, which is looking so cool and gives a unique look to my chassis.

At last I designed the 3d parts for shock absorber. Shock absorber is very important for our car and it provides a professional look to our car. So I designed the parts very carefully with proper shape and size. Take a look at the 3d parts that I have designed for shock absorber.

After assembling all the 3d parts of the shock absorber, it will be look like this –

Finally I connect all the front axle and rear axle together by using the chassis. Also I connect the shock absorber in the front and rear axle of the car. The final look of our 3d printed car will look like this –

But this is not the end. Now I have to connect the wheels and motors in the car. Also I have to design the circuit and write down the code. So I connect the motors and wheels in the car.


3D Printed Car Circuit Design –

Now the next important thing is to design the circuit for the car. To design the circuit I used different circuit component like arduino uno, l293d motor driver shield and hc-05 bluetooth module. The first step is to put the arduino in the car. I used the glue and fix the arduino in the chassis of the car. Now I took the L293D motor driver shield and then I put it on the arduino uno. After doing this I connect the motors with the motor driver. This are very simple steps and you can also do it by your own.

Now I connect the servo motor in the motor driver shield. While connecting the servo motor you have to keep your attention in the pin out of the servo. The servo motor has three pin out which are positive, negative and signal pin. You have to connect like this –

(1) Positive pin of servo – Positive pin of motor driver

(2) Negative pin of servo – Negative pin of motor driver

(3) Signal pin of servo – Signal pin of motor driver

After completing the motor connection I have to connect the bluetooth module for the purpose of serial communication. Here I used the hc-05 bluetooth module because it has a simple connection in the circuit. So I connect the pins of bluetooth module like –

(1) RX pin of hc-05 module – TX pin of arduino uno

(2) TX pin of hc-05 module – RX pin of arduino uno

(3) VCC pin of hc-05 module – +5 volt pin of arduino uno

(4) GND pin of hc-05 module – GND pin of arduino uno

Our circuit is almost ready. Now you have to give the power supply to the l293d motor driver. For this purpose I used a 12 volt lipo battery. Now all the circuit connection is completed and we have to move to the coding section.

Arduino Coding –

Arduino coding is the most important section for an arduino based project. In this 3d printed car I divided the code in three parts which are –

(1) Coding for dc motors

(2) Coding for servo motors

(3) Coding for bluetooth module (for wireless communication)

The main intention of dividing the code into parts is simplicity of understanding. So take a look at the coding that I have done for this car –

// 3D PRINTED CAR
#include <AFMotor.h>
#include <Servo.h>
//initial motors pin
AF_DCMotor motor1(1, MOTOR12_1KHZ);
AF_DCMotor motor2(2, MOTOR12_1KHZ);
AF_DCMotor motor3(3, MOTOR34_1KHZ);
AF_DCMotor motor4(4, MOTOR34_1KHZ);
Servo  my_servo;
char command;
void setup()
{       
  Serial.begin(9600);
  my_servo.attach(9);
}
void loop(){
  if(Serial.available() > 0){
    command = Serial.read();
    Stop();
    switch(command){
    case 'F':  
      forward();
      break;
    case 'B':  
       back();
      break;
    case 'L':  
      left();
      break;
    case 'R':
      right();
      break;
    }
  }
}
void forward()
{
  motor1.setSpeed(255);
  motor1.run(FORWARD);
  motor2.setSpeed(255);
  motor2.run(FORWARD);
  motor3.setSpeed(255);
  motor3.run(FORWARD);
  motor4.setSpeed(255);
  motor4.run(FORWARD);
}
void back()
{
  motor1.setSpeed(255);
  motor1.run(BACKWARD);
  motor2.setSpeed(255);
  motor2.run(BACKWARD);
  motor3.setSpeed(255);
  motor3.run(BACKWARD);
  motor4.setSpeed(255);
  motor4.run(BACKWARD);
}
void left()
{
   my_servo.write(0);
}
void right()
{
   my_servo.write(180);
}
void Stop()
{
  motor1.setSpeed(0);
  motor1.run(RELEASE);
  motor2.setSpeed(0);
  motor2.run(RELEASE);
  motor3.setSpeed(0);
  motor3.run(RELEASE);
  motor4.setSpeed(0);
  motor4.run(RELEASE);
  my_servo.write(90);
}

After writing down the code you have to upload it in the arduino. So you have to connect the arduino with your computer by using an usb cable. After this go to the tools and then select the port and arduino type. Finally upload the code in arduino uno.

After doing all this things you have to control the car from your phone by using the bluetooth. So I downloaded the “bluetooth rc” mobile app. I connected the app with my car and then I started to give the commands from my smart phone. The car performs well without any fault.