![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihwBqwBNFndjzO3rx8y6a4tT98UzPp8Se4kiD8rADnlfKJ3dXEWv0ho0uV1_G6x75cUfg_lMEDCf6nvRQKh_fLI1oi3x3ODWkhygz42HTFmx9aMertZ7tSxP6SFYdOi3JWPDxoaldrd9s/s1600/WP_000606.jpg)
I bought a new microcontroller: The Digix. It's 100% arduino due compatible with built in wifi, up to 99 input/output pins and a lot more features. My arduino uno didn't have enough output pins for this project but the digix is perfect.
GUI and Controls
I programmed the digix using the arduino IDE and used the g4p library to construct a basic GUI. There are a lot of functions on the GUI where the tank itself is not equipped with the hardware(ex. laser, bb gun). The GUI was originally designed to control a tank with bb gun. I can also use my keyboard to control the tank.
Wifi Control
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZm31xJrdbso_aJOiw0xniBOGkX1jps4XKiZ44oZEHxH0YrfZRdb5KXyr23wd4RODPdKyw0kjiIsDv1wCYpwa6dJumNFcslBp5gTNfMGsZ_3AxJ8XhAEAV-nxyIPWS6heegEQKxF68BAw/s1600/WP_000609.jpg)
The digix was setup as a server and my computer as a client. I used a wireless USB adapter to communicate with the digix.
Wifi Camera
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyPL1sJXPgOMDtd-jogYNDOTv4JdCx-uuYFBNmIV_OIOvGXDresxang6Dc3LEmmv2FYzkK7FGiQRRz6_JTc2uayLkNBvcb8H_uIyTmH2c-UlQBrealppYrn8GLgGRdbEqkradOMKUR_2U/s1600/WP_000630.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN5ojoT3XeLYsRPGBY2e9K70yWWjVoFI0W0R65z7Z-by6Hq-UiL6z2dRVY0tTgB5DuNlbsI0xLUWeiMUPaWT2ucrBSl3rZWCK78kILXbR84cCoRue5sGCp2sW7X4slFmxW-T7jDuC0qXU/s1600/WP_000610.jpg)
In order to establish communication with my router and the webcam, I must press and hold the WPS button on the camera for about 5 seconds. Next, I had to press another WPS button on my Dlink router. This setup takes about a minute. Once communication is established, I can view the camera by entering the webcam's IP address in my web browser or through dlink's website. The camera can be viewed ANYWHERE from their website(of course, you must have access to my account).
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2uai5_W_o-Wa-UKlDzMVx4MRT5U8JwAlzwhYUift-FlXLo3UqhvyQH5dOTcpvuBQEFYoduR3RtWs_n8tkblbrv2vPyxoizeNlKjRTt0_rvG3w0uJZUjwef_z3FJRL78LOrOCMpTAJ_ew/s1600/WP_000625.jpg)
Ultrasonic Sensor
Objects in the camera are a lot closer than they seem. I added an ultrasonic sensor at the front of the tank to help me with navigation. To reduce power consumption, the ultrasonic sensor won't be constantly be polled, like in my previous projects. They will be activated when I send the correct command.
I'll be using 2 lithium ion batteries to power the tank: 11.1v with 4400 mah will power all the motors/camera and a 7.4v 5200 mah to power the micro controller. Due to a fairly low power consumption, the batteries can power the tank for a few days. I will admit that these batteries are overkill but they will be necessary for future upgrades. I plan on adding my airsoft gun on the tank and the electric airsoft gun is hungry for power.
Tamiya Tank Chasis and Mechanical Structure
The setup for the tamiya tank was custom built by me. I ordered 2 sets of tamiya track/wheels and 2 universal plates. I merged the plates together by screwing in an aluminum plate. The tank itself has 2 levels. The lower level will hold the two batteries and a gearbox to move the tank. The second level will hold all the electronics and the turret.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUD4NJufHLakv0Qvox8Oq9y_NPuX8kprzQW2CPwnd06QgYbW6LrHTJKNBjKCMjezui0V_HzNbuDLjVgl_QRSbMW1sB4TPAf7Bagh0PSQmWt5Qcp80sjanIIhaMo7DUN1umOFxKkJNSCq4/s1600/WP_000624.jpg)
Motor Drivers
I'll be using the SN754410 H bridge, the same motor drivers I've used in my previous projects. I wanted to install a heat sink on the ICs but it wont fit on the breadboard. The only option for this is to use a protoboard and solder the IC's together. Instead of soldering the ICs to the board, I soldered the IC sockets.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfkmgBxa78IC0HR4uEuWUiUYtia47OmaU6wlX_4Y85OTvD4QCaWwsuXkXzYm7eo6lmdCd3cyiy04JXIT1KDdDU6BSvIWOUS4ClwIvfpj9Q31jKaYFrzPvYLo1-JTAXyymoxZgdWz3BJQo/s1600/WP_000615.jpg)
Tank Motors
The tamiya double gearbox contains 2 motors where each can be controlled independently. The gearbox can be set in 4 different gear modes, where each will provide a different speed and torque. I chose "option c (gear ratio 114.7:1)" where the rpm is 115 and the torque is 809 g/cm.
**turret tilting and panning motors**
I salvaged old gearboxes from my robot, robosapein. These gearboxes will be used as a tilting mechanism have a very decent torque which can move my camera without any issues. I'll be using a stepper motor for panning motion.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjV8zkLz1RxQM4vQprMVyaFNdJmjzvVKxSnQrOf8neI6A2dSQRmssM6qvKHgMGj9D2ORvdQ-RAXQ_0Ebh2ni0tPUbYEN4ixgH_MbVRU5YqJO1wZ0kNqt8DAROdteoJQNdMJEy4BfBsPBA/s1600/WP_000621.jpg)
Communication Range
There will always be latency issues with wifi. Whenever the tank is nearby other electronic devices that causes a significant amount of electrical interference(such as a fridge), It is possible that I will lose communication with the tank. Also, the communication range will be reduced if there are walls in between my router and the tank. I was about to control my tank where is was located in the basement from my computer on the second floor. I was able to navigate for awhile but then lost control of the tank. However, the wifi webcam was still sending back the live feed.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgiA5-tV5PHkCWPe8TIdgaBQ5ZGTG40HwV6bYUHErGEIPcC8UA-1gSjIQ7EGBK5YrIH-d8HO-sd39dXVi1o4S_NZ9Zx9_B4d6mlXAkEh6506fkdNB0LlkywAC_x3tGCkihSQXikOnF3-8/s1600/WP_000577.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIKzclhZzuWpSxuR50chc3Fs6SeYcrTg2_mTursxYBSveXlcDG2WfSJNofuiUkwK1jpoOmLqSmgiketiAbP1hn7T-G_M-VYKyYny48hJRtrr38-AbMq8cne5axfL2X31BDPrTcSwL4M0Q/s1600/WP_000593.jpg)
Also, I'll be building an auto reloading mechanism for the airsoft gun at some point. I will need to construct a small container to hold the bb pellets. In the photo below, The container holds 2000 pellets and I don't want to use that container due to it's high profile. To minimize the size of the container, I must construct a cube. As of right now, I'm not sure if I want the container to hold 2000 pellets. The airsoft gun came with a Manuel reloading clip and I'll attach a motor to it at some point. This is probably going to be the most difficult mechanical challenges for this project.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0-xdPdXVLs5q4pp1zWLRhyphenhyphenEKK74mcSV1xjdp0PvYzsFpXuzNcM-vnV1lbbSGwJFJnExTL3A89Ru8IvYX2OvT6YaL_NeYwpOB1soTAbUDRj3CiweASyxBZ2aRbH5di4fvHxEtrrZdDhOU/s1600/WP_000627.jpg)
Another thing I might consider making is a close range EMF detector. I built 1 of these in my previous projects and hopefully it will be sufficient enough for this application.