Gyro MPU 9250 unter Azurit

Übersetzung:
Es ist möglich, die MPU 9250 auf zwei Arten anzuschließen (Stromversorgung mit 5 V oder 3,3 V).

Für 5 V siehe Sunray-Wiki:
Ardumower Sunray - www.wiki.ardumower.de

Für 3,3 V:

IMU <--> PCB1.3

VCC <---> 3,3 V.
GND <---> GND
SCL <---> SCL
SDA <---> SDA
ADO <-> VCC auf IMU

Optional kann man den auf dem Imu befindlichen DC / DC-Wandler mit einer Lötverbindung überbrücken (siehe Bild, grüner Kreis)
JC2 nicht auf 3,3 V vergessen.
 
Thx Berhard.
It`s a big assistance for non experienced electronics like me!!
If you like to buy a business jet....... I can assist you ;-)

UWE
 
Wow Bernard, nice manual for AzuritBer. One question... I've read a lot, but what can AzuritBer do that the normal Azurit can't?
 
Hello Stefan,
I´m running my mower since three years but I`m always had some issuses with the hard movement of my mower especally if the mower runs to the perimeter wire in a downhill situation. It stops very hard and the tailwheel comes up. After that the mower got a sonar warning due to facing to the ground.
At the end of last year I flashed the due with Berhards code.
I`m still on the learning side but I`m much more happy as before.
I can provide two videos to show how it looks like:





UWE
 
I'll try to test both versions. let's see where the differences are?!? I only liked to mow in tracks with a perimeter loop. And my gyro has to work!
 
Wow Bernard, nice manual for AzuritBer. One question... I've read a lot, but what can AzuritBer do that the normal Azurit can't?
It's difficult to explain but AZURITBER use odometry on all movement (The motor drive control is totaly different).
For example to roll 50 degres firmware compute how many ticks on each wheel are needed,it also compute the movement duration, so if after this duration if ticks are not OK (on big slope or stuck) it's possible to continue with next or particular state.


Better than AZURIT in level 1:
Very usefull :Mow motor speed is automaticly adjust (between max and min speed) according to mow motor sense.
More robust tracking and perifind with obstacle management
Possible to mow very far the wire
2 step docking.
Timer start at different location on wire
By lane mowing
Hardware watchdog.
many info in Console while mowing

Not better than Azurit.
Can't work without Odometry
Can't work with arduino mega
Need a GYRO for perfect mowing
Always dev with Raspberry and not long test without (but normaly no issue if setting are OK).
Many error info are now locate in the console into easy to understand message (but without raspberry !!!)
Arduremote plot is not always OK (because replace by raspberry plot menu)
More complex on first new platform setting because factory setting are for DENNA or ROBOMOW platform

In Level2
Raspberry Pi save all the mowing stage and you can easily see what's append
Big tactile screen is possible to daily control mower without you phone.
Camera with streaming (Vision AI to avoid DOG,PERSON etc in dev actually, but need PI4 and many CPU ressource)
Wifi for 'SOFA' control
HomeAssistant (actually in use) or (GOOGLE command via IFTT only tested and not actualy in use) for all what you want to automatise with your house or springler.

In Level3
RFID (if you test it one time ,you always need it ;) ;) )
Soft docking
fast return to station
Avoid some tracking location
Change tracking speed on particular location.
Multiple distinct area mowing
 
Ein kleiner allgemeiner Tipp von mir:
Im Arduino-UI sollte man die Fehlerbeschreibung (rot, unten im Fenster) komplett lesen. Oft steht die eigentliche Ursache des Problems im verdeckten Bereich der Fehleranzeige (also Hochscrollen oder Fensterbereich größer machen)
Gruß Fürst Ruprecht
 
Hast du auch eine Idee, Warum der Code der unter Arduino 1.6 funktioniert, Unter 1.8 nicht geht? Im Fehlerlog steht nichts und der Compiler baut auch bis zum Schluss und lädt hoch.
 
Hallo netlars,
eigentlich sollte genau 1.8 funktionieren. Welches arduino-board benutzt Du? Was passiert, nachdem der code hochgeladen wurde? (Zieh mal den USB-Stecker nach dem Hochladen raus)
Hast Du die beiden UIs im „portable“-Mode laufen (also getrennte Installation)?

Ich habe jetzt dutzende esp8266 und esp32 im Einsatz. Hier hatte ich viele Probleme mit den auf 1.6 folgenden UI-Versionen, warum ich auch die 1.6 archiviert habe. Für Azurite nehme ich 1.8, für den Rest die aktuelle Version. Während eines Projektes steige ich nicht um. Wenn man tagelang im Netz sucht, dann findet man eigentlich immer die Ursache. Aber dafür ist die Zeit eigentlich zu schade.
Gruß Fürst Ruprecht
 
mir geht es um den adcman. Ich bekomme wirre Werte und beim Offset kommt immer 0 raus. Dies geschieht aber nur unter Arduino 1.8. unter Arduino 1.6 geht es einwandfrei.
Ich nutze den Arduino Mega. Ich denke da hat sich vom Syntax her irgendwas in der 1.8 geändert.
Ich versteh das nicht, warum der Code unter 1.8 nicht gehen soll vom ADC. Alles andere funktioniert ja auch Prima.
 
Nachdem ich nun den Gyro kalibriert habe, liefert er auch gute Werte. Der Kompass lies sich auch kalibrieren, hat jedenfalls ganz schön gespielt bis er Ruhe gegeben hat. Ich hoffe das es nun läuft.
 
Hallo flyfast,
With Azurite you have to allow negative values in the PID controller of the motor so that it brakes downhill.
Gruß Fürst Ruprecht
What ever it was...... I`dont know!
I had this issue from the beginning, placed a bundle of question regarding this hard stop into the forum.
Maybe I was the only one who had this problem.
However, with the AzuritBer it is History .........so far.
I also got the MPU 9250 running and with a second DUE the GY-521. (THX again to Bernhard!)
Next step is to build my own rear wheeler chassis because of the slope in my garden.

UWe
 
Zuletzt bearbeitet:
Hallo Flyfast,

du bist da nicht alleine... Der Mäher bremst sehr hart und das Rad kommt hoch. Mir ist auch aufgefallen dass ein Motor, nach den Rückwärtsfahren nicht ganz hart stoppt sondern nachläuft. Das Problem ist mit Sicherheit im Code versteckt! AzuritBer ist hier völlig anders programmiert.
 
Wie wollt Ihr es denn haben?
Der Sensor fährt über den Draht:
Fall 1: Vollbremsung, nicht über den Draht hinausfahren.
Fall 2: Überfahren zulassen und in dieser Zeit auf Stillstand abbremsen. (bei mir führt das am Hang dazu, daß manchmal der Mäher nicht wieder nach drinnen zurück kommt - aus unterschiedlichen Gründen - Rad dreht durch, steht in der Ecke, dreht in die ungünstige Richtung etc.)

Bergabfahrt: die Regelung der Motorgeschwindigkeit erhöht am Berg zum Hochfahren selbstständig die Leistung, bei Bergabfahrt müsste sie aber negative Regelgröße zulassen, das erfolgt nicht standardmäßig. Man könnte auch das Neigungssignal in die Motorregelung einbeziehen ...“Man“..
Ein Nachteil von Azurite ist aus meiner Sicht (das sehen andere ja auch so), daß die Programmierung auf Zeit aufsetzt. Erhöht man die Geschwindigkeit, wirkt sich das auf die gesamte Abstimmung aus, so zB. auf die Strecke, die der Mäher über den Draht hinausfährt.

Gruß Fürst Ruprecht
 
Fall 2 ist besser. Runterbremsen in ca 400ms führt doch zu einem besseren Ergebnis denke ich. Wie bremst der mower denn bei azuritBer? Da geht das ja auch nicht abrupt.
 
My firmware always use odometry.
If the distance to move is more than 1 wheel revolution then the accel or brake is always apply on half full rev.
If the distance is less than one rev accel or brake are apply to half of the travel distance.

You can find that into :
void Robot::OdoRampCompute() { //execute only one time when a new state execution
//Compute the accel duration (very important for small distance)
//Compute when you need to brake the 2 wheels to stop at the ODO
//Compute the estimate duration of the state so can force next state if the mower is stuck

and the control of motor into :
void Robot::motorControlOdo() {

// call to reach a ODO cible on left AND right wheel so they don't stop at the same time accel and slow are used to smooth the movement of the mower
//Stop motor independently when the cible is reach
//


At the beginning of each state i tell to motor if brake or accel are require and the odometry distance to travel :

case STATE_SONAR_TRIG: //in auto mode and forward slow down before stop and reverse different than stop because reduce speed during a long time and not immediatly
justChangeLaneDir = !justChangeLaneDir;
distToObstacle = distToObstacle - sonarToFrontDist; // the distance between sonar and front of mower
UseAccelLeft = 0;
UseBrakeLeft = 1;
UseAccelRight = 0;
UseBrakeRight = 1;
motorLeftSpeedRpmSet = motorRightSpeedRpmSet = motorSpeedMaxRpm ;
stateEndOdometryRight = odometryRight + (int)(odometryTicksPerCm * distToObstacle);
stateEndOdometryLeft = odometryLeft + (int)(odometryTicksPerCm * distToObstacle);
OdoRampCompute();

break;
 
Hallo Stefan,
zum Thema hart bremsen:
die Funktion "void Robot::setMotorPWM(int pwmLeft, int pwmRight, boolean useAccel){...." in motor.h erlaubt das sanfte anfahren und abbremsen.
Wenn Du "setMotorPWM( leftSpeed, rightSpeed, false ); " in "setMotorPWM( leftSpeed, rightSpeed, true );" änderst, dann sollte der Geschwindigkeitswechsel sanfter erfolgen. Leider ist mein Mäher gerade zerlegt, daher kann ich es nicht testen.
zu pfod: ja, ich nutze zwei Perimeterempfänger, könnte daran liegen.

Gruß Fürst Ruprecht
 
Oben