{"id":2772,"date":"2023-04-10T04:42:07","date_gmt":"2023-04-10T04:42:07","guid":{"rendered":"https:\/\/embedwiz.com\/?p=2772"},"modified":"2023-04-10T10:08:43","modified_gmt":"2023-04-10T10:08:43","slug":"arduino-tank","status":"publish","type":"post","link":"https:\/\/embedwiz.com\/arduino-tank\/","title":{"rendered":"Arduino Tank: Advanced Arduino Robot with a Functional Gun"},"content":{"rendered":"\n
Tanks are large, armored vehicles used by the military, but you can build a tiny Arduino tank<\/strong> version as a toy gift or school project.<\/p>\n\n\n\n Building this tank is similar to making a robot, but you should equip the vehicle with chain wheels instead of two wheels to resemble the military tank. <\/p>\n\n\n\n Also, it should have a functional gun that rotates at the top and fires plastic balls, plus a radio controller to give you remote control.<\/p>\n\n\n\n So if you\u2019re familiar with Arduino robots<\/a>, this project should be a walk in the park. Let\u2019s look at how to build this tank using an Arduino board.<\/p>\n\n\n The project requires the following components.<\/p>\n\n\n\n The Arduino Nano board is the brains of the tank, and we\u2019ll connect it to almost all components. <\/p>\n\n\n\n But since the project will consume lots of power, we\u2019ll have to use a customized power bank with four batteries and five outputs to power the system.<\/p>\n\n\n These power bank outputs consist of the following pins.<\/p>\n\n\n\n You can build any custom power bank with more or fewer batteries, but it should have these five pins for this project.<\/p>\n\n\n Next, we\u2019ll hook up the communication module to enable the remote control function on the tank. Here\u2019s how to do it.<\/p>\n\n\n\n The power supply\u2019s pins one and two should connect to the tank\u2019s body switch.<\/p>\n\n\n\n Also, connect the power bank\u2019s GND pin to the radio control module\u2019s ground pin. Here\u2019s what you should have after making the connections above.<\/p>\n\n\n\n The radio-module connection circuit diagram<\/em><\/p>\n\n\n After that, we\u2019ll hook the DC motors to the Arduino board using the L298N motor driver. <\/p>\n\n\n\n All components use the power bank\u2019s +11V cra6 connection (pin4) as their power supply (except the battery monitoring module).<\/p>\n\n\n\n DC motor connections circuit diagram<\/em><\/p>\n\n\n The tank\u2019s gun sits on the rotating tower, which has a swivel bracket to turn the firing chamber left\/right and raise\/lower it. <\/p>\n\n\n\n These operations require two servo motors, which we\u2019ll power using the L7805CV motor driver, as shown below.<\/p>\n\n\n\n The tank has three LED lights: two headlights and one on the gun. We\u2019ll need the Darlington ULN2803 assembly to power these components.<\/p>\n\n\n\n Each headlight will have a separate resistor (470\u03a9), and the two will jointly connect to the ULN2803\u2019s pins 11 and 12.<\/p>\n\n\n\n On the other hand, the gun\u2019s light will connect to the ULN2803\u2019s pins 15 & 16. But all three will draw power from the battery directly.<\/p>\n\n\n\n Light assembly circuit diagram<\/em><\/p>\n\n\n Lastly, we will set up the battery monitoring system using the INA219 module, the only component that connects to the power bank\u2019s 10-16.8V +ve control pin.<\/p>\n\n\n\nTable of Contents<\/h2>\n
\n
What You Need<\/h2>\n\n\n
\n
Tank Hardware Connections<\/h2>\n\n\n
Power Bank Outputs<\/h3>\n\n\n
Pin Number<\/strong><\/td> Function<\/strong><\/td><\/tr> 1<\/td> Negative pin<\/td><\/tr> 2<\/td> On\/Off<\/td><\/tr> 3<\/td> GND<\/td><\/tr> 4<\/td> Positive (1.25-16V)<\/td><\/tr> 5<\/td> Positive control pin (10-16.8V)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n Radio Module Connection<\/h3>\n\n\n
Power Bank<\/strong><\/td> Arduino Nano<\/strong><\/td><\/tr> 1<\/td> N\/A<\/td><\/tr> 2<\/td> N\/A<\/td><\/tr> 3<\/td> GND<\/td><\/tr> 4<\/td> Vin<\/td><\/tr> 5<\/td> N\/A<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n Arduino Nano<\/strong><\/td> APC220 Module<\/strong><\/td><\/tr> D1\/Tx<\/td> RxD<\/td><\/tr> D0\/Rx<\/td> TxD<\/td><\/tr> GND<\/td> GND<\/td><\/tr> 5V<\/td> Vcc<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n <\/figure>\n\n\n\n
DC Motor Connections<\/h3>\n\n\n
Arduino Nano<\/strong><\/td> L298N<\/strong><\/td><\/tr> Vin (connects to the battery\u2019s +11V)<\/td> +12V<\/td><\/tr> GND (connects to the battery\u2019s GND)<\/td> GND<\/td><\/tr> D3<\/td> ENA<\/td><\/tr> A3<\/td> IN1<\/td><\/tr> A2<\/td> IN2<\/td><\/tr> A1<\/td> IN3<\/td><\/tr> A0<\/td> IN4<\/td><\/tr> D5<\/td> ENB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n L298N<\/strong><\/td> Motors<\/strong><\/td><\/tr> Right motor<\/td> OUT1 & OUT2<\/td><\/tr> Left motor<\/td> OUT3 & OUT4<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n <\/figure>\n\n\n\n
Servo Motor Connections<\/h3>\n\n\n
Arduino Nano<\/strong><\/td> L7805CV<\/strong><\/td><\/tr> Vin (connects to the battery\u2019s +11V)<\/td> IN<\/td><\/tr> GND (connects to the battery\u2019s GND)<\/td> GND<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n Arduino Nano<\/strong><\/td> Servo Motors<\/strong><\/td><\/tr> D10<\/td> Servo incline signal pin<\/td><\/tr> D9<\/td> Servo turn signal pin<\/td><\/tr> GND<\/td> GND pins on both motors<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n L7805CV<\/strong><\/td> Servo Motors<\/strong><\/td><\/tr> OUT<\/td> Power pins on both motors<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n <\/figure><\/div>\n\n
Lights Assembly<\/h3>\n\n\n
Arduino Nano<\/strong><\/td> ULN2803<\/strong><\/td><\/tr> GND (connects to the battery\u2019s GND)<\/td> Pin 9<\/td><\/tr> D12<\/td> Pins 1 & 2<\/td><\/tr> D11<\/td> Pins 3 & 4<\/td><\/tr> D4<\/td> Pins 5 & 6<\/td><\/tr> D2<\/td> Pins 7 & 8<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n <\/figure>\n\n\n\n
Battery Monitoring Module<\/h3>\n\n\n