Virtual Reality R/C Car: Part 5

There are a couple of parts of this project that I am currently trying to tie together but am not quite there yet on each of them. The three things that I have been working on are running the Atmega328P micro-controller without the jump board, changing the R/C Car being used, and integrating the head tracker with the rest of the project.

Changing out the R/C cars has actually been in the making for some time now. The 3D printed truggy had been in the shop when I got here but was not functional. The first issue that I had while working on this car was the differential gears that were make out of PLA the mesh was tough to get right and I had some problems with parts breaking. To fix this I decided to order metal parts for the drive train. I got this idea from a great thing on thingiverse here is the link:


I printed the extra parts, mainly the pinion and spur gears, out of Hatchbox PLA. Soon after the car got a new set of electronics. The motor and ESC that I am currently using are the Traxxas Titan 12T DC motor and the Traxxas XL-5 electronic speed controller. This set up worked temporarily but the spur and pinion gear failed quickly here is a video of the test below.


video

Since they failed so quickly I decided to try ABS instead. Here is a picture of the new spur and pinion set up.


And here is a picture of the new center differential. These gears should be able to hold up much longer than their PLA counterparts. However some part of the drive-train seems to be sticking. I still need to investigate this issue further. 

The next part of this project that I want to talk about is running the Atmega328P chip without the Arduino board. This is what will allow for a printed circuit board to be made for the receiver and transmitter in the future along. This should make the entire design more sleek and durable long term. To do this I started out following the tutorial for using the Atmega328P chip standalone found on Arduinos website. Here is a link:


This is basically a way to run the micro-controller on a breadboard by itself while using the arduino only as a power source and FTDI programmer. The tutorial also explains how to burn the bootloader using the ArduinoISP to burn the firmware. This process allows the chip to understand the code that you write in the Arduino IDE on your computer and upload to it.  However, this tutorial did not work for me. I was double and triple checking my wires but nothing seemed to work. In the tutorial it says to select either the Nano or Duemilanova board and then select the Atmega328P option. While doing this the IDE would try to upload the code but eventually time out while trying to connect to the chip. The way that I fixed this was by selecting the Uno/Genuino as the board and then uploading as usual. I am not sure if the tutorial is just wrong or if the board selection that they recommend would work if you also flashed the bootloader using the ArduinoISP. Here is a picture of the working set up.


In this picture I was just testing to make sure I could upload code to the chip and turn on an LED. This will eventually just be the power LED on the board. The connections to the board are Tx and Rx for programming and 5V and GND to power the chip. 

After I figured this out the next move was to prototype the entire system on a breadboard and have it run totally independently. While doing this I also want to integrate the head tracker and pan/tilt/roll camera mount. I have most of the receiver and transmitter wired on a breadboard here are pictures of the two. 

Receiver Circuit

 Transmitter Circuit

I still need to rework the code before testing these two circuit. The main three changes that need to be made are adding one part of the IMU code to the transmitter, the other part to the receiver, and redo all the pin numbers in the code. The reason i have to redo all the pin numbers is because the pins on the standalone chip do not exactly match up with the software. The way that I tell which pin is which is this diagram:



This diagram is really a lifesaver when it comes to working with the UNO it lets you easily see the multiple uses of each pin.



1 comment:

  1. The RENN tech has been nothing but great to me! One of the best customer services ever! You want your car done beautiful and done the right way go to the custom shop! Every time i go there to get my car fixed they really take care of me and they are very nice… RENNtech

    ReplyDelete