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

Re: raspcatbot

Mon Jun 28, 2021 5:52 pm

Powering raspcatbot worked, and 4S lipo still shows 15.9V (from 16.8V fully loaded) after 1 year being off.
Last August we changed home router from 400Mbps to 1Gbps, and that has new Wifi network.
That is the reason why the Pi3A+ cannot connect.
Not sure why LCD display is blank, connecting HDMI will allow to correct Wifi settings.
Raspcatbot is jacked up -- just in case motors turn for some reason:
20210628_192649.15%.jpg
20210628_192649.15%.jpg
20210628_192649.15%.jpg (66.37 KiB) Viewed 1444 times

P.S:
I looked from the side, and steel wire rope seems to be high enough above ground, that fast moving continuous track will not touch the rope:
20210628_180215.15%.part.jpg
20210628_180215.15%.part.jpg
20210628_180215.15%.part.jpg (46.61 KiB) Viewed 1443 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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Mon Jun 28, 2021 6:19 pm

I had to remove some Lego pieces (and remember where to put them back) in order to connect HDMI cable to the Pi3A+.
And I connected a USB keyboard.
Console keyboard was not German, but knowing English keyboard layout allowed me to edit /etc/wpa_supplicant/wpa_supplicant.conf and correct Wifi network ssid.
Now Pi3A+ connects to Wifi on boot and I can ssh into it (later to change speed of radially running on terrace).
2.2" LCD does work, some text is displayed:
20210628_201356.15%.jpg
20210628_201356.15%.jpg
20210628_201356.15%.jpg (54.01 KiB) Viewed 1438 times

P.S:
It is good to have 3in/2out HDMI switch, you can see remote control for that bottom left.
I just connected a free 3rd HDMI cable to Pi3A+ and switched to see its bootup messages.

P.P.S:
https://www.amazon.de/gp/product/B07KGN ... le_o08_s00
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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Sat Jul 03, 2021 7:21 pm

I was a bit sidetracked in using Pi400 keyboard as laptop keyboard.
There is a solution from Gadgetoid, where Pi400 is powered from laptop as gadget over USB.
pi400kb started then will make all keypresses of Pi400 keyboard be sent to laptop as from a normal USB keyboard.
The last days I worked to make Raspberry mouse and trackball connected to Pi400 work for laptop as well.
Today with success -- though not with gadget mode now, but over netcat session instead:
viewtopic.php?f=140&t=295074&p=1884806#p1884806
I just use trackball connected to Pi400 and Pi400 keyboard for the laptop, just write this posting with laptop browser.

So I am back at raspcatbot work now and wanted to see what still works after a year.
I SSHed into raspcatbot Pi3A+ and identified latest used directory by timestamps.
In that I found all scripts to move robot forward and backward I used a year ago.
The bash scripts use pigs commands, so I did "sudo pigpiod" first and then used them.
raspcatbot is jacked up, so no harm should happen.
What I learned today is, that if I run fast backward (./bck 180), then "./bck 0" does create quite some force onto the jacked up bot. Better to do "./bck 20" first, a speed where the wheels do not move anymore (speed is controlled via GPIO pins, range 0-255). Then "./bck 0" turns of the high sound of the motors that do not move.

Code: Select all

pi@raspberrypi3Aplus:~/raspcatbot $ cat bck
#!/bin/bash
pigs w 25 0 w 9 1 w 22 0 w 23 1
pigs p 24 $1 p 27 $1
pi@raspberrypi3Aplus:~/raspcatbot $ 

One time today (when I did run with maximal speed backward, "./bck 255"), most likely a voltage spike killed connectivity to Pi3A+ and I was not able to turn off the fast moving wheels without turning off the overall raspcatbot power switch. A must TODO is to have some deadman switch functionality running -- if network connectivity is lost, Pi3A+ needs to turn off both bot motors.

I did laser speed test of "./bck 255" raspcatbot, and saw 1693rpm -- not the fastest I have ever seen, but raspcatbot mounted voltmeter only showed 15.6V, and not the fully powered 16.8V [yes, I intentionally overpower the 12V 1500rpm motors ;-) ]:
(16MP photo for details: https://stamm-wilbrandt.de/en/forum/20210703_205314.jpg -- just saw that laptop is not powered anymore, the USB power cable was kicked out of laptop by left side continuous track)
20210703_205314.15%.jpg
20210703_205314.15%.jpg
20210703_205314.15%.jpg (57.19 KiB) Viewed 1365 times
With 65mm wheel diameter still 5.76m/s or 20.74km/h free running ...

Code: Select all

$ bc -ql
pi=4*a(1)
1693/60*0.065*pi
5.76194272607147994872
1693/60*0.065*pi*3.6
20.74299381385732781539

P.S:
Onboard 2.2" LCD works -- ooops, undervoltage detected:
20210703_214245.15%.jpg
20210703_214245.15%.jpg
20210703_214245.15%.jpg (62.2 KiB) Viewed 1344 times

P.P.S:
Two of the three onboard lights need to be fixated again ...
20210703_214724.15%.jpg
20210703_214724.15%.jpg
20210703_214724.15%.jpg (50.12 KiB) Viewed 1343 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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Sun Jul 04, 2021 10:06 am

HermannSW wrote:
Sat Jul 03, 2021 7:21 pm
One time today (when I did run with maximal speed backward, "./bck 255"), most likely a voltage spike killed connectivity to Pi3A+ and I was not able to turn off the fast moving wheels without turning off the overall raspcatbot power switch. A must TODO is to have some deadman switch functionality running -- if network connectivity is lost, Pi3A+ needs to turn off both bot motors.
I once had a simple two wheel robot turning very fast around itself by driving both wheels full speed, one forward and the other backward. I did control the robot motors via Wifi connection to ESP8266 on the robot. Once Wifi connection got lost, and I had no chance to touch the power off switch on the robot due to its very fast turning. I had luck that the robot did not move and mainly staid at same location. After waiting few minutes lipo got empty and robot stopped. This was a stop, but not an emergency stop.

HermannSW wrote:
Sun Jun 27, 2021 7:19 am
We recently made a new terrace with slippery floor tiles (a slowworm on terrace wanted to escape me catching it, but all movements were sideways only, no forward move). But the foam rubber I glued on raspcatbot's wheels should be a good countermeasure for that. Plan is to go with 1m radius first. I found a long and thin screw and screwed it just at joint of 3 floor tiles, and it feels remarkably stable:
Image
During long hike this morning I had better idea. Although our terrace is 6mx3m, because of the joints and 60cm x 60cm floor tiles maximal radius would have been 1.2m. And I would have to coordinate with others wanting to do something else on terrace.

I now did the same the other guy did for running his model train with 22.5km/h -- he used his garage. Here train front camera view of run with 22.5km/h:
https://stamm-wilbrandt.de/en/forum/WOR ... _TRAIN.gif

Our garage is 2.5m wide, so I will get 1.2m radius as well. And if our car is inside, I can just drive it to our parking space next to garage. I did drill a 8mm diameter hole into center of floor and inserted an S8 screw anchor. Then I screwed a long screw into, leaving only few millimeters without screw thread looking out -- very firm:
20210704_111610.10%.jpg
20210704_111610.10%.jpg
20210704_111610.10%.jpg (7.74 KiB) Viewed 1314 times

This is with closed garage door and light inside garage on:
20210704_111735.10%.jpg
20210704_111735.10%.jpg
20210704_111735.10%.jpg (15.04 KiB) Viewed 1314 times

And this is with light off, but open garage door:
20210704_111929.10%.jpg
20210704_111929.10%.jpg
20210704_111929.10%.jpg (17.68 KiB) Viewed 1314 times

I will have to find something flexible I can put around raspcatbot running fast circles, so that in case robot connection to center screw gets cut somehow, the 1kg robot would not just crash into a wall.
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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Sun Jul 04, 2021 9:41 pm

I went to the garage 50m distant, used cooling box for safe transport.
raspcatbot just fits, and lipo safety bag contains two more fully loaded 4S 1300mAh 95C lipos.
I used the closed cooling box as desk for laptop, and paint bucket as seat:
20210704_204000.15%.jpg
20210704_204000.15%.jpg
20210704_204000.15%.jpg (37.5 KiB) Viewed 1262 times

First I did forward runs, uploaded this to youtube:
https://www.youtube.com/watch?v=gsY2yEZq_Vw
At the end raspcatbot entangles in steel wire cord, and onboard display gets disconnected:
Image


Because raspcatbot runs faster nackwards, I captured this video (audio is loud!), full speed with 16.2V lipo:
https://www.youtube.com/watch?v=LaahwOfdI9k
This is fastest round, counted 73 frames in single stepping through 30fps youtube video:
Image


Speed seen does not meet my expactations (5n/s) -- only 2.63m/s or 9.48km/h -- have seen this speed in accelarating and then full brake linear runs inhouse (middle of robot radius is 1.02m):

Code: Select all

$ bc -ql
pi=4*a(1)
r=1.02
c=2*r*pi
c
6.40884901332317820641
c/(73/30)
2.63377356711911433140
c/(73/30)*3.6
9.48158484162881159304

P.S:
I forgot to mention the networking aspect.
I have no Wifi in garage, so I made Android smartphone tethering hotspot.
Whenever tethering hotspot is started, it creates Wifi subnet 192.168.x.1/24 with random x.
Pi3A+ always is .161 in that subnet, the laptop the .222.

Script "deadman" runs in background on raspcatbot onboard Pi3A+ and pings the laptop with timeout of 1 second.
As long as ping is successful, robot lights keep on.
When timeout happens, script does turn robot lights off and turns off both motors as well.
So whenever network connectivity between Pi3A+ and laptop has a problem, raspcatbot just stops automatically:

Code: Select all

#!/bin/bash
ip=`ifconfig | grep "inet 19" | cut -f2 -dt | cut -f2 -d\ | cut -f1-3 -d\.`.222
pigs w 4 1          # lights on
r=`ping -c 1 -W 1 $ip | grep ttl`
while [ "$r" != "" ]
do
  r=`ping -c 1 -W 1 $ip | grep ttl`
done
pigs w 4 0          # lights off
pigs p 24 0 p 27 0  # motors off
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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Tue Jul 06, 2021 10:28 am

I forgot to mention how I tested deadman script from previous posting P.S.
I do have Android 11 on my smartphone, and the Tethering hotspot application lists all connected clients.
Clicking on a client shows its IP address.
I did not find any option to selectively kick out one client alone.
So for testing I executed "deadman" in background, resulting in robot lights on.
Then I did "./bck 50", not enough speed for robot to move, but with that the motors can be heard.
Then I did disable Tethering hotspont on smartphone.
With 1 second delay robot lights went off, and the motors got quiet (off) as well.


Yesterday evening I was in garage again for more testing.
On Saturday I heard "This is the end" from the Doors in radio (11.40min).
After I only measured less than 3m/s speed of raspcatbot two days ago, that song title came to my mind.
But yesterday the 3m/s mark did fall easily.

It began with me noticing that the steel wire rope was connected maybe too low on raspcatbot, so that parts of steel wire did hit the continuous track teeth showing up. Since the middle wheel was fixed and has no real purpose (besides guiding continuous track via its teeth a bit), I just removed it and connected steel wire rope in middle height of continuous track. And really speed increased. Next I removed the middle wheel on other side as well for symmetry reasons. Finally I replaced old steal wire rope with new one, so that now middle of robot radius is 1.27m instead of 1.02m before. So outside of robot radius is 1.365m, leaving slightly more than 6cm safety distance to nearest wall. I had to connect continuous track with quite some play to come near 1800rpm free running for jacked up robot. But continuous track with only two wheels looks as if it can be tightened a bit without harm:
20210705_210404.part.20%.jpg
20210705_210404.part.20%.jpg
20210705_210404.part.20%.jpg (36.59 KiB) Viewed 1200 times

During yesterday's runs I lost bridge with 3 lights during a run. Since they had no purpose yesterday, I did let the bridge off. Next 2.2" LCD display did disconnect from Lego piece it was superglued to. I found a way to keep its cables connected and display not flying around, wiill keep it that way until I will need it. The photo also shows 25.99$ Arducam monochrome global shutter camera fitting Pi3A+ CSI-2 interface on front of robot. looking forward down:
raspcatbot_display_aux.jpg
raspcatbot_display_aux.jpg
raspcatbot_display_aux.jpg (60.67 KiB) Viewed 1200 times

I did create some videos with smartphone.
This one shows 1kg raspcatbot with audio, circling around with 11.65km/h:
https://www.youtube.com/watch?v=uspALAPPp_Q

I did cut out 9 seconds from that video, where I did put smartphone very near to raspcatbot while it was running. Nice that doppler effect can be noticed by hearing the robot already with that speed (video is best heard when enabling "Loop" youtube option):
https://www.youtube.com/watch?v=STVa9a0xNqU


Yesterday there was a third client besides raspcatbot Pi3A+ and laptop in smartphone Tethering network. I connected Pi0W with v1 camera, that my younger son uses to remotely watch his CNC machine and 3D printer. I placed it near to where robot passes, and took a 20 second raspivid 640x480@90fps video of robot circling with this command:

Code: Select all

pi@raspberrypi08X:~ $ raspivid -t 20000 -md 7 -w 640 -h 480 -fps 90 -o t.h264 -pts t.pts
pi@raspberrypi08X:~ $

The "-pts" option did write microsecond precision timestamps for each frame into "t.pts".
"ptsanalyze" tool allows to do frame skip and delta analysis:
https://github.com/Hermann-SW/userland/ ... ptsanalyze
90fps videos with v1 camera do not produce any frame skips, as the analysis shows.
The frame deltas are in 26µm wide range 11078..11104:

Code: Select all

pi@raspberrypi08X:~ $ ptsanalyze t.pts
creating tstamps.csv
1806 frames were captured
majority framerate 90fps
  frame delta time[us] distribution
      1 11078
      1 11079
      1 11080
      2 11081
      1 11082
      2 11085
      1 11087
     10 11088
     48 11089
    405 11090
    848 11091
    411 11092
     53 11093
      9 11094
      1 11095
      1 11096
      2 11098
      1 11099
      2 11101
      2 11102
      1 11104
> after skip frame indices (middle column)
0 frame skips (0%)
average framerate 90fps
pi@raspberrypi08X:~ $ 
This is what smartphone camera does not provide, very precise timestamps for each frame -- ideally for measuring speed.

Here you can see the frame numbers when robot passes through center near camera from recorded 20s video, and the corresponding timestamps from "t.pts". From that the time deltas for each round can be computed. With middle robot diameter of 1.27m, circumference is 7.98m. From that the speeds for the different rounds are computed. As can be seen each round gets a bit slower, most likeley because 4S 1.3Ah 95C lipo was not fully loaded (16.8V), but showed 15.9V during the video capturing:
raspcatbot_garage_analysis.png
raspcatbot_garage_analysis.png
raspcatbot_garage_analysis.png (22.62 KiB) Viewed 1200 times

This is first frame (441) after raspcatbot actually started moving:
Image


This is robot after 1st round (frame 716) -- I should have reduced raspivid shutter time to get more sharp frames of fast robot:
Image


This is frame after completed 2nd round (frame 946):
Image


I did extract frames from recorded "t.h264" using this command:

Code: Select all

ffmpeg -i t.h264 frame.%04d.png

P.S:
I uploaded 20 second "t.h264" video captured at 90fps to youtube. Since there is no timing information in t.h264, youtube plays video at 25fps, so as slowmo, 3.6x slower than real:
https://www.youtube.com/watch?v=Ig0Fxzvl--4
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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Tue Jul 06, 2021 7:41 pm

Because of the removed middle wheels the box I used until now for jacking up raspcatbot does not work anymore. I created a new size fit construction from Lego pieces.

Maximal speed I have seen on yesterday's videos I captured was 3.24m/s. With 65mm wheel diameter that is only 3.24/(0.065*pi)*60 = 952rpm.

I know that the 4S 1.3Ah 95C lipo is really powerful, so more than 3.2m/s should be possible. The 12V 1500rpm gear motors should be able to do more as well.

I have an idea where the bottleneck might be. Both motors are powered by single L298N motor driver, and although that can drive 2A, it can provide 25W only. With voltages around 16V that is only 1.5625A, and for both motors.

I did an experiment, used two standoffs from another robot platform and screwed 2nd L298N on top of 1st. Adding only few new cables, I moved control of the right motor to the upper L298N, kept control of left motor on lower L298N. My hope is that two 25W L298Ns will allow for faster than 3.2m/s in garage (it is too late here now, will have to test tomorrow in garage). What I did is to jack up raspcatbot and verify that both motors can be controlled separately, and work as they should. On photo left continuous track moves backwards, and right moves forward (speed=80 for both):
20210706_211036.15%.jpg
20210706_211036.15%.jpg
20210706_211036.15%.jpg (59.73 KiB) Viewed 1161 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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Wed Jul 07, 2021 6:21 pm

I did several runs in garage -- speed did not increase :-(

During the runs the display got disconnected several times, so that I finally removed it.
I did remove camera at front as well, useful later, but currently hunting for speed only.

I thought if I can place safely 2nd lipo, then each motor driver can be powered by its own 4S 1.3Ah 95C lipo. Just to rule out that lipo is the bottleneck. I will go to garage again now, this is the current setup with 2nd lipo at front:
20210707_200506.15%.jpg
20210707_200506.15%.jpg
20210707_200506.15%.jpg (65.77 KiB) Viewed 1096 times

P.S:
Without display and camera, weight is slightly below 1kg, but the 2nd lipo adds 150g to raspcatbot weight ...
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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Thu Jul 08, 2021 5:48 pm

I did some runs in garage yesterday, uploaded the last video taken:
https://www.youtube.com/watch?v=_Wjm9XZgnVA
Basically the speed reduced because of the 150g weight added by 2nd lipo.

I was a bit clueless on what to try next.
Because I did fast runs always backward, I thought that an IRF520 Mosfet module per motor could replace motor driver. In searching for technical details I found this interesting page:
http://protosupplies.com/product/irf520 ... et-module/

The discussion of 10V/5V/3.3V logic levels made it clear to me why raspcatbot did show maximal 3.2m/s although more should be possible:
The L298N motor driver 5V input is connected to 5V from Pi3A+.
But I use normal 3.3V GPIO pin to control L298N speed.
So that is maximal 66.6% of maximal voltage, and adding voltage level shifter should give 50% more speed.
After removing 2nd lipo (because of weight), 3.2m/s*1.5=4.8m/s should be possible!
And that is pretty much the 5m/s target speed I wanted to achieve.

The video URL above looks nice when plaing (fast), but smartphone camera is rolling shutter camera, and so a single frame does not look that nice. Anyway the frame allows to see that lipo has 16.2V at that point in time:
raspcatbot_two_lipos.jpg
raspcatbot_two_lipos.jpg
raspcatbot_two_lipos.jpg (18.9 KiB) Viewed 1059 times



Unfortunately next tests with raspcatbot have to wait some time now.
I am writing this posting again from hospital, had to go here because of new inflammation of my shinbone and fever.
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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Sat Jul 10, 2021 1:06 pm

With discussion in "Questions on rolling shutter camera frame" thread
viewtopic.php?f=43&t=315458
I found explanation of how previous posting frame was likely createad (LM2596 step down voltmeter driven by 1KHz PWM signal with 0.22ms duty).

While I could copy recorded smartphone video over smartphone tethering hotspot to laptop for single frame forward/backward inspection, I found smartphone "Frame player" app allowing for same:
https://play.google.com/store/apps/deta ... ame.player
That application (like youtube video) allows to increase playback speed up to factor of 2, viewing last video uploaded to youtube with factor 1.75 (resulting in 4.9m/s target speed) made me feel giddy ;-)
https://www.youtube.com/watch?v=_Wjm9XZgnVA

Even playing with factor 1.5 (resulting in "only" 4.2m/s) can make feel giddy:
Image
I can hardly wait to come home and add voltage level shifters to see these speeds in garage in real ...
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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Sat Jul 10, 2021 2:25 pm

Just computed kinetic energy of 1kg robot at 5m/s target speed -- 0.5*m*v² = 0.5*1*5² = 12.5 Joule !

Centripetal force is F = m*v²/r = 1*5²/1.25 = 20 kg*m/s².
I hope the "40kg" on steel wire rope packaging meant "40 kg*m/s²", and the wire will be able to cope with the force of 1kg robot circling around screw in garage floor with 5m/s speed ...

Really seen forces in different videos sofar:
1*3.2²/1.27 = 8.06
1*2.8²/1.25 = 6.27
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
neilgl
Posts: 3675
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: raspcatbot

Sat Jul 10, 2021 7:35 pm

It is looking good!

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

Re: raspcatbot

Sat Jul 10, 2021 7:57 pm

neilgl wrote:
Sat Jul 10, 2021 7:35 pm
It is looking good!
Thanks, I feel the same.

Just discussed with my wife on telephone my plans and what I calculated. She asked well-founded (after I explained that 12.5 Joule kinetic energy robot crashing into big wooden stop bar for car, walls or even closed garage door might not be good for robot, but no danger) what are the risks for me and the laptop.

I will have to prevent robot
  1. to kick away the big paint-pot I am sitting on
  2. hit my feet
  3. kick away the cooling box the laptop is placed on
during experiments ...

In addition I think of adding a circular few cm thick foam (maybe 20cm high) closed strip between circling robot and nearby walls and other stuff. Hopefully raspcatbot will feel better when crashing in that setup ...


P.S:
Simple "good wheather" solution for me and laptop would be to stay outside of closed garage, and use Pi0W with Raspberry rolling shutter or Arducam monochrome global shutter camera inside garage for recording video (Pi0W and camera could just hang from garage ceiling above center screw in garage floor). When robot does not move, garage door can be opened to change things, everything else can be controlled remotely with closed garage door (over smartphone Tethering network) from outside. Foam stripe for raspcatbot safety can be in place in garage as well.
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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Sat Jul 10, 2021 9:52 pm

I did circular speed tests 4 years ago as well, inhouse inside my motor test station (MTS), but with running wheels on both sides of center point, and with safety glass around as well as on top.

After having seen maximal speed of >18m/s (65km/h) with small DC motors, I tried to break that record speed with outrunner motors used to turn propeller of RC airplanes or drones.


I learned: "Don't forget safety glas cover on Motor Test Station!"
https://forum.arduino.cc/t/motor-test-s ... /319852/42

Wheel+bullet, lost at 52km/h hits wall, then goes up out of MTS, near miss of top mounted Raspberry v1 camera!!
(1 frame of 90fps slowmo video per second, slowdown factor 90)
Image


Much more dangerous was new speed record outrunner motor run of 18.77m/s or 67.59km/h or 42mph:
https://forum.arduino.cc/t/motor-test-s ... /319852/40
At the end of the run one motor plus wheel plus mounting bullet cut loose from the robot, and destroyed the surrounding safety glass -- at that point in time I learned why the piece used to fixate propeller on outrunner motor was named "bullet":
3f7a3609814aaf4ba549e475f6806ee08cea941a.25%.jpg
3f7a3609814aaf4ba549e475f6806ee08cea941a.25%.jpg
3f7a3609814aaf4ba549e475f6806ee08cea941a.25%.jpg (23.47 KiB) Viewed 863 times

Now that I did compute kinetic energy for 1kg raspcatbot at 5m/s speed as 12.5 Joule, I wanted to do same computation for that incident. Motor plus big Lego wheel plus bullet did weigh 72g in total. For ease lets assume the bullet did hit safety glass with maximal speed of 18.77m/s.

Wow -- that small pack of motor+wheel+bullet had 12.68 Joule kinetic energy(!), more than 1kg 5m/s raspcatbot:
0.5*m*v² = 0.5*0.072*18.77^2 = 12.68J


After that incident I replaced all 4 horizontal safety glass MTS walls with hardboard. Only a small peephole with safety glass remained, allowing Raspberry v1 camera mounted on robot do 90fps videos of highspeed runs inside MTS through peephole for vibration analysis (outrunner motors are so powerful and produce so much vibration problems):
https://forum.arduino.cc/t/motor-test-s ... /319852/41
IMG_20170712_211544.25%.jpg
IMG_20170712_211544.25%.jpg
IMG_20170712_211544.25%.jpg (31.45 KiB) Viewed 863 times

P.S:
Even 4 years ago with 18m/s radially, my linear target speed was just 5m/s -- it seems that raspcatbot is just before finally reaching that target speed (after adding voltage level shifters as described before).
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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Sun Jul 11, 2021 9:00 pm

HermannSW wrote:
Sat Jul 10, 2021 2:25 pm
Centripetal force is F = m*v²/r = 1*5²/1.25 = 20 kg*m/s².
I hope the "40kg" on steel wire rope packaging meant "40 kg*m/s²", and the wire will be able to cope with the force of 1kg robot circling around screw in garage floor with 5m/s speed ...
My older son corrected me, the kg unit is correct, and means that you can hang 40kg of weight on steel wire cord, and cord will not break. Just multiplying with gravitational acceleration gives 40kg * 9.81m/s² = 392.4 kg*m/s², so cord can deal with much more than 20 kg*m/s² centripetal force.
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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Wed Jul 14, 2021 7:14 pm

While I cannot do much work for raspcatbot in hospital (my older son reminded me to drop deadman latency from >1s to <100ms using tcp or udp heartbeat signals), I looked where to find the 12V 1500rpm gear motors I use for raspcatbot. I have 6, but one is defect and I have two T101 robot platforms (3 in fact, third has my older son with 150rpm motors with builtin rotary encoders). T101 platforms are sold in various forms:
https://www.aliexpress.com/wholesale?Se ... t101+robot

Back in 2017 the only place I found to order the 1500rpm motors was dealextreme (dx.com), nowhere else. But dealextreme seems to have stopped selling those motors. Today I looked on aliexpress, and to my surprise search for "GA25" (the motor class, available with many different RPMs) and "1500RPM" resulted in single hit:
https://www.aliexpress.com/item/1965432 ... 4c4dQgVY9d
I did order three of those 10$ motors, just in case, and since need for more might arise sooner than later when doing >3.2m/s runs in garage ... ;-)
GA25-1500RPM.png
GA25-1500RPM.png
GA25-1500RPM.png (137.81 KiB) Viewed 707 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: 4830
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: raspcatbot

Wed Oct 27, 2021 8:54 am

Currently there is no camera on raspcatbot because I removed it for the speed tests in garage (that will be continued).

An early version of raspcatbot showed the ov7251 monochrome global shutter camera where it remained until removed. I did capture 320x240@204fps videos with that camera for robot control:
20200408_102520.15%.jpg
20200408_102520.15%.jpg
20200408_102520.15%.jpg (39.65 KiB) Viewed 129 times

Perhaps in April when I will get my OAK-D-LITE from kickstarter, it will be placed on raspcatbot. The two ov7251 monochrome global shutter cameras are faster, provide 300k depth pixels (640x480) at 200+ fps. Not sure yet whether that means that I can get 320x240 depth frames (fully processed in OAK-D-LITE) at even higher framerates (400fps?). The 4208x3120 color camera in middle (rolling shutter) is nice to have, but will definitely not be used for robot control as described earlier in this thread (because of horrible distorted frames). More information on OAK-D-LITE in this thread:
viewtopic.php?t=319770
Image


Getting "depth pixels" from ov7251 stereo camera might eliminate the need to undistort the frames as discussed before:
viewtopic.php?t=267999&start=50#p1663015
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

Return to “Automation, sensing and robotics”