User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Mon Nov 15, 2021 7:49 am

Twitter discussion with @roboticbits last night:
Tiny2040.robot.twitter_discussion.jpg
Tiny2040.robot.twitter_discussion.jpg
Tiny2040.robot.twitter_discussion.jpg (137.91 KiB) Viewed 1469 times
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Mon Nov 15, 2021 11:51 pm

Tiny2040bot work got interrupted by newly arrived 53200rpm 3V motors.
The wheels I have from solar toy cars were easy to superglue onto motor shaft.
Test with constant voltage power supply showed the wheels nearly perfect turning (0.V..3V in 0.1V steps).

I found a nice place for DRV8833 below Pico, so that all but one control pins are just soldered through (same position on both PCBs).
20211116_003650.15%.jpg
20211116_003650.15%.jpg
20211116_003650.15%.jpg (63.87 KiB) Viewed 1425 times

Robot with lipo does weigh 15.15g, but without tiny lipo female connector sofar — this robot should move much more stable than Tiny2040bot.
Picobot.15%.jpg
Picobot.15%.jpg
Picobot.15%.jpg (9.38 KiB) Viewed 1425 times

Will continue work on both robots in the evening, better stop after midnight before doing something wrong ...
(both motors were tested to move in both directions, before superglued into place)
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Tue Nov 16, 2021 9:41 pm

HermannSW wrote:
Mon Nov 15, 2021 11:51 pm
(both motors were tested to move in both directions, before superglued into place)
I tested last night in Micropython by setting pwm explicitly on GP11/GP12 and GP14/GP15 (STBY is GP13).
Today I wanted to use my boot.py code from Tiny2040bot, and had to change only pin numberings:

Code: Select all

$ diff boot.py.tiny2040bot boot.py
18c18
< p3=Pin(3,Pin.OUT)
---
> Pin(13,Pin.OUT).value(1)
20,22c20
< p3.value(1)
< 
< rb=PWM(Pin(2))
---
> rb=PWM(Pin(14))
26c24
< rf=PWM(Pin(6))
---
> rf=PWM(Pin(15))
30c28
< lf=PWM(Pin(4))
---
> lf=PWM(Pin(12))
34c32
< lb=PWM(Pin(5))
---
> lb=PWM(Pin(11))
$

Before solding lipo connector to GND+VSYS for autonomous runs, I answered the question "Can Picobot pull USB cable?" -- and the answer is yes. For audio the youtube video:
https://www.youtube.com/watch?v=V3Wj4TJgsYA
Image



That little Picobot (56×23x13mm l×w×h as of now) is so powerful, I did drive it with these settings:

Code: Select all

>>> parms()                                                                     
3000 5000 100 20                                                                
>>> fwd(500)                                                                    
>>> 

The 3V 53200rpm motor is powered with only 5000/65536*4.2V=0.32V(!) after rampup ... that is only 10% of maximal nominal motor voltage !
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Wed Nov 17, 2021 8:40 am

I measured Picobot wheel diameter as 8mm, and that makes sense knowing that micro motor diameter is 6mm:
Picobot.wheel.jpg
Picobot.wheel.jpg
Picobot.wheel.jpg (31.89 KiB) Viewed 1335 times

So theoretically possible speed of Picobot powered with nominal 53200rpm 3V motor would be 22.3m/s (80km/h), and I have already achieved 65% of theoretical speed with my 1kg caterpillar robot, see below:

Code: Select all

$ echo "pi=4*a(1); 0.008*pi*53200/60" | bc -ql
22.28436388946360003133
$
Length to width ratio of Picobot is 56/23=2.43, roughly that of a compact car with average length of 4.24m:
https://anewwayforward.org/average-car-length/
Proportionally Picobot theoretical car speed corresponds to 22.3/0.053*4.24*3.6=6422km/h (4174km/h for 65%) ... ;-)



For my big 1kg "raspcatbot" I did circular runs in our garage, and they showed 3.1m/s with powering motors with 3.3V/5V*16.8V=11.08V. Motor is rated 12V 1500rpm, and has "caterpillar wheel diameter" 65mm. So theoretical speed is 4.72m/s, that means raspcatbot showed 65% of theoretical speed already:

Code: Select all

$ echo "pi=4*a(1); 0.065*pi*1500*(3.3/5*16.8/12)/60" | bc -ql
4.71710136936507454731
$
(frame 946 of 90fps raspivid video: viewtopic.php?t=267999&start=75#p1885623)
Image
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Wed Nov 17, 2021 7:14 pm

The video from last night did show Picobot driving a good left curve, despite both motors getting same PWM speed.
I did buy 5 pack of motors, and realized that I got three grey cap 6x14 motors with longer motor shaft, and two black cap 6x14 motors with shorter motor shaft. Unfortunately both types are mixed below Picobot:
20211117_195922.15%.jpg
20211117_195922.15%.jpg
20211117_195922.15%.jpg (44.41 KiB) Viewed 1288 times
So I did place small reflective markers on both wheels to measured their rotation speeds with digital tachometer.
I did runs with 1000/1500/2000 PWM values (out of 0-65536) and measured rotation speeds [rpm].
Good that forward and backward speeds are nearly identical for left and right motor (they are different for raspbatbot).
But the speeds for both motors are totally different:
Picobot.rpms.png
Picobot.rpms.png
Picobot.rpms.png (5.21 KiB) Viewed 1288 times
I will keep the faster motor with longer motor shaft and measure when done with desoldering old and soldering new motor and lipo connector.
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Thu Nov 18, 2021 12:52 am

Past 1am should be stop, Tiny2040bot completely done with new design, and wireless Micropython REPL over soldered ESP-01.
Picobot mostly done as well, lipo connector, ESP-01 soldered, wifi works, but REPL does not want to show up:
20211118_010948.15%.jpg
20211118_010948.15%.jpg
20211118_010948.15%.jpg (55.46 KiB) Viewed 1249 times

But I wanted to see new Tiny2040bot at least in action, and forgot to test on totally flat ground. Desk has a slight texture, but since mass is much lower now than before, no problem. Total weight of shown Tiny2040bot including lipo is 15.6g, and it is now 37×29×31mm (l×w×h) small. I took a short video after having seen robot falling off desk onto my legs, and wanted to capture that. But this time robot did not fall off desk. These were the commands for capturing the video (forward and backward commands do not take new driving direction into account yet, need to be switched):

Code: Select all

...
>>> sparms(6000,12000,300,20)
>>> bck(200)
>>> fwd(200)
>>> bck(200)
>>> fwd(200)
>>> 
https://www.youtube.com/watch?v=ZarE88JjDzo
Picobot.new_design.wireless.jpg
Picobot.new_design.wireless.jpg
Picobot.new_design.wireless.jpg (51.68 KiB) Viewed 1249 times

Now the learn driving work can begin on Tiny2040bot, and Picobot needs some hardware debugging.
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Thu Nov 18, 2021 8:39 pm

It was definitely too late last night, good that I stopped.
I could not see any problems with the soldered connections, no unwanted connects.
And I could not see cables solder to wrong destination.
And I verified with multimeter that really ESP-01 EN pin had 3V3 from Pico 3V3 via small cable soldered between EPS-01 3V3 and EN pins.
I did a soft reboot (CTRL-D) and immediately saw the issue:

Code: Select all

Port /dev/ttyACM0, 21:01:01

Press CTRL-A Z for help on special keys


>>> 
MPY: soft reboot
MicroPython v1.17 on 2021-09-02; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>> 
>>> 
The Pico runs normal MicroPython version, not self built with UART enabled !

So I flashed MicroPython with UART ssupport (on pins GP0 and GP1, the pins I had cables soldered to).

Code: Select all

pi@raspberrypi400:~ $ cp pico/micropython/ports/rp2/build-PICO/firmware.uf2 /media/pi/RPI-RP2/
pi@raspberrypi400:~ $ 

Then telnet through the ESP-01 (IP 192.168.178.102) into Pico MicroPython REPL worked -- with linemode problem:

Code: Select all

pi@raspberrypi400:~ $ telnet 192.168.178.102
Trying 192.168.178.102...
Connected to 192.168.178.102.
Escape character is '^]'.
MicroPython v1.17-140-g0be3b91f1-dirty on 2021-11-12; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>> 
>>>  !"'#
Changing into character mode resolved all issues:

Code: Select all

Traceback (most recent call last):
  File "<stdin>", line 1
IndentationError: unexpected indent
>>> ^]
telnet> mode char

raw REPL; CTRL-B to exit
>

Code: Select all

MicroPython v1.17-140-g0be3b91f1-dirty on 2021-11-12; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>> fwd
<function fwd at 0x2000a5e0>
>>> 

Now I can superglue the ESP-01 to the 2x1 flat Lego piece already superglued onto Pico top.
And superglue long (motor) cables and the 4 cables soldered to ESP-01 in order to get ready for autonomous (Wifi controlled) driving.


Btw, today I received packet from aliexpress.com (China) at home (Germany) only 9 days after ordering(!).
This fills my supply of small solar cars, now have 40 wheels, 10 micro motors, 10 gear trains, 10 cars, ...

The other Amazon Prime packet filled my supply of micro motors for the experiments to come:
20211118_201945.part.15%.jpg
20211118_201945.part.15%.jpg
20211118_201945.part.15%.jpg (28.24 KiB) Viewed 1170 times

All my tiny robots sofar have direct drive of wheel by motor shaft, no gear train. And powering with only 10% of nominal voltage moves the robots fine. As stated before there will be a solar toy car robot with two motors with gear train each, one with single wheel left, the other with single wheel right. Front wheels will either remain, or be replaced with single middle front wheel as shown earlier in this thread.

There will be also two Pico4MLbots, one for line following with camera directed down, and both motors superglued to camera side; and the 2-wheel balancing robot with one wheel superglued to each side of the Tiny4ML PCB.


P.S:
Superglued ESP-01 and lipo connector already. This is photo of first wireless operation of Picobot with new design (without 5cm in the air cables as before). Both wheels turn fast in this photo:
20211118_221036.part.25%.jpg
20211118_221036.part.25%.jpg
20211118_221036.part.25%.jpg (31.25 KiB) Viewed 1147 times
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Fri Nov 19, 2021 2:24 pm

Last night I finished superglueing the cables and added the lipo for some first driving -- nice.
The only thing missing is a small rubber band for fixating the lipo on top of Pico and under the ESP01.
Finally I did put new design Picobot onto jewelry scane, and would not have expected to see three 9s at the end.
With the rubber band Picobot will weigh slightly more than 18g:
20211119_003943.15%.jpg
20211119_003943.15%.jpg
20211119_003943.15%.jpg (53.53 KiB) Viewed 1121 times

Today I started with solar toy car robot during a break, started with photo steps, for third I used my Dremel:
solar_toy_car.steps.15%.jpg
solar_toy_car.steps.15%.jpg
solar_toy_car.steps.15%.jpg (36.13 KiB) Viewed 1121 times

I am dying for the evening and weekend for working on more tiny robots ;-)
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Fri Nov 19, 2021 11:42 pm

It was difficult to superglue both parts together, so that both motor driven wheels kept ground contact, and the two front wheels kept ground contact as well. But finally there was a bit air between gear and ground, where the wheel was on the other side. The gear itself (with wheel on other side) was stopper. For the axle with wheel and gear on same side, I used Dremel to cut another wheel to the absolute minimum, that acts as a stopper on the other other side of the axle:
solar_toy_car.steps2.15%.jpg
solar_toy_car.steps2.15%.jpg
solar_toy_car.steps2.15%.jpg (35.56 KiB) Viewed 1079 times
Tomorrow addition of microcontroller with DRV8833 motor driver ...


P.S:
I tested both motors with constant voltage power supply, in 0.1V step up to 3V (the motors in photos run at 3V):
solar_toy_car.steps3.20%.jpg
solar_toy_car.steps3.20%.jpg
solar_toy_car.steps3.20%.jpg (29.79 KiB) Viewed 1068 times

Then I used digital tachometer to measure wheel speeds for 1V/2V/3V.
Motor superglued to toy car showed 4445/8956/11425rpm.
The car motor showed 4116/8059/10642rpm.
Not exactly the same, but similar -- and much less than the rotations per minute measured without gear train before.
But theoretically still 4.5m/s (16km/h):

Code: Select all

$ echo "pi=4*a(1); pi*0.008*10642/60" | bc -ql
4.45771053593367728446
$
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
Gavinmc42
Posts: 6462
Joined: Wed Aug 28, 2013 3:31 am

Re: Smallest Pico Robot?

Sat Nov 20, 2021 6:22 am

A simple way to do reduction is run the motor shaft directly on the rubber tire.
Shaft to wheel diameter reduction, 1mm to 9mm? 9 to 1 reduction?
If you mount the motor above the shaft any looseness adds to the friction drive.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Sat Nov 20, 2021 10:04 pm

Gavinmc42 wrote:
Sat Nov 20, 2021 6:22 am
A simple way to do reduction is run the motor shaft directly on the rubber tire.
Shaft to wheel diameter reduction, 1mm to 9mm? 9 to 1 reduction?
If you mount the motor above the shaft any looseness adds to the friction drive.
Interesting, but the wheels have nearly 1mm play.

Anyway, theoretical maximal speed with 8mm diameter wheel directly driven is 22.3m/s:

Code: Select all

$ echo "pi=4*a(1); 0.008*pi*53200/60" | bc -ql
22.28436388946360003133
$

The gear train of solar toy car has 19 and 8 teeth, and that reduces theoretical speed to only 9.4m/s already.
8:1 (axle diameter is 1mm) reduction as you described reduces to only 2.8m/s -- I will go with gear train for now.


I am pretty sure that directly driven wheels as in Picobot will be preferable speed wise (and Picobot preferable to Tiny2040bot stability wise). But I want to see the solar toy car robot moving to get a feeling of what it allows for.

This time, instead of using ESP-01 for wireless access to a Pico microcontroller for robot control, I will use ESP-01 only with ESP8266 MicroPython flashed to it. While all four pins on the ESP-01 allow for PWM (eg. with analogWrite()s from Arduino IDE), MicroPython does not allow for PWM on pins 1 and 3, only on pins 0 and 2. That would allow for forward moving left and right motor only with DRV8833 motor controller.

I spend quite some time today to fix this, identify why pins 1 and 3 are blocked, trying to build ESP8266 MicroPython from github sources (unsuccessful on Raspberry as well as on Intel Ubuntu), finding a hack in changing 2 bytes of esp8266-1m-20210902-v1.17.bin and flashing that, allowing to use PWM on all 4 pins (verified with oscilloscope for all 4 pins):
https://forum.micropython.org/viewtopic ... 16&t=11466
https://github.com/webrepl/webrepl
Image


I did superglue a flat 2x1 Lego piece with flat side down onto toy car, and DRV8833 motor controller onto the Lego piece in such a way, that the very short motor cables can be soldered to DRV8833 A01/A02/B01/B02 pins nearby:
20211120_221022.part.20%.jpg
20211120_221022.part.20%.jpg
20211120_221022.part.20%.jpg (36.56 KiB) Viewed 1005 times
The new ESP-01 module shown (with ESP pin labeling printed) does not need to connect 3V3 to EN pin in order to work.


Until now I used ampy and USB connection to Pico/Tiny2040 for flashing new versions of boot,py onto the microcontroller.
Now that ESP-01 has no USB connector (ESP-01 pins will be superglued onto robot, cannot be put into USB programming module anymore), I verified that the webrepl screen in browser allows to send/receive files to/from the ESP-01 over Wifi as well:
webrepl.png
webrepl.png
webrepl.png (37.89 KiB) Viewed 1005 times
(unfortunately webrepl is no option for Picobot/Tiny2040bot, since Pico has no networkstack/web sockets)
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Sun Nov 21, 2021 11:47 pm

Until today I had never soldered with enameled copper wire -- I found a nearly 100m 0.2mm diameter cable reel I had bought four years ago. I tested with constant voltage power supply and micro motor, and the same amperage was shown whether enameled wire was part or not (for given voltage). So I gave that cable a try — and soldering became so easy! I added mini 1.8V-5V to 3.3V Power Step-down/up converter and ESP-01 to Toycarbot:
20211121_234301.part.15%.jpg
20211121_234301.part.15%.jpg
20211121_234301.part.15%.jpg (52.29 KiB) Viewed 952 times

I used webrepl session to move Toycarbot a bit ... the motors do not move for PWM 1023, full speed for 0:
Toycarbot.MP1.png
Toycarbot.MP1.png
Toycarbot.MP1.png (133 KiB) Viewed 952 times

... and created 6 second youtube video from the recording:
https://www.youtube.com/watch?v=LM2MWiClTTk
Toycarbot.yt.png
Toycarbot.yt.png
Toycarbot.yt.png (116.26 KiB) Viewed 952 times
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Mon Nov 22, 2021 8:08 am

I did two more short videos last night.

First, definitely Toycarbot needs fixated lipo (for turning fast):
https://www.youtube.com/watch?v=ev4-EGfVs1k
Toycarbot.needs_fixated_lipo.png
Toycarbot.needs_fixated_lipo.png
Toycarbot.needs_fixated_lipo.png (178.29 KiB) Viewed 917 times

Here you can see Tiny2040bot, Picobot and Toycarbot.
I used plastic twist tie for fixating lipo, and that worked well:
20211122_011635.15%.jpg
20211122_011635.15%.jpg
20211122_011635.15%.jpg (51.56 KiB) Viewed 917 times

Next video shows that Toycarbot does not turn on center between wheel contacts as if it would be the case with motors side by side. Most importantly lipo needs to sit above motor axles, with lipo on robot front as a shown in last posting no turning is possible:
https://www.youtube.com/watch?v=Jhz4obEY5x8
Toycarbot.needs_lipo_avove_motor_axles_for_turning.png
Toycarbot.needs_lipo_avove_motor_axles_for_turning.png
Toycarbot.needs_lipo_avove_motor_axles_for_turning.png (69.85 KiB) Viewed 917 times
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Mon Nov 22, 2021 11:15 pm

Before going into details, I created a video, uploaded to youtube and created 25% size animated .gif of the video with this ffmpeg command (covering 1.8 seconds from 9 seconds in total):

Code: Select all

ffmpeg -i 20211122_215130.mp4 -ss 3.2 -t 1.8 -vf scale=320:-1 Toycarbot.anim.gif

I modified Toycarbot, and now it moves really fast, even in curves, although powered with 33% duty PWM only!
Because the robot is so small, the animated .gif size is small enough for 250KB forum attachment limit.
The two hardboards are of size 50cm×50cm:
Toycarbot.anim.gif
Toycarbot.anim.gif
Toycarbot.anim.gif (235.45 KiB) Viewed 873 times

So what did I modify?
Toycarbot was created to answer the question whether having gear train is better than directly driving wheel on motor shaft.
It was not built to deal with issues having two front wheels — so I just removed the front axle with both wheels.
Then I made sure that stopper on left side and gear on right side are at same height above ground by placing coins below them.
As can be seen 6mm diameter airsoft pistol pellet is nearly big enough for that position of the car (top left).
Bottom right you see ball superglued to ESP-01 headers, and really there now is a minimal space between ball and desk:
Toycarbot.new_front.png.15%.jpg
Toycarbot.new_front.png.15%.jpg
Toycarbot.new_front.png.15%.jpg (22.36 KiB) Viewed 873 times

OK, I adapted former boot.py script for the ESP-01 MicroPython. Left/right front/bottom PWM objects got new numbers 0-3. Pico MicroPython ".duty_u16()" became ".duty()" for ESP8266 MicroPython. Also they got initialized to 1023 for motor stop. For all motor control functions, "1023-" got prefixed to the duty values (I want 0 to be stopped motor, and 1023 being 100% PWM). Finally there is a 5th parameter now, scaling speeds between left and right motor. For rlf=1, both motors get the same duty cycle. For rlf>1, left motor duty gets multiplied by 1/rlf in all driving functions. For rlf<1, right motor duty gets multiplied by rlf in all drining functions. Hope is that this will allow for gradual turning of Toycarbot. This is main.py that I did send to ESP-01 wirelesssly with browser webrepl "send file". On each restart/reboot, main.py gets executed after boot.py, and that has stuff for setting up webrepl:

Code: Select all

$ cat main.py 
from machine import Pin, PWM
from time import sleep_ms

min=max=step=dt=0
fr=fl=1

def sparms(mi, ma, st, d, rlf):
    global min
    global max
    global step
    global dt
    global fr
    global fl
    min,max,step,dt=mi,ma,st,d
    if rlf>1:
        fr=1
        fl=1/rlf
    else:
        fl=1
        fr=rlf

def parms():
    print(min, max, step, dt, fr/fl)

sparms(200, 200, 10, 20, 1)

rb=PWM(Pin(0), 1000, 1023)
rf=PWM(Pin(3), 1000, 1023)
lf=PWM(Pin(2), 1000, 1023)
lb=PWM(Pin(1), 1000, 1023)

sleep_ms(3000)

def lft(d):
    for i in range(min, max+1, step):
        lb.duty(1023-int(fl*i))
        rf.duty(1023-int(fr*i))
        sleep_ms(dt)

    sleep_ms(d)

    for i in range(max, min-1, -step):
        lb.duty(1023-int(fl*i))
        rf.duty(1023-int(fr*i))
        sleep_ms(dt)

    lb.duty(1023)
    rf.duty(1023)

def rgt(d):
    for i in range(min, max+1, step):
        lf.duty(1023-int(fl*i))
        rb.duty(1023-int(fr*i))
        sleep_ms(dt)

    sleep_ms(d)

    for i in range(max, min-1, -step):
        lf.duty(1023-int(fl*i))
        rb.duty(1023-int(fr*i))
        sleep_ms(dt)

    lf.duty(1023)
    rb.duty(1023)

def fwd(d):
    for i in range(min, max+1, step):
        lf.duty(1023-int(fl*i))
        rf.duty(1023-int(fr*i))
        sleep_ms(dt)

    sleep_ms(d)

    for i in range(max, min-1, -step):
        lf.duty(1023-int(fl*i))
        rf.duty(1023-int(fr*i))
        sleep_ms(dt)

    lf.duty(1023)
    rf.duty(1023)

def fwdl(d):
    for i in range(min, max+1, step):
        lf.duty(1023-int(fl*i))
        sleep_ms(dt)

    sleep_ms(d)

    for i in range(max, min-1, -step):
        lf.duty(1023-int(fl*i))
        sleep_ms(dt)

    lf.duty(1023)

def fwdr(d):
    for i in range(min, max+1, step):
        rf.duty(1023-int(fr*i))
        sleep_ms(dt)

    sleep_ms(d)

    for i in range(max, min-1, -step):
        rf.duty(1023-int(fr*i))
        sleep_ms(dt)

    rf.duty(1023)

def bck(d):
    for i in range(min, max+1, step):
        lb.duty(1023-int(fl*i))
        rb.duty(1023-int(fr*i))
        sleep_ms(dt)

    sleep_ms(d)

    for i in range(max, min-1, -step):
        lb.duty(1023-int(fl*i))
        rb.duty(1023-int(fr*i))
        sleep_ms(dt)

    lb.duty(1023)
    rb.duty(1023)

def bckl(d):
    for i in range(min, max+1, step):
        lb.duty(1023-int(fl*i))
        sleep_ms(dt)

    sleep_ms(d)

    for i in range(max, min-1, -step):
        lb.duty(1023-int(fl*i))
        sleep_ms(dt)

    lb.duty(1023)

def bckr(d):
    for i in range(min, max+1, step):
        rb.duty(1023-int(fr*i))
        sleep_ms(dt)

    sleep_ms(d)

    for i in range(max, min-1, -step):
        rb.duty(1023-int(fr*i))
        sleep_ms(dt)

    rb.duty(1023)
$

These were the two commands I executed for capturing the video, 3.5 seconds forward drive of only right motor (the one that is at rear of robot), then 0.3 seconds sleep stopped, and finally 2.5 seconds forward drive of left motor only:

Code: Select all

>>> sparms(350,350,10,20,1)                                                                                 
>>> fwdr(3500),sleep_ms(300),fwdl(2500)                                                                     
(None, None, None)                                                                                          
>>>           

A motor with same type motors and wheels for left and right side-by-side would show very similar curve moving. With one wheel mounted 6mm more front than the other, the curves look quite different. Left forward PWM is ESP-01 pin IO2, which is connected to module's blue led. That is the reason why only in last part the blue led is visible. The led looks not like a dot because of fast turning of the robot (30fps video is roughly 33ms capture time):
Toycarbot.turning_fast.png
Toycarbot.turning_fast.png
Toycarbot.turning_fast.png (156.25 KiB) Viewed 873 times

The youtube video shows all, and again the tiny robot's sound is quite loud while moving:
https://www.youtube.com/watch?v=rP5dqFyxAT0


There is one important difference driving with gear train as here to driving wheel on motor shaft with Tiny2040bot and Picobot before:
I did set min and max speed always identical -- no rampup/rampdown needed here!
Without rampup/ramdown Tiny2040bot and Picobot do not move.
I am thinking on replacing directly driven wheels under Picobot with gear trains from two spare toy cars.
Removing the two 2x1 flat Lego pieces between micro motors and Pico will result in Picobot with gear trains PCB being at same height as it is right now.


P.S:
Toycarbot is now 46×24×30mm (l×w×h), and has 13.093g total weight —shorter than Pico (52mm).
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Tue Nov 23, 2021 11:12 pm

No hardware work (besides design) today.
Tiny2040bot, Picobot and Toycarbot all have no sensors onboard.
Yes, they can be controlled via Wifi, but a sensor is needed to interact with the world.

So I came back to the idea of line following Pico4ML robot with Pico4ML camera turned down:
viewtopic.php?t=323194#p1934842
Image


I looked at Arducam RPI-Pico-Cam repo:
https://github.com/ArduCAM/RPI-Pico-Cam
I needed just to capture video frames, and understand the format -- no use of Pico4ML display needed for now.

I found sources of arducam_demo, here is endless loop toggling led for each frame captured —and sent over serial (to my Pi400):
https://github.com/ArduCAM/RPI-Pico-Cam ... .c#L34-L54

The demo is in rp2040_hm01b0 directory, and I found datasheet for that camera on Sparcfun camera page under "Documents":
https://www.sparkfun.com/products/15570
That tells that camera is a monochorme rolling shutter camera with 1 byte per pixel.

So I built arducam_demo according instructions ...
https://github.com/ArduCAM/RPI-Pico-Cam#Get-Arducam

... and then flashed (cp arducam_firmware.uf2 /media/pi/RPI-RP2/) the .uf2 file created. Immediately the Pico4ML led began to blink.

Next I did serial connection between Pico and Pi400 and opened /dev/serial0 in minicom. Lots of incoming binary data can be seen.

After leaving minicom, I did just "cat /dev/serial0 > out" and waited until led was 4 times lit, and off. Then I pressed CTRL-C.
Source code shows that each frame (of 96x96 1byte pixels) is prefixed with 0x55 0xAA header.
Grepping the header confirms that 0x2400 length (=96*96) frames are there:

Code: Select all

pi@raspberrypi400:~ $ od -Ax -tx1 out | grep "55 aa"
000000 55 aa 3b 38 36 38 34 36 34 36 33 36 34 36 3e 49
002400 42 46 55 aa 38 37 33 36 36 37 34 33 32 34 36 38
004800 47 43 49 49 55 aa 34 36 33 36 34 32 34 33 32 37
006c00 49 47 46 46 46 47 55 aa 34 33 34 36 37 34 36 37
009000 49 4b 49 46 43 47 46 47 55 aa 36 34 36 37 34 36
00b400 49 4d 4e 4a 47 49 49 47 49 46 55 aa 34 33 34 34
00d800 51 4b 4f 4d 4b 47 47 4a 47 49 47 43 55 aa 34 37
pi@raspberrypi400:~ $ 

I just wanted to view first frame, and since frame data is binary, I created a binary portable greymap (P5) from the data "by hand":

Code: Select all

pi@raspberrypi400:~ $ echo -en "P5\n96 96\n255\n" > out1.pgm
pi@raspberrypi400:~ $ head --byte 9218 out | tail --bytes 9216 >> out1.pgm 
pi@raspberrypi400:~ $ pnmtopng out1.pgm > out1.pgm.png
pnmtopng: 167 colors found
pi@raspberrypi400:~ $

And surprise, surprise —its me ;-) [at least part of me]
out1.pgm.png
out1.pgm.png
out1.pgm.png (5.94 KiB) Viewed 795 times

So capturing frames is no problem anymore.
And without the need to pipe the frames through only 115200bps serial line, frames can be captured much faster.
The camera resolution is 324×324 pixels, and the demo did just extract 96×96 pixel subframe for sending over serial.
From datasheet:
The HM01B0 contains 324 x 324 pixel resolutions and supports a 324 x 244 window
mode which can be readout at a maximum frame rate of 60FPS, and a 2x2
monochrome binning mode with a maximum frame rate of 120FPS.

It will be interesting what Pico at default 125MHz clock will be able to do with those frames, for black line following even looking at a sparse subset of frame pixels should be good enough.

For black line on white ground following framerates will be good enough, even if Pico4MLcbot (c for camera, there will be another Pico4MLibot using builtin IMU for 2-wheel balancing) will drive really fast. For driving really fast, initially new bot will not get gear trains, wheels will be superglued directly onto motor shaft as done with Tiny2040bot and Picobot. Since Picos are >50mm long, "smallest" is no thing, and so I will superglue both motors side-by-side left and right to USB connector on Pico4ML underside. Of course front center there will be superglued 6mm diameter airsoft pistol pellet as 3rd point of contact. My 150mAh lipos sofar were not that big, but high (7mm). Today I received 402025 150mAh lipo, the 6-digit number encodes 4.0×20×25mm (h×w×l). Because motor diameter is 6mm, lipo can be fixated below Pico4ML PCB, it will fit just between motors at back and camera near front. Today I received two Pololu DRV8833 motor drivers as well (only 0.8"x0.5"), much smaller than my previous (much cheaper) DRV8833 boards I used sofar. With this Pico there is no need to use the very small motor controllers, they will be used for other new tiny robots soon ;-)
20211123_231231.15%.jpg
20211123_231231.15%.jpg
20211123_231231.15%.jpg (69.07 KiB) Viewed 795 times

Todos for tomorrow evening:
  • determine good enough height of camera above ground for easy line following
  • solder+superglue Pico4MLcbot with successful hardware testing

All Pico4ML code I found in Arducam repo is C code, no Python. So line following Pico4MLcbot project will be different to the other three robots that are controlled via MicroPython REPL. No idea yet whether there will be an ESP-01 module for wireless access or not.
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Wed Nov 24, 2021 8:35 pm

Today I tried to compile Pico4ML person detection demo.

First I stumbled over a pico-sdk bug, reported in existing issue and reported workaround as well:
https://github.com/raspberrypi/pico-sdk ... -977941762

Next I encountered simple typo bug and raised an issue against Arducam repo:
https://github.com/ArduCAM/RPI-Pico-Cam/issues/11

Finally compilation completed, after more than 40 minutes(!) on Pi400.
After flashing that demo onto Pico4ML, now the display shows 96×96 subframe of camera 324x324 GREY8 frame.


I had to do a lot of "subtractive work" with my Dremel for flat 4x1 Lego piece to make it fit at USB connector end.
It is used as superglueing base for the two micro motors:
20211124_174723.15%.jpg
20211124_174723.15%.jpg
20211124_174723.15%.jpg (16.48 KiB) Viewed 753 times

Next I took 3x1 male headers, removed the headers from the plastic and broke that into 3 pieces.
Then I did superglue those 3 pieces on free areas of Pico4ML camera side.
Finally I did put small drops of superglue onto the 3 pieces tops and fixated the 402025 lipo from yesterday.
The person detect demo shows the end of resistor lying below the robot:
20211124_204656.15%.jpg
20211124_204656.15%.jpg
20211124_204656.15%.jpg (47.21 KiB) Viewed 753 times

This view shows that lipo is really safe above ground.
The PCB hole distance does not match the lipo connection distance, but with bending GND and VSYS pins lipo can power Pico4ML:
20211124_204922.part.25%.jpg
20211124_204922.part.25%.jpg
20211124_204922.part.25%.jpg (15.75 KiB) Viewed 753 times

Current weight together with motor controller to be added is 14.998g.
Now its soldering time, only (bigger) DRV8833 motor controler needs to get soldered and superglued ...
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest ̶P̶i̶c̶o̶ RP2040 Robot?

Sat Nov 27, 2021 5:19 pm

I used Dremel as well to reduce Pimoroni Tiny2040 board from 22.9×18.2mm to 19.5×14.9mm(!), called this Tinier2040:
viewtopic.php?t=324698

On this screenshot you see Tiny2040 powered by new very small 25mAh lipo, and in middle row middle position Tinier2040. The youtube video was demonstrating that Tiny2040 could be powered by the tiny 25mAh lipo I have no C rating for:
viewtopic.php?t=324698#p1943899
Image

Yesterday I verified as well that the lipo was able to drive solar toy car, and it moved fast
(part of smartphone camera 30fps video frame —with the help of camera rolling shutter effect, speed can be "seen" in single photo):
frame.0018.part.jpg
frame.0018.part.jpg
frame.0018.part.jpg (9.67 KiB) Viewed 667 times

As can be seen in this photo, the pack of lipo, reduced with Dremel as well Pololu DRV8833 motor controller and Tinier2040 has height 10.9mm. On top of 8mm high motor+wheels base that will result in 20.0×14.9×18.9mm (w×l×h) Tinier2040bot (<6g weight!):
Image


In previous posting of this thread
viewtopic.php?t=323194#p1938210
I mentioned @roboticbits Tiny2040 based "Dot" robot:
Tiny2040_Dot.jpg
Tiny2040_Dot.jpg
Tiny2040_Dot.jpg (13.35 KiB) Viewed 673 times

In a later Tweet roboticbits answered my question on Dot dimensions:
Image


I have tried since to undercut Dot's 28×18×17mm — with Tinier2040bot's 20.0×14.9×18.9mm this will be mostly achieved.
Not all dimensions have been undercut sofar (height), but min, max as well as Euclidean norms:

Code: Select all

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

P.S:
From Tinier2040 thread, Tinier2040bot work in progress:
viewtopic.php?p=1944487#p1944487
Image


Image


Image
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Thu Dec 02, 2021 12:11 am

I completed soldering of DRV8833 motor controller to Pico4MLcbot, many 0.2mm diameter wires:
20211202_004821.15%.jpg
20211202_004821.15%.jpg
20211202_004821.15%.jpg (48.85 KiB) Viewed 560 times

I flashed MicroPython and tested 1st motor connected via GP2 and GP3 pins. All fine, forward and backward, with PWM fast and slow.
Next I tested 2nd motor, and that immediately turned crazy regardless whether I used GP4 or GP5, with or without PWM.

So I stepped back and tried to enhance the simple rp2040_hm01b0 demo (that captured camera frames and sent over serial) to display the frames on display, without the 40min compile time overhead of the tensorflow person_detection_screen demo. I learned that I only needed to copy over these 6 files from the demo and get full display access:

Code: Select all

	DEV_Config.c
	DEV_Config.h
	fonts.c
	fonts.h
	st7735.c
	st7735.h
The modified demo already shows the arducam_logo on display by these two lines:

Code: Select all

...
       ST7735_Init();
       ST7735_DrawImage(0, 0, 80, 160, arducam_logo);
...

Tomorrow I will cleanly redo that in my RPI-Pico-Cam fork. And do similar to the code I found displaying the frames in person_detection_screen demo — these 9 lines do the complete live camera preview on display:
https://github.com/Hermann-SW/RPI-Pico- ... pp#L63-L71


Next I stumbled upon the pins used by Camera -- and the crazy motor is explained by GP4 and GP5 being used by Pico4ML camera:

Code: Select all

pi@raspberrypi400:~/pico/RPI-Pico-Cam $ grep " PIN" rp2040_hm01b0/arducam/arducam.c
int PIN_LED = 25;
int PIN_CAM_SIOC = 5; // I2C0 SCL
int PIN_CAM_SIOD = 4; // I2C0 SDA
int PIN_CAM_RESETB = 2;
int PIN_CAM_XCLK = 3;
int PIN_CAM_VSYNC = 16;     //GP15 hsync  GP14 pixel clock     
int PIN_CAM_Y2_PIO_BASE = 6;   // data GPIO6
pi@raspberrypi400:~/pico/RPI-Pico-Cam $ 

Next I searched for the Pins used by display:

Code: Select all

pi@raspberrypi400:~/pico/arducam/RPI-Pico-Cam/rp2040_hm01b0 $ grep "_PIN " DEV_Config.c
int EPD_RST_PIN     = 7;
int EPD_DC_PIN      = 9;
int EPD_CS_PIN      = 13;
int EPD_CLK_PIN     = 10;
int EPD_MOSI_PIN    = 11;
pi@raspberrypi400:~/pico/arducam/RPI-Pico-Cam/rp2040_hm01b0 $ 

I want to use GP0 and GP1 for UART connection of ESP8285 module, that will give me wireless MicroPython REPL access for Pico4MLcbot. Looking at Pico pinout, only 13 pins are unused:

Code: Select all

GP8, GP12, GP14, GP15, GP17..GP22, GP26..GP28

Tomorrow I will resolder the 4 cables connected to [AB]IN[12] of DRV8833. I had soldered DRV8833 EN pin to Pico 3V3 pin, that can remain as is.
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
Gavinmc42
Posts: 6462
Joined: Wed Aug 28, 2013 3:31 am

Re: Smallest Pico Robot?

Thu Dec 02, 2021 4:56 am

Small gears are a pain, a vague memory had me digging.
Belt drive system.
http://patrickmccabemakes.com/hardware/Nano_Sumo/

Also seen the 1:87 scale RC car guys use 618/681, 1x3x1mm ball bearings for the wheel hubs.
The 1:160 scale RC car guys go even smaller.
Tires are O rings.

4 packs of 4mm and 6mm dia drone motors are easy to get now :D
The older pager motors were lower current, less power.
But higher power now means higher RPM so reduction helps with getting the torque out.

Wonder how one of the new hybrid supercaps would work?
https://www.digikey.com.au/en/product-h ... capacitors
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Fri Dec 03, 2021 12:47 am

Thanks for the Nanosumo link, but 1 cube inch is too big for what I want to get (perhaps 16mm side cube robot).
Regarding the wheels, my current rubber wheels have contact on 2.8mm length to ground, which is important for fast turns or braking.

Today I received new tiny lipos; I had one 401015 25mAh lipo that has dimensions 4.3×10.3×14.7mm (h×w×l).
Today I received six 501012 40mAh(!) lipos via Ebay's "buy now" after 9 days, with measured dimensions 5.1×10.0×14.5mm (h×w×l).
I got the 6 lipos for 3.39$/pc — but shipping from Italy to Germany doubled the price to be paid.
Yes, 0.8mm more thick for the 40mAh vs. 25mAh, but tiny, and many — for more tiny robots:
20211202_181215.10%.jpg
20211202_181215.10%.jpg
20211202_181215.10%.jpg (19.07 KiB) Viewed 456 times

I started working on Pico4ML camera to display streaming today, made quite some progress and README.md is up to date:
https://github.com/Hermann-SW/RPI-Pico- ... 1b0_st7735
I documented total list of used pins as well, in addition from yesterday's posting these:

Code: Select all

int DRV8833_AIN2    = 21; // forw left
int DRV8833_AIN1    = 20; // back left
int DRV8833_BIN1    = 19; // forw right
int DRV8833_BIN2    = 18; // back right

int ESP1_RX         = 0;  // ESP8285 for Wifi
int ESP1_TX         = 1;

Yes, I have completed soldering of Pico4MLcbot, and besides DRV8833 motor controller, I soldered an ESP8285 (model ESP-1) as well. That allows for wireless REPL into the Pico4ML MicroPython. I bought the ESP-1 with 4x2 male headers, but unsoldered. For flashing WifiToSerial.ino Arduno example script I used the programmer for ESP8266 model ESP-01. But I did not want to solder and later desolder again. I had to press the button below the programmer needed to be pressed the whole time of compiling and flashing the sketch. And the 8 pins needed to have contact. So I inserted the 4x2 male headers into programmer, and added ESP-1 slated with pressure from my finger. That gave good contact without soldering:
20211202_235004.part.25%.jpg
20211202_235004.part.25%.jpg
20211202_235004.part.25%.jpg (16.12 KiB) Viewed 456 times

After flashing the sketch succeeded, and I found an ESP module showing up in "sudo nmap -sn 192.168.178.0/24", which I could telnet to, I took just the ESP-1 without headers and soldered its 3V3/GND/TX/RX pin holes to Pico 3V3/GND/GP1/GP0. Then I powered with its lipo, and jacked the robot up on 3x1 Lego piece. I recorded a video that I uploaded to youtube. The ESP-1 is already superglued to robots front, but the DRV8833 motor controller is not superglued yet. Also many too long 0.2mm diameter cables need to be routed more nicely on the robot:
https://www.youtube.com/watch?v=uaIC_d-ZLuw
Pico4MLcbot.jacked_up.jpg
Pico4MLcbot.jacked_up.jpg
Pico4MLcbot.jacked_up.jpg (63.63 KiB) Viewed 456 times

These were the commands I used to test the motors in both directions:

Code: Select all

>>> from machine import PWM,Pin
>>> br=PWM(Pin(18))
>>> fr=PWM(Pin(19))
>>> bl=PWM(Pin(20))
>>> fl=PWM(Pin(21))

For the video I created demo function taking duty, milliseconds to sleep after motor stopped, and milliseconds to sleep while motor is running:

Code: Select all

>>> def demo(du,dt0,dt1):
...     while True:
...         fl.duty_u16(du)
...         sleep_ms(dt1)
...         fl.duty_u16(0)
...         sleep_ms(dt0)
...         bl.duty_u16(du)
...         sleep_ms(dt1)
...         bl.duty_u16(0)
...         sleep_ms(dt0)
...         fr.duty_u16(du)

Code: Select all

...         sleep_ms(dt1)
...         fr.duty_u16(0)
...         sleep_ms(dt0)
...         br.duty_u16(du)
...         sleep_ms(dt1)
...         br.duty_u16(0)
...         sleep_ms(dt0)
... 
>>> demo(4000,1000,200)


After identifying ESP-1 IP address, just telnet to it gives (wireless) MicroPython REPL:

Code: Select all

pi@raspberrypi400:~ $ sudo nmap -sn 192.168.178.0/24 | grep Nmap
Starting Nmap 7.70 ( https://nmap.org ) at 2021-12-03 00:21 CET
Nmap scan report for fritz.box (192.168.178.1)
...
Nmap scan report for ESP-82D62B.fritz.box (192.168.178.103)
...
pi@raspberrypi400:~ $ telnet 192.168.178.103
...
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
Gavinmc42
Posts: 6462
Joined: Wed Aug 28, 2013 3:31 am

Re: Smallest Pico Robot?

Fri Dec 03, 2021 3:24 am

1cm3 sugarcube robots.

I had a bunch of very, very, very expensive ball bearing 3 and 5mm dia brushless motors but the magnets eventually absorbed moisture and jammed them up.

Those BLE ear buds have made it easier to get tiny cells now.

I always wanted self driving scale cars on my model train layouts.
Faller had some rechargeable nicad magnet steering ones but only in 1:87 and I modeled 1:160 at the time.
Someone still made a 1:160 VW van.
Hey, Faller do N scale ones now
https://www.eurorailhobbies.com/product ... ca=85&sc=N
I had forgotten they did worm gear reduction

Those tiny SPI 320x240 cameras and Pico look like it they can make it possible now at least in 1:87.
If someone doesn't make a Pico/camera/motor driver PCB I might have to do one myself ;)
Make it from flex PCB so it can be folded up smaller?

Wow, Faller have indoor GPS satellite system for cars using ultrasonics.
https://www.eurorailhobbies.com/product ... k=F-161855

Indoor robot navigation system?
Use Pi's and Picos.
Hmm, the short distance laser sensor VL6180X would be good for traffic anti-collision?
Or TDK 101/201 ultrasonic Chirp sensors?

To many things to play with, not enough time ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Fri Dec 03, 2021 1:54 pm

Gavinmc42 wrote:
Fri Dec 03, 2021 3:24 am
Those tiny SPI 320x240 cameras and Pico look like it they can make it possible now at least in 1:87.
If someone doesn't make a Pico/camera/motor driver PCB I might have to do one myself ;)
My Pico4MLcbot from last posting is created on top of older Arducam Pico4ML module that has 324x324 camera, 160x80 display and IMU already. The new (and now only 30.99$) Pico4ML-BLE has microphone and bluetooth BLE in addition, see this thread for details:
viewtopic.php?t=324642
Pico4ML_new.jpg
Pico4ML_new.jpg
Pico4ML_new.jpg (53.12 KiB) Viewed 375 times
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

lurk101
Posts: 1217
Joined: Mon Jan 27, 2020 2:35 pm
Location: Cumming, GA (US)

Re: Smallest Pico Robot?

Fri Dec 03, 2021 3:29 pm

Aducam has a camera with focus control. Is it used here?

User avatar
HermannSW
Posts: 4959
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Smallest Pico Robot?

Fri Dec 03, 2021 8:35 pm

lurk101 wrote:
Fri Dec 03, 2021 3:29 pm
Aducam has a camera with focus control. Is it used here?
No, that camera is of the size of v1 and v2 camera modules.
The 324×324 monochrome rolling shutter hm01b0 camera used in Pico4ML is tiny, I used online .stp file viewer to get the dimensions:
https://www.uctronics.com/arducam-hm01b ... duino.html
HM01B0.stp.png
HM01B0.stp.png
HM01B0.stp.png (34.65 KiB) Viewed 329 times
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
Gavinmc42
Posts: 6462
Joined: Wed Aug 28, 2013 3:31 am

Re: Smallest Pico Robot?

Fri Dec 03, 2021 9:39 pm

Same sensor as this one.
https://www.digikey.com.au/en/products/ ... VN/9759580
There seems to be two module versions around, dual connector and FPC.

There are some open source FPGA tools that work on the Pi's for these FPGAs..
I got it to blink a LED but steep learning curve and then Pico came out.
The human detect lib uses the Lattice tools which don't run on Pi's.
TensorLite on Pico might be equiv?

A tiny camera board with sensor on one side and Pico on the back?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “General”