"Tiny MicroPython robots (the PCB IS the robot platform)"
viewtopic.php?f=5&t=11454
For one the motor+controller base is very small (16.0×15.8mm from top). If I ever will get ESP8266 model ESP-01F soldered (1.1mm spacing!) , that would be my favorite (10×11×2mm), although it has a tiny external antenna. I bought two ESP32-C3 models (01M and M1) because of small size. I used Dremel to reduce Tiny2040 MCU (contains Raspberry RP2040) down from 22.9×18.2mm to 19.5×14.9mm Tinier2040:
Today I did the same with ESP32-C3-01M, dremeled down from 18×18mm to 18×15.8mm (0.25mm on antenna side, the remainder on contact side):
All started last night by soldering 3.3/RX/TX and GND/I09/EN pins. I only need the TX/RX pins once for flashing MicroPython onto the module, start a MicroPython session and do "import webrepl_setup" to enable Webrepl. Form that time on I use I06/I09/I20(RX)/I21(TX) to control two micro motors via DRV8833 motor controller [that DRV8833 module is dremeled as well ]:
I tested that all 4 pins can do PWM before using Dremel, and tested after done that they are still working:
Last night I flashed MicroPython onto the module, after having learned that ESP32-C3 works different to ESP8266 and to ESP8285. Powering with I09 low brings module into flash mode. And it keeps in flash mode until reset with I09 not low (it is pulled up):
Code: Select all
esptool.py -p /dev/serial0 flash_id
esptool.py -p /dev/serial0 erase_flash
esptool.py --chip esp32-c3 --port /dev/serial0 --baud 460800 write_flash -z 0x0000 esp32c3-20211214-unstable-v1.17-231-g0892ebe09.bin
To my surprise, after "import webrepl_setup" and final reset of module, webrepl did not work. Reason was that for some reason networking did not get started. I started (in minicom session) by hand:
Code: Select all
import network
ap=network.WLAN(network.AP_IF)
ap.active(True)
Code: Select all
pi@raspberryPi400:~ $ cat boot.py
# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
import webrepl
import network
ap=network.WLAN(network.AP_IF)
ap.active(True)
webrepl.start()
pi@raspberryPi400:~ $
I used my oscilloscope to verify that PWM works for the female headers soldered to the 4 ESP32 pins. This is webrepl session verifying that IO6 PWM does work (25% duty):
Code: Select all
Welcome to MicroPython!
Password:
WebREPL connected
>>>
>>>
>>> from machine import PWM,Pin
>>> Pin(6,Pin.OUT).value(1)
>>> Pin(6,Pin.OUT).value(0)
>>> p6=PWM(Pin(6))
>>> p6.duty(256)
>>>