Tiny MicroPython robots (the PCB IS the robot platform)

Showroom for MicroPython related hardware projects.
Target audience: Users wanting to show off their project!
Post Reply
HermannSW
Posts: 197
Joined: Wed Nov 01, 2017 7:46 am
Contact:

Tiny MicroPython robots (the PCB IS the robot platform)

Post by HermannSW » Thu Nov 18, 2021 12:55 pm

Recently I started to work on Raspberry Pico and Pimoroni Tiny2040 based tiniy robots.
Last night I completed my Tiny2040bot (15.6g in total, 37×29×31mm (l×w×h) small), and my Picobot:
https://forums.raspberrypi.com/viewtopi ... 5#p1940066
20211118_010948.15%.jpg
20211118_010948.15%.jpg
20211118_010948.15%.jpg (55.46 KiB) Viewed 62955 times

Both robots can be controlled via Wifi, with WifiToSerial.ino example running on soldered ESP-01 (512MB module is sufficient for that).
This provides wireless MicroPython REPL using https://github.com/webrepl/webrepl locally.
In boot.py I have defined several high level commands I can execute, like "lft(100)" driving left wheel backwards, right wheel forwards, between rampup and ramdown for 100ms. Executing these commands that end with robot stand still avoid problems with Wifi connection loss and robot going wild. Last night I recorded youtube video of Tiny2040bot, here the last 3 seconds of 19 second video (youtube video has the impressive robot sound as well):
https://www.youtube.com/watch?v=ZarE88JjDzo
Image


I do use the (wireless) MicroPython REPL not only for controlling the robots, but also for verification of soldering while building them. MicroPython is extremely handy for that.

Last Sunday I solved the telnet problem for telneting into MicroPython REPL, now cursor keys work as well after entering telnet client character mode:
viewtopic.php?t=10109#p62528


P.S:
Picobot is more stable, because the distance between front point of contact (6mm diameter airsoft pistol pellet superglued below Pico) to wheels is bigger (DRV8833 motor controler soldered below Pico):
https://www.youtube.com/watch?v=V3Wj4TJgsYA
Image

And the micro motors are strong -- Picobot can even pull USB cable ;-)
https://forums.raspberrypi.com/viewtopi ... 5#p1939416
Image


P.P.S:
New design Picobot is complete, with wireless telnet into Pico MicroPython REPL through ESP-01:
https://forums.raspberrypi.com/viewtopi ... 9#p1940729
Image


Work on solar toy car MicroPython robot has started, 2nd motor with gear train has been extracted from 2nd car with Dremel already:
Image
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w

Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454

webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell

HermannSW
Posts: 197
Joined: Wed Nov 01, 2017 7:46 am
Contact:

Re: Tiny MicroPython robots (the PCB IS the robot platform)

Post by HermannSW » Sun Nov 28, 2021 8:11 am

Toycarbot is completed (right).
I learned to solder with 0.2mm diameter enameled copper wire — will use that always from now on for tiny robots:
https://forums.raspberrypi.com/viewtopi ... 0#p1941696
Image

It is controlled by ESP-01 only, which is accessed via WebREPL.
I can control motor driver below the lipo fully after I hexediting stock MicroPython image for enabling PWM on all 4 IO pins:
viewtopic.php?f=16&t=11466
Image

The gear trains reduce speed by 19:8, but driving is much better now — no need for ramp up or down for this robot.
Animation from video shows single motors (turn left/right) powered with only 350 PWM (max is 1023):
Image


I started on Pico4MLbot, where the board has a 324×324 GREY8 camera on one side and a display on the other side:
https://forums.raspberrypi.com/viewtopi ... 0#p1942585
Image

I learned how easy it is to decode 96x96 subframe of a demo application (it shows part of me):
Image

Intentionally there are no gear trains because that robot should do really fast line following:
Image

For very low center of mass I superglued 4.0×20×25mm (h×w×l) 150mAh lipo below PCB (size is not of the essence for this robot).
Image
This robot will most likely not be driven by MicroPython, because all Arducam camera+display sample code is C only.


I used Dremel to reduce 22.9×18.2mm Tiny2040 MCU to still functional 19.5×14.9mm Tinier2040:
Tinier2040.size.png
Tinier2040.size.png
Tinier2040.size.png (70.04 KiB) Viewed 62764 times
I received 4.5×10.5×15.9mm 25mAh lipo (0.95g) and verified that it can power Tiny2040 as well as drive solar toy car:
https://forums.raspberrypi.com/viewtopi ... 3#p1943899
Plan is to build smallest Pic02040 based robot with dimensions 20.0×14.9×18.9mm:
https://forums.raspberrypi.com/viewtopi ... 0#p1944140
Image

That will beat @roboticbits' 28×18×17mm Tiny2040 "Dot" robot in length, width and three norms:

Code: Select all

         norm  min  max Eucl
Tiny2040_Dot  17.0 28.0 37.4
Tinier2040bot 14.9 20.0 31.3
Image


P.S:
I now have these super tiny 10×11×2mm ESP-01F modules (ESP8285 is compatible with ESP8266):
https://forums.raspberrypi.com/viewtopi ... 3#p1944153
Image

I found a nice place for the 12mm long needed external antenna to fit just above the right motor (bended), next to ESP-01F module (circle around E):
Image

Got crash course from my older son in Freecad yesterday, the helix part of tiny antenna is already modeled:
Image
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w

Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454

webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell

User avatar
Werner_G
Posts: 17
Joined: Fri Sep 13, 2019 8:15 am
Location: Dortmund / Germany

Re: Tiny MicroPython robots (the PCB IS the robot platform)

Post by Werner_G » Mon Nov 29, 2021 8:34 am

Hi HerrmannSW, I really like your thread. Nice idea! Please keep up the good work!

HermannSW
Posts: 197
Joined: Wed Nov 01, 2017 7:46 am
Contact:

Re: Tiny MicroPython robots (the PCB IS the robot platform)

Post by HermannSW » Tue Dec 07, 2021 12:01 am

Pico4MLcbot is complete now, with ESP8285 board ESP-1 for wireless Pico4ML MicroPython REPL:
https://forums.raspberrypi.com/viewtopi ... 0#p1947310
20211205_211412.part.20%.jpg
20211205_211412.part.20%.jpg
20211205_211412.part.20%.jpg (31.34 KiB) Viewed 62603 times

Only when driving backwards, the borders between 50x50cm hardboards make robot completely loose driving direction:
Image


I learned that ampy was able to not only transfer files over USB and UART, but over Telnet as well. But it did send username and password always; so I had to fork and remove that, and now my forked ampy allows for wireless put/get/ls into Pico4ML:
https://github.com/Hermann-SW/ampy

Code: Select all

pi@raspberryPi400:~ $ ampy -p 192.168.178.103 ls
/boot.py
pi@raspberryPi400:~ $ echo -e "foo\nbar" > test.dat
pi@raspberryPi400:~ $ ampy -p 192.168.178.103 put test.dat 
pi@raspberryPi400:~ $ ampy -p 192.168.178.103 ls
/boot.py
/test.dat
pi@raspberryPi400:~ $ ampy -p 192.168.178.103 get test.dat
foo
bar
pi@raspberryPi400:~ $ pi@raspberryPi400:~ $ 

Regarding the smallest RP2040 bot, I did buy several small lipos, and the 401215 60mAh took the cake -- it is only 14.6×10.85×3.95mm:
https://forums.raspberrypi.com/viewtopi ... 8#p1946998

With that dimensions the lipo is superglued directly onto the motors, between the wheels — plan is now for 19.7×14.8×18.9mm w×l×h RP2040 robot (right: dremeled Tinier2040 sits on top of dremeled as well motor contoller):
Image
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w

Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454

webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell

HermannSW
Posts: 197
Joined: Wed Nov 01, 2017 7:46 am
Contact:

Re: Tiny MicroPython robots (the PCB IS the robot platform)

Post by HermannSW » Sat Dec 11, 2021 7:12 am

Tinier2040bot is soldered now, and first MicroPython testing of motors was successful:
https://forums.raspberrypi.com/viewtopi ... 5#p1949133
Image

I did build even smaller robot motor+controller base, with my 1st 3D printed robot connection part (16×15.5×10.2mm w×l×h):
https://forum.arduino.cc/t/dremeling-mo ... s/930855/7
sketch_pad.c16.50%.jpg
sketch_pad.c16.50%.jpg
sketch_pad.c16.50%.jpg (34.63 KiB) Viewed 62515 times
Only MCU fitting the 16×15.5mm limits I have is 1.1mm spaced ESP8285 10×11×2mm ESP-01F with tiny external antenna:
Image

No space on sides of motors, and only roughly 1mm below on non-wheel sides
(you can see 1mm ticks on ruler below):
https://forums.raspberrypi.com/viewtopi ... 2#p1949142
Image

I will have to learn how to replace 1mm diameter half cylinder below the part fitting 6mm diameter motor with 1mm diameter half sqhere in Freecad ...
Image


P.S:
Learned it, and reasons why I will be doing it differently:
https://forums.raspberrypi.com/viewtopi ... 8#p1949358
Image
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w

Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454

webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell

MaxMin
Posts: 6
Joined: Mon Aug 22, 2022 4:41 am

Re: Tiny MicroPython robots (the PCB IS the robot platform)

Post by MaxMin » Mon Aug 22, 2022 5:13 am

In case you have left over solar cars. You can make them a bit more interesting for the kids by adding preset steering, so it can do other than a boring straight line.

How to modify for preset-able fixed steering angle.
https://drive.google.com/file/d/1H-iKxT ... sp=sharing

The ESP32-C3-01M-KIT has been a problem for me:

While I can flash micropython and run scripts from Thippy, and can program from Arduino 2, either through USB ch340 or the internal USB IO18, 19...

I can't get it to work with Circuitpython using any of the similar ESP32-C3 board binaries.
When flashed with circuitpython, the RGB led dimly glows white. Thonny reports the device is busy.

To deal with the reported problem with Arduino serial monitor causing chip to be disabled.
Changing these 2 links in Boards.txt from false to true, fixes it.

Code: Select all

esp32c3.serial.disableDTR=true
esp32c3.serial.disableRTS=true

Post Reply