Introduction: Camera NanoTank
This intructables show how to use Seeed Studio XIAO ESP32S3 and corresponding camera module to build a NanoTank.
Supplies
Seeed Studio XIAO ESP32S3 Sense
751626 Lipo Battery
DRV8833 Motor Drive Board
2 x Mini 3.7V 6mm Coreless motor (47RPM)
2 x 1 inch rubber band
4 x 12 mm flat head M2 Screw
(Optional) 2.4 GHz T shape antenna
Step 1: What Is NanoTank?
The first time I see NanoTank is at @ushineko3n Twitter. The NanoTank main idea is using the motor case as the axis, this allow the tank become much smaller in size. This project reuse the NanoTank design to build this tiny toy.
Ref.:
Step 2: 3D Print
Please download and 3D print the models at Thingiverse:
https://www.thingiverse.com/thing:5994079
Number of prints required:
motor wheel x2
lower wheel x4
motor gear x2
body x1
side x2
Step 3: Software Preparation
Arduino IDE
Download and install Arduino IDE latest 1.x version if not yet:
https://www.arduino.cc/en/software
Arduino-ESP32
Follow installation step to add Arduino-ESP32 support if not yet:
https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html
XIAO ESP32S3
Follow Seeed studio Wiki to familiar XIAO ESP32S3:
https://wiki.seeedstudio.com/xiao_esp32s3_getting_started/
ESP Async Web Server Library
Download latest ESPAsyncWebServer libraries: (press "Clone or Download" -> "Download ZIP")
https://github.com/arjenhiemstra/ESPAsyncWebServer
Import libraries in Arduino IDE. (Arduino IDE "Sketch" Menu -> "Include Library" -> "Add .ZIP Library" -> select downloaded ZIP file)
Arduino ESP32 filesystem uploader
Follow the installation steps to install Arduino ESP32 filesystem uploader if you are not yet do it:
https://github.com/lorol/arduino-esp32fs-plugin
FSBrowserPlus
Download the FSBrowserPlus at Github:
https://github.com/moononournation/FSBrowserPlus
FSBrowserPlus was developed in my previous projects, you can see more details at:
https://www.instructables.com/Strider-Camera-Robot-V6/
https://www.instructables.com/Strider-Camera-Robot-V2/
Step 4: Upload Program
- Open the "FSBrowserPlus.ino" at Arduino IDE
- Modify the WiFi and other settings in "FSBrowserPlus.ino" header
- Select (Uncomment) your camera dev board in "camera_pins.h", this project should select CAMERA_MODEL_XIAO_ESP32S3_ROBOT
- Select Board options according to Seeed studio Wiki
- Press "Upload" button to compile and upload program
- Select "ESP32 Sketch Data Upload" in "Tools" menu
- Select FS Type to "LittleFS" and press "OK" button
Step 5: Soldering Work
Please find the full soldering work video at bilibili:
https://www.bilibili.com/video/BV1x24y1H79h
The GPIO assignment had been revised many times, here are the final connection summary:
XIAO ESP32S3 DRV8833 Drive Board Other Parts
============ =================== ===========
D0 (GPIO1) -> IN1
D1 (GPIO2) -> IN2
D3 (GPIO4) -> IN3
D4 (GPIO5) -> IN4
BAT- -> GND -> Lipo -ve
BAT+ -> Lipo +ve
3V3 -> VCC
OUT1, OUT2 -> Motor 1
OUT3, OUT4 -> Motor 2
Step 6: Assembly
Please see full assembly video at bilibili:
Step 7: Fix Antenna
The antenna is floating in the air, it is better fix it at the middle with a little hot glue:
Step 8: Enjoy!
It's time to show off your NanoTank!
You can see more "making of" video at bilibili:
https://www.bilibili.com/video/BV1Ns4y1h7wp/
https://www.bilibili.com/video/BV1884y1H7TS/
https://www.bilibili.com/video/BV1pb411d7pi/
https://www.bilibili.com/video/BV1Lb411d7xm/
https://www.bilibili.com/video/BV13A411173W/
Step 9: What's Next?
Wish list:
- Power Switch? This NanoTank is too small and not yet have a power switch
- Mission Launcher?
- Speed?
- More Terrain Adaptation?
- Auto Focus?
- Snap Photo? XIAO ESP32S3 Sense have built-in SD card slot
- Sound Streaming? XIAO ESP32S3 Sense actually have built-in digital microphone
- Visual AI?
- Speech Command Recognition?
First Prize in the
Big and Small Contest
38 Comments
4 weeks ago on Step 4
metromada
Question 2 months ago on Step 8
Great project.
What is the size of the screw you used?
And where did you source the rubber band?
Thank you in advance.
Reply 2 months ago
Oh, yes. I forgotten to mention, it use four 12 mm flat head M2 Screw. Normal 1 inches rubber band should be ok.
Question 2 months ago
Great design. Compact and clever! I didn’t fully understand how it is controlled, is there a web app for camera and motion control?
Answer 2 months ago
yes, the ESP32-S3 act as a web server. It host the web app HTML page and camera streaming service.
3 months ago
Thanks for the nice tutorial. However I have some trouble with it. I think I managed to download the repos and "install" what is needed. Even though the LittleFS part doesn't seem to apply for me. Not sure why I would need it but perhaps I miss something.
However, I can't make it work. I configured the SSID etc. and I see the device in my WiFi network. But I'm not sure what to do next. I guess I have to edit the hostname and apName and these things but I'm not sure what to do with it. When trying to connect to the IP address it has in my own WiFi network I get an error but I don't see the Access Point when scanning for it.
Could you be so nice to explain this step a little further? After all it compiles well so I guess I only miss a step with the configuration.
Thanks!
Reply 3 months ago
Have you finished all items in step 4?
Reply 3 months ago
I had another look at the code.
So the hostname is 'xiaonanotank' and in deed when I open the URL
Still, all the pages are blank. I tried it with different browsers (firefox, chrome...)
Reply 3 months ago
I think you have missed item 6-7 in step 4.
Reply 3 months ago
Sorry again for all those questions. I'm pretty new to ESP32 stuff but I love your project!
So yea, I might have missed something. To be honest, I don't have these menu items mentioned. So when I compiled and run it on the device (and saw it was running) I assumed this would be how it might be correct.
- "Select "ESP32 Sketch Data Upload" in "Tools" menu"
I understood this would be the same as "compiling and uploading the "sketch" program to the ESP". Is this wrong?
Where is this menu supposed to be? I have many settings there, the ESP32 board is selected etc. but I don't see a menu "ESP32 Sketch Data Upload"
There is one menu though named:
"Erase all Flash Data before Sketch upload - Disabled"
- Select FS Type to "LittleFS" and press "OK" button
I don't have this menu either. There is a "Partition Scheme" but nothing that matches the description.
By the way I have Version: 2.1.0 of the IDE.
Thanks again for your help!
Reply 3 months ago
I think you have missed “ Arduino ESP32 filesystem uploader” in step 3.
Reply 3 months ago
Thanks again for your help.
The problem is, I can't follow the installation steps. It just looks different. Maybe this is because it is still made for the Arduino IDE 1.8 instead of 2.1? I don't know what I'm doing wrong, I just don't see these menu items.
Reply 3 months ago
then try IDE 1.8 first
Reply 3 months ago
Just wanted to give some feedback.
You were right: the Arduino IDE 1.8 works better and I can upload the files and use the server! I guess the Arduino IDE v2 is somewhat different but I'm to new at this to say what has changed.
I had another issue with the camera but that got solved. Maybe you want to add this to the tutorial. If PSRAM is disabled in the menu/IDE the camera fails with the message "frame buffer malloc failed 0xffffffff". This is easily solved by enabling it in the menu. So in case there are other beginners like me that might help!
In any case, thank you very much for this awesome project!
Reply 2 months ago
Can you provide further instruction on this? (The PSRAM enabling option) I don't quite understand the "menu/IDE" bit.
Reply 2 months ago
Found it! The PSRAM bit is in arduino IDE 1.8 in the tools menu. After this camera is working. Thanks to both of you. I'm excited about finishing this project
Reply 3 months ago
as show in video, if you found camera not work, simply reset the board and wait seconds then refresh the web page will works.
Reply 3 months ago
Thanks. But as I wrote, the issue was actually missing the PSRAM setting. But yea, it works. Thanks a lot!
I finially finished it (not nicely but as a proof of concept it works). The next one will be crafted better. I really admire your skills!
P.S. an on-off-switch would really be great!
Reply 2 months ago
Indeed this is a problem of the Arduino 2.0 version, as its GUI is no longer based on Java and thus does not answer to the tools aditions on menus anymore.
More on this:
https://forum.arduino.cc/t/tool-menu-esp8266-littl...
https://github.com/arduino/arduino-ide/issues/58
The solution, as already signaled, is to use an older version of arduino, which you can find here:
https://www.arduino.cc/en/software/OldSoftwareRele...
5 months ago
Can I have it