Over a decade ago I bought a Tank for my grand daughter that was controlled by i-Pad Ver 2.0 - latest at that time. The Tank App had a cool interface, while the Tank itself was equipped with Mic and IR camera.
As time went by i-Pad versions changed and the App was never updated. Grand daughter also grew older and was not interested. So Tank started collecting dust in the closet.
Recently when I was cleaning the closet I found this tank and decided to give it a new life. This time around I replaced the entire circuit with ESP32-CAM board and used L293 Motor driver for driving the Motor circuits
ESP32 is configured for Web server. Streaming camera feed is handled by Web socket services, which is faster then the traditional streaming. Controls are built using simple HTML / Java script language. Again websock services is used for communication.
Since 4 ports are required for controlling the motor circuitry (Two for Left and right Motors, one for Speed control while fourth one was for optional LED indicators), On board SD Interface is not used. However if you want you can use SD card using SDMMC driver which uses only one port as against SD driver which uses 6 ports.
Schematics is provided below:
The old Tank circuitry was removed and a multi-purpose PCB is used for soldering all the components. Voltage regulator 7805 is placed on a heat sink. ESP32-CAM board replaced the original Camera components. A simple view of the assembly is provided below:
Two versions of codes are provided in Github. Ver 1.01 uses GET to Capture photos while Ver 1.02 uses Websock services. Streaming from camera is handled by Web Sock services.
Link to Github: https://github.com/vdevan/Sentry-Tank
The code has following features:
Captive screen - based on my other projectsOTA - for remote loadingTelnet for debuggingWebsock services.
Initially when turned on, the server will automatically provide Captive page. Use your WiFi settings to connect to Tank. Details as follows:
SSID: STWS241106SSID Password: pass1234
Once connected use your browser to point to: http://sentrytank-ws or http://172.15.6.1
You will be prompted with following screen. Here you can select your WiFi and save with password.
You can save upto 5 different Network and Password. The program will check available network with the saved network and will automatically connect. Once connected you will be prompted with Tank Control Page, as shown below:
Arduino IDE is used for compiling the code. Download the entire code from github and save it in a folder STCamera. Open STcamera.ino for editing / compiling. Note the Espressif board used is ESP32-S AI THINKER. However for compiling board selected is: ESP32 Wrover kit (all versions). This is because, OTA will not work on ESP32-Cam board.
Espressif Board version 2.0.17 is used for compiling. Originally had problems with 3.0.0 and since then never upgraded. You may try with newer updated version. When updating the code through OTA, OTA password is same as Network password: pass1234
Videos of the Tank in motion are provided below:
Comments