PiMowBot ein autonomer Rasenmäher-Roboter in 3D-Druck

Heute ist Stammtischzeit:
Jeden Donnerstag 20:30 Uhr hier im Chat.
Wer Lust hat, kann sich gerne beteiligen. ;)
  • Hallo Kay,
    vielen Dank das Du Dir soviel Zeit genommen hast für die ausführliche Anleitung.
    Alles so gemacht wie Du geschrieben hast, aber die Fehlermeldung beim Hardware Check bleibt die gleiche. Auch das Problem, das die Relais nur kurz eingeschaltet bleiben, besteht weiter hin. Es gibt auch noch eine Fehlermeldung:
    pi@PiMowBot:~/pimowbot $ sudo apt --reinstall installpip3 gpiozero
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    E: Unable to locate package pip3
    E: Unable to locate package gpiozero

    VG

    Bernd

  • PiMowBot ein autonomer Rasenmäher-Roboter in 3D-Druck? Schau mal ob du hier fündig wirst!

  • Hey Bernd,

    was für Tof's hast du denn verbaut?

    Sieht aus, als dass du VL53l1X hast.

    Gib mal bitte

    Code
    nano /home/pi/pimowbot/PiMowBotIt.options

    ein und ändere unter ToF den type auf "VL53l1X"

    dann Strg+X und Shift+Y, dann reboot.

    Den Treiber nicht vergessen zu installieren und den anderen umbenennen. Uli_P hat das mal in einem Beitrag gepostet. Finde den gerade nicht

    VG

    Kay

  • Hallo,

    folgende Fehlermeldung kommt dann:

    Ich denke nicht das, dass Problem bei den ToFs liegt, sondern an der Ansteuerung oder Funktion der GPIO Pins. Die Relais lassen sich immer nur ganz kurz einschalten und gehen dann von selber wieder aus. Wenn das beim Umschalten der ToFs genau so ist, ist auch klar warum der 2. ToF nicht gefunden wird da das Verhalten der GPIO Pins dort wohl genau so ist. Also stimmt irgendetwas mit der Ansteuerung der GPIO Pins nicht.

    VG

    Bernd

  • Der Beitrag von Ulli ist wohl #89.

    Code
    echo "" > /home/pi/pimowbot/.PiMowBotIt.NoMultiplex

    Habe ich gemacht. Die Datei gibt es auch, ist aber leer !

    VG

    Bernd

  • Die Kabel zu den ToFs sind so kurz wie möglich und da die Motoren nicht angeschlossen sind, können sie auch nicht stören. Alle anderen Sensoren, bis auf das GPS, funktionieren.
    Was mich ja an der ganzen Sache so stutzig macht, ist, dass ja die ToFs und auch die Relays schon mal funktioniert haben und jetzt nach der Neuinstallation der kompletten SD-Karte nicht mehr. Irgendetwas läuft schief bei der Installation. Das Einzige, was an der Software jetzt anders ist, sie ist aktueller. Auf der SD-Karte mit der vorherigen Installation war das Betriebssystem von Anfang letzten Jahres. Aber ich denke das Du auch eine Aktuelle Raspberry Pi Installation nutzt und trotz Deiner tollen Anleitung kriege ich es nicht hin...

  • Hello!

    I'm having trouble configuring the pimowbot robotic lawnmower. I can't activate the vl53l1x tof sensors and get them to work. Could someone help me with detailed instructions on what and where to change or modify?

    Here is an excerpt from nohup.out: Exception ignored on calling ctypes callback function: <function VL53L1X._configure_i2c_library_functions.<locals>._i2c_multi at 0xf715c6e8>
    Traceback (most recent call last):
    File "/usr/local/lib/python3.9/dist-packages/VL53L1X.py", line 151, in _i2c_multi
    self._i2c.write_byte(address, reg)
    File "/usr/local/lib/python3.9/dist-packages/smbus2/smbus2.py", line 416, in write_byte
    ioctl(self.fd, I2C_SMBUS, msg)
    OSError: [Errno 5] Input/output error

    Thank you.

    Edited once, last by istvanpepe (June 1, 2025 at 5:47 PM).

  • Hi istvanpepe,
    which output generate an i2cdetect -y 1
    and what is your configuration schematic, The Tofs with multiplexer Board, oder with GPIOs so xshut connectors ?

    and please check the right connection of SDA and SCL. They are different to the VL53L0X

    Ulli_Pi
    July 19, 2024 at 4:31 PM

    Wenn alle Stricke reißen, dann bist Du zu schwer für die Schaukel

  • 0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- 0c -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- 69 -- -- -- -- -- --
    70: -- -- -- -- -- -- 76 --
    This is i2c, the software sees it here.

    The connection was made according to your instructions.

    Before that, the vl53l0x worked. I paid attention to the pin assignment.

    I don't use a multiplexer panel for TOF.

  • Hallo, ich habe gesehen, dass es in den letzten Tagen vermehrt einträge zu den ToFs gegeben hat.
    Ich habe lange gebraucht bis die ToFs und ich Freunde wurden. Mittlerweile habe ich fast in jedem Roboter Model Tofs verbaut und ziehe diese eindeutig den Ultraschallsensoren vor. Trotz vieler Rückschläge arbeiten die ToFs mittlerweile bei mir sehr gut.
    Aus meiner Sicht wichtig ist ersteinmal zu wissen welche man hat VL53L0x oder VL53L1x. Ist man sich sicher welche man hat, dann muss dieses in der PiMowBot.Options Datei rigtig eingetragen werden.

    Dann ist es noch wichtig den richtigen Treiber zu installieren, siehe dazu auf den Worksopseiten
    diese Erklärung "Für die ToF-Sensoren ist die Installation der zugehörigen Python Library notwendig. Bei Verwendung von VL53l0X
    Sensoren erfolgt das durch den Befehl: sudo pip3 install git+https://github.com/pimoroni/VL53L0X-python.git Bei VL53l1X Sensoren hiermit:
    sudo pip3 install vl53l1x"
    Unter Bookworm habe ich die Installation noch nicht ausprobiert, unter Bullseye funktionierte das bei mir problemlos. Vielleicht findet sich jemand der das unter bookworm einmal austestet?
    ist Treiber installiert und kein TCA multiplexer im Einsatz, also in der Options auf False gesetzt wie hier, dann müssen die GPIOs noch verbunden werden. Also der Linke ToF mit GPIO23 und der rechte mit GPIO22.
    Ist das alles richtig verdrahtet so würde ich die Pimowbot SW starten, und einen Blick auf die RAM-Disk werfen.
    Dort wird eine Datei .PiMobotItpy_LASER.py auftauchen. Diese könnt ihr euch einmal sichern.
    Parallel würde ich auch mit ps -ef | grep python schauen, ob das PiMobotItpy_LASER.py läuft.
    läuft es nicht, oder bringt es Fehler, so ruft einmal i2cdetect -y 1 auf.
    Die ausgabe sollte in etwa so aussehen.

    Code
        0 1 2 3  4  5  6  7  8  9  a  b  c  d  e  f
    00: -- -- -- -- -- -- -- -- -- -- -- 0c -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    20: -- -- -- -- -- -- -- -- -- 2A 2B -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    60: -- -- -- -- -- -- -- -- 69 -- -- -- -- -- --
    70: -- -- -- -- -- 76 --

    ist nur 29 und nicht 2A und 2B vorhanden, dann funktioniert die Umschaltung der ToFs nicht, das Script erkennt einen, aber nicht den anderen.
    In diesem Fall würde ich wie folgt vorgehen.

    Pimowbot SW stoppen aber den Pi nicht herunter fahren. Dann die .PiMowBotIt_pyLASER.py über folgenden befehl starten
    python /home/pi/pimowbot/bin/.PiMowBotIt_pyLASER.py starten. Nun genau auf die Fehlermeldungen schauen die ausgegeben werden.
    In meinen Fällen wo es nicht richtig funktionierte lag es meistens an einer schlechten Verdrahtung des I2C Busses, oder an der Verdrahtung mit den GPIO Pins

    Ich kann aber noch keine Efahrungsberichte vom Betrieb unter Bookworm abgeben, weiß nur, dass viele packages die sich früher unter Bullseye noch mit pip oder pip3 installieren liesen, diese sich nur in einer virtuellen umgebung installieren lassen.
    Hat sich damit hier schon jemand einmal beschäftigt?

    Bei Fragen gerne hier wieder posten Und viel erfolg beim installieren der ToFs
    Gruß
    Ulli

    Wenn alle Stricke reißen, dann bist Du zu schwer für die Schaukel

  • If I run a test code that I made with chatgpt, it shows the sensor values nicely
    i2cdetect -y 1 also shows the sensors as 2a and 2b.
    here's a snippet of the code running:

    python3 /home/pi/pimowbot/bin/test_pyLASER.py

    VL53L1X Start Ranging Address 0x29
    VL53L0X_GetDeviceInfo:
    Device Name : VL53L1 cut1.0
    Device Type : VL53L1
    Device ID:
    ProductRevisionMajor : 1
    ProductRevisionMinor : 0
    Set addr: 2aVL53L1X Start Ranging Address 0x29

    VL53L0X_GetDeviceInfo:
    Device Name : VL53L1 cut1.1
    Device Type : VL53L1
    Device ID:
    ProductRevisionMajor : 1
    ProductRevisionMinor : 14
    Set addr: 2bVL53L1X Start Ranging Address 0x2A

    VL53L0X_GetDeviceInfo:
    Device Name : VL53L1 cut1.1
    Device Type : VL53L1
    Device ID :
    ProductRevisionMajor : 1
    ProductRevisionMinor : 15
    VL53L1X Start Ranging Address 0x2B

    VL53L0X_GetDeviceInfo:
    Device Name : VL53L1 cut1.1
    Device Type : VL53L1
    Device ID:
    ProductRevisionMajor : 1
    ProductRevisionMinor : 14
    Left: 85.0 cm, Right: 98.3 cm
    Left: 70.2 cm, Right: 98.4 cm
    Left: 70.2 cm, Right: 98.6 cm
    Left: 89.4 cm, Right: 99.0 cm
    Left: 76.7 cm, Right: 98.1 cm
    Left: 64.6 cm, Right: 98.4 cm........

    test_pyLASER.py

  • Szia Ulli!

    Bullseye os 2024.03.12 raspios.

    Szia Istvanpepe :) and best regards to Hungary I guess
    yes Chat GPT is sometimes a very helpful joker, your testscript shows that the Sensors and the pi working well together and that the wiring is correct.
    I would check now your pimowbot option file.
    Is there anything, what is different to the original option file?
    and an other question. please post a ls -lart of your /home/pi/pimowbot directory

    Wenn alle Stricke reißen, dann bist Du zu schwer für die Schaukel

  • szia

    PiMowbotlt.options:

    [ ; #################################################
    ; ### This is the options file of your PiMowBot ###
    ; ### those are the default option values ###
    ; #################################################

    PiMowBot [
    debug_modus: false ; Set true to enable debugging mode
    enable_preHWcheck: false ; Set true to enable pre hardware check
    shake_level: 40 ; intensity of shake to indicate webserver ready state, set to 0 to disable
    model: "D" ; type of PiMowBot model
    BLEremote: true ; Set true to enable RC via Bluetooth ( requirements: sudo apt install python3-bleak)
    ]

    PiCAM [
    obstacle_threshold: 35% ; Increase threshold for less sensitivty, only change default if too many false-positives were detected
    disable: false ; Set true to disable visual obstacle detection in debugging mode
    mjpeg: true ; Set true to enable MJPEG-Streaming ( requirements: Legacy camera stack and sudo apt install python3-picamera )
    ]

    GPS [
    device: "/dev/serial0" ; typically the internel Hardware-UART is used to connect a GPS module, set to e.g. "/dev/ttyUSB0" if its connected via USB
    baud: 9600 ; The baud rate used by the GPS to communicate with the UART interface. valid values are 9600 or 115200
    chipset: "8M" ; valid values being “6M” or “8M”
    ]

    COMPASS [
    i2c_address: "0x69" ; Typically 0x69 = MPU9250, 0x0d = QMC5883 chip, 0x1e = HMC5833L Honeywell-chipset (Instead of .PiMowBotIt.Honey options file)
    declination: "(5,55)" ; Instead of append to .PiMowBotIt.Compass options file
    auto-calibrate: false ; set to false instead of .PiMowBotIt.Compass options file (see FAQ2.10)
    restart_modul: true ; typically the compass modul is restarted by wathdog, set to false to disable restart
    ]

    EMAIL [
    smtp_port: 587 ; Typically STARTTLS is on Port 587, SSL is on Port 446 and None is on Port 25
    security: "STARTTLS" ; Valid options are NONE, SSL, STARTTLS
    ]

    ToF [
    type: "VL53l0X" ; Valid options are "VL53l0X" or "VL53l1X" for the ToF-sensors connected
    stopzone: 15 ; Distance in cm, valid values 15 - 40 cm. PiMowBot stops if distance to obstacles is lesser
    I2C_multiplex: false ; Instead of .PiMowBotIt.NoMultiplex options file, set to true if TCA9548A is used
    I2C_mx_channels: 0x1 ; Channels of TCA9548A used to connect ToF-Sensors (left = 0 / right = 1)
    I2C_mx_reset: none ; Set to a GPIO#; e.g. 5 if Multiplex reset signal is connected at.
    restart: false ; Set true to enable restart of the ToF-script at the beginning of AutoMow
    LiDAR: false ; Set to true if servo for ToF-LiDAR is used
    Servo_pin: 12 ; Set to the PWM-GPIO used
    Servo_pulse: [0.5 2.5] ; Typically the min and max pulse-width of the servo (see servo specs).
    Servo_deg: 180 ; Typically the range of the servo in degree
    Servo_offset: 0 ; Set to the positioning offset from front
    Servo_flip: false ; Set true to flip servo CW<->CCW rotation
    ]

    DRIVE [
    brushless: true ; set to true if BLDC motors are used
    control_GPIO: 5 ; 6 for the new control, 16 for the old instead of .PiMowBotIt.L298NControl options file
    rpm_speeds: [19 20] ; set the low-ride and normal travel-speed in RPM
    min_speed: 15 ; set the minimum speed at which the motors rotate reliably
    trim: 0 ; set to negative values for trimming left or > 0 to trim right.
    lane-keep: true ; set to false to disable lane keeping and PID-Control instead of .PiMowBotIt.disablekeeplane options file
    turtle: false ; Set to true or 60% - 90% to activate individuel turle mode, instead of .PiMowBotIt.turtle options file (see FAQ2.9)
    low_torque: false ; Set to true if drive doesn't perform well in turle mode
    fastbrake: false ; set to true to enable fast brake
    direct_control: false ; set to true to disable smart drive (= no acceleration/braking curve)
    wheel_diameter: 20 ; Wheel diameter in cm
    ticks_per_halfturn: 296 ; set to 0, if no hall/reed-sensors are connected to your PiMowBot
    ticks_scaler: 1 ; set value > 1 to downscale high frequency tics of hall-sensors
    track_width: 34 ; track width in cm
    restart_modul: true ; typically the drive modul is restarted by wathdog, set to false to disable restart
    pid: [1.3 0.08 0.1] ; the parameters of the pid-controler
    ]

    THRESHOLDS [
    low_voltage: 17 ; default value [unit volt] for battery low voltage event
    pitch: 30 ; default value in degree for pitch detection event (MPU9250 needed) / Schwellwert fĂĽr Kipperrkennung/Neigungswinkel
    roll: 30 ; default value in degree for roll detection event (MPU9250 needed) / Schwellwert fĂĽr Kipperkennung/seitlich
    lift: 0.3 ; default value as factor of g for lift detection event / Schwellwert fĂĽr Lift Erkennung
    ]

    SERVER [
    disable-cache: false ; set to true to disable the internal server cache
    ]

    ]
    ;#EOF


    ls-lart:

    pi@pimowbot:~/pimowbot $ ls -lart
    total 492708
    -rw-r--r-- 1 pi pi 624 Nov 20 2019 PiJoinSwarm.r
    -rw-r--r-- 1 pi pi 10012 Dec 28 2020 altjson.r
    -rw-r--r-- 1 pi pi 9681 Dec 30 2020 PiMQTT.r
    -rw-r--r-- 1 pi pi 2205 Jun 19 2021 PiArcPlot.r
    -rw-r--r-- 1 pi pi 2485 Jan 4 2023 PiGPS.r
    -rw-r--r-- 1 pi pi 12328 Dec 25 2023 PiCAM.r
    -rw-r--r-- 1 pi pi 2958 Mar 14 2024 PiReplay.r
    -rw-r--r-- 1 pi pi 5404 Mar 20 2024 PiHWcheck.r
    -rw-r--r-- 1 pi pi 5145 Jul 19 2024 ReadMe.txt
    -rw-r--r-- 1 pi pi 11951 Oct 12 2024 Websocket.r
    -rw-r--r-- 1 pi pi 47427 Feb 5 22:30 PiControl.r
    -rw-r--r-- 1 pi pi 90264 Feb 12 13:41 PiSensor.r
    -rw-r--r-- 1 pi pi 44225 Feb 13 13:54 PiCGI.r
    -rw-r--r-- 1 pi pi 13921 Feb 13 17:52 Webserver.r
    -rw-r--r-- 1 pi pi 1980 Jun 1 16:39 PiMowBotIt.trips
    drwxr-xr-x 5 pi pi 4096 Jun 1 16:39 ..
    -rw-r--r-- 1 pi pi 7 Jun 1 16:42 .PiMowBotIt.Compass
    drwxr-xr-x 4 pi pi 4096 Jun 1 16:42 www
    -rw-r--r-- 1 pi pi 114 Jun 1 16:42 .PiMowBotIt.Gyro
    drwxr-xr-x 2 pi pi 4096 Jun 1 16:53 plots
    -rw-r--r-- 1 pi pi 26 Jun 1 16:53 Track.txt
    drwxr-xr-x 4 pi pi 4096 Jun 1 16:55 archive
    -rw-r--r-- 1 pi pi 269 Jun 1 18:01 .PiMowBotIt.solarmap
    -rw-r--r-- 1 pi pi 8960 Jun 1 18:27 wittyPi.log
    drwxr-xr-x 2 pi pi 4096 Jun 1 19:24 bin
    -rw-r--r-- 1 pi pi 165 Jun 1 20:15 .PiMowBotIt.stats
    -rw-r--r-- 1 pi pi 5115 Jun 1 20:24 PiMowBotIt.options
    drwxr-xr-x 6 pi pi 4096 Jun 1 20:24 .
    -rw-r--r-- 1 pi pi 9370 Jun 1 20:25 Sensoren.txt
    -rw-r--r-- 1 pi pi 1981 Jun 1 20:26 error.log
    -rw------- 1 pi pi 504149959 Jun 1 20:26 nohup.out

  • ticks_per_halfturn: 296 ; set to 0, if no hall/reed-sensors are connected to your PiMowBot
    ticks_scaler: 1 ; set value > 1 to downscale high frequency tics of hall-sensors

    istvanpepeAs you are using brushless DC drive motors with an integrated Hall sensor, you must use the ticks-scaler accordingly.

    With these adjusted values, you should be able to achieve a better driving experience:

    ticks_per_halfturn: 8 ; set to 0, if no hall/reed-sensors are connected to your PiMowBot
    ticks_scaler: 37 ; set value > 1 to downscale high frequency tics of hall-sensors

    The PiMowBotIt.trips option file that corresponds to the PiMowBot Model D must also be adapted to your type of mower. See Workshop-Part III, BlackBox (http://pimowbot.tgd-consulting.de/de/workshop3.html#BlackBox).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!