For a few weeks now, I have wanted to find an interesting project where I could pair up my 3D printing skills with the Arduino. I also wanted to try something new and decided to combine it by writing an iOS companion app. This led me to deciding to build a electric car that could be controlled via the phone’s bluetooth.
The 3D Model
I wanted my car to look realistic so I did some research and came up with a design that was both practical and interesting. The 3D model would have two main parts: a base and the body. The base had to be large enough to house the motors, Arduino and the sensors. It would also need to have four grooves that would be used by the wheels. The design of the body was pretty straightforward as you can see below. I used some of the design elements from the real car I drive, a Honda Civic.
Both the base of the car and the body were designed using Fusion 360. Fusion 360 is a great program because it’s free and works well for creating basic shapes. I used photos of a car and using the line tools, created a sketch on top of the image. This sketch was the basic shape of the car and was then extruded out to create a basic car shape. Two holes were cut out (using premade cylinders) for the wheels and then details were added (with the premade shapes and shapes created in sketch mode) and altered in the sculpt mode. I had to cut my model in half because my print bed (a Lulzbot Mini) was too small for the size that I wanted to print at. Honestly, I wish I had a better way of dividing my model because the seam in the base became a issue when connecting the two halves. I had designed the model so the base would be able to fit snuggly underneath the body, but the tension was too great and caused a crack on one side of the model. With hindsight, I should have made the body a bit bigger to better accommodate the internals. Overall, it took about 14 hours to print the base and body of the car at a 0.25 layer height.
Putting It Together
While the internals of the car are not exposed, I wanted it to look clean. I’ve always been fascinated by the clean internals of Apple devices. I placed the Arduino microcontroller in the center of the base and surrounded it with the four DC motors. The motors had motor shafts on them which were then connected to the wheels. Lastly, the bluetooth module was mounted to the Arduino. The black tape below was needed for me to keep my two halves connected since I printed my design in two halves due to my printer bed size. As Adam Savage has taught me over the years, nothing duct tape can’t fix!
One of the tricky parts was making sure that the motors were connected properly to the motor shield. I had to orient the four wires as below:
Next was the bluetooth module to pair the robot with a phone. I chose the HC-08 for this project. The module had 6 pins, but I only needed to use the RXD, TXT, GND, and VOC pins. These pins connect into the Arduino in the respective pins (RXD → RX (0), TXT → TX (1), GNG → GND, VOC → 5V).
Next I attached the wheels and spent some time painting it using the colors of my favorite Marvel character, Iron Man. Finally, my car was ready!
In the second part of this post, I’ll detail the software components of the car. In particular, the iOS app that sends commands to the car and the Arduino software that interprets these commands and moves the car. Stay tuned!