AzuritBer Firmware (English): Unterschied zwischen den Versionen
(→With Compass) |
(→Without Compass) |
||
Zeile 240: | Zeile 240: | ||
Without Compass you can see that the Bylane mowing is not perfectly parallel over time | Without Compass you can see that the Bylane mowing is not perfectly parallel over time | ||
+ | |||
+ | Only the GYRO Yaw is updated in arduremote setting. | ||
===With Compass=== | ===With Compass=== |
Version vom 31. Oktober 2020, 14:27 Uhr
Inhaltsverzeichnis
Test requirements
Security note: For security reasons, always remove mower blades in your first tests!
Important: For your first wheel motor tests, jack your robot so that the tires can run freely without ground contact!
Prerequise to follow this WIKI: BT Module connected on PCB1.3 (ESP32 is also possible) and Pfod or Arduremote running into Android phone
What is AzuritBer and Why
AzuritBer was build for DENNA,ROBOMOW and PARANELLO platform and use Odometry or IMU to control the state change. It can only run on DUE and Odometry is mandatory (minimum 400 ticks per rev).But it's possible to adjust setting to work on other platform.
This version always use odometry into all movement (reverse,roll etc...) .The result is a more smooth movement without pause between all the différents state and the possibility to mow by lane for big area and faster mowing
2 Usefull option are Raspberry PI and RFID module.
At the beginning of the dev i need many debug message to perfectly adjust the firmware, so i add a raspberry and record all the mowing duration in a Console. Actually PI is optional, but help a lot to find trouble in the behaviour and to communicate (With your PC,or home automation) Other option is the RFID tag reader
Possible Option
Level 1 Standard
It's Azurit with ByLane and Wire mowing but without Raspberry and RFID
The mower can run in full automatic mode but can't manage multiple distinct mowing area.
Start using timer at different location on the perimeter wire with 3 possible mowing behaviour: Mow wire,Random Mode or By Lane Mode
Acces to mower using Arduremote or Pfod over Bluetooth
Level 2 Raspberry
The platform And Raspberry Pi but no RFID
It's Level 1 but now:
It's possible to acces to mower from your Wifi and set everything from your Sofa (Including firmware upgrade)
Home Automation can control the mower using MQTT message and start mowing according your automation.
Level 3 Raspberry + Rfid reader
The platform And Raspberry Pi and RFID reader and at least 1 Wifi sender.
It's level 2 but now:
You can setup 3 distinct mowing area
The fast return to station, easy escape from island, and change speed while tracking are now possible.
First start Level 1
If you want to use IMU ,Be careful to choose the correct firmware from Github (GY-88,GY-87 and MPU-9250 are possible)
After unzip the github repository ,open the ardumower folder and the ardumower.ino. Before uploading the sketch ,verify that into mower.h the line :
* #define Console Serial * //#define Console SerialUSB
are set like that : uncomment #define Console Serial to receive Console message inside the arduino ide console and comment #define Console SerialUSB
Upload the sketch inside the DUE using programming port.
Normally if everything is OK you have access to arduremote and setting.
Only For the first start, or with a new RTC eeprom :If you have error, you need to go into arduremote COMMAND and click on OFF to reset all error,next into setting, do a save setting.
Power OFF the PCB , do not forget also to disconnected the USB PC cable to be sure all restart correctly.
Restart with PC connected on Due programming Port and the console speed is set at 115200 bps .
****** SAFETY ****** Go To : Main Menu / Setting / Mow Motor
Set Force mowing off to YES
Odometry Setting
3 Values are require and need to be set in this order:
Value 1
Go To : Main Menu / Setting / Odometry
You need to set the correct ticks per one full revolution and check the result
Go To : Main Menu / Test ODO
Use 1 turn Wheel FWD
The wheel need to accelerate ,roll , brake and stop after exactly one revolution.
Repeat the test with 5 turn Wheel FWD to be sure.
Value 2
Back To : Main Menu / Setting / Odometry
Now you need to set the correct Ticks per cm according the diameter of the wheel.
you can find the value by this formula: Ticks per one full revolution / PI*diameter of the wheel
In this example the DENNA platform (diameter wheel is near 23 cm) : 720/3.1415*23=9.9
Back To : Main Menu / Test ODO
Now use the 3 meters Forward command to see if the value is OK.
The mower need to run forward for 3 meters .Adjust the value again if result is not 3 meters +/-10 cm
Value 3
Back To : Main Menu / Setting / Odometry
Now you need to set the correct Wheel Base in cm .
It's the distance between the 2 wheels. It is use to compute correctly all the mower roll movement.
Back To : Main Menu / Test ODO
Now use the Rotate 180 Deg and Rotate 360 Deg to verify the setting.Adjust the value again if result is not at +/- 5 Deg.
Mower need to rotate according your choice.Change the Wheel Base in cm until you find 180 and 360 degrees
Motor Setting
Go To : Main Menu / Setting / Motor
First set the POWER MAX to 100 to be sure the motor don't stop.
Adjust the RPM max speed and PWM max speed:
RPM is use into manual mode, so to check a new value simply go to Main Menu / Manual and drive forward.
You need to stop and drive forward again each time you change the RPM max speed slider value.
PWM is use into automatic mode and need to be enough for the mower to reach the RPM max value.
If the wheel don't roll smoothly in manual forward ,maybe you need to adjust the RPM_P RPM_I and RPM_D
See PID Control : [1]
Always start with RPM_D=0 and move the 2 sliders RPM_P and RPM_I. RPM_P increase the changing speed and RPM_I smooth the speed when near the RPM max speed.
You need to find a correct Manual / forward drive before continue with the Power max setting.
Remember that at 80% of the power max the mower react like if a bumper is pressed.
So to find the correct value ,simply deactivate bumper and In Manual / Forward stop the mower with your foot, normally the mower stop before the wheel slip. State change to OFF and into console you can see the according message. Do not forget to reactivate the Bumper.
MotorSenseScaleLeft and right are here to help to have a real Power, but the main is that at 80% of Power max : mower stop and reverse.
Swap Left Direction and right need to stay to NO and it's better to directly invert the motor wire + and -
Mow setting
****** SAFETY ****** Go To : Main Menu / Setting / Mow Motor
Set Force mowing off to NO or the blade never run and BE CARREFULL THE BLADE RUN
Go To : Main Menu / Setting / Mow
The mow motor can run at different speed according the high of the grass.It's directly link to the motor sense. So you need to correctly set the sense of the mow motor to have everything working correctly.
Remember that at 80% of the max power ,the mower start to mow in spirale, at 100% of the max power during 1 sec the motor is stop for more than 1 minute and restart automaticly after, at a very high power the error hardware driver motor can also occur and you need a full power off to restart the mow motor
To adjust everything try to find a location with medium high grass and low grass:
Set the Power max to a small value (15 Watts for example)
Set the PWM Max speed to 255
Set the PWM Min speed to 150
Start to mow in auto mode in the low grass (The mow motor need to start at PWM=255 and reduce slowly during the next 10 secondes),now send the mower in the high grass ,normaly the motor speed increase and the spirale mowing start.
If the spirale mowing start on low grass increase the Power max setting.
Like for drive motor you can use calibrate mowsense to have a realistic sense,but the main is that the mow spirale start on high grass and the mow motor stop on overload in VERY HIGH GRASS.
PWM coeff and actual PWM are actual value of the motor modulation.
Mow Pattern Max Duration is used to change from Random mowing mode to Bylane mowing mode and avoid track on the mowing area.(The mower switch the 2 mode every 18 minutes in this case)
Station setting
Station is blocking one , so the mower need to reverse to leave.
In schedule mode or start from station, the mower use (IN THIS ORDER) reverse distance, Roll Angle and accel Distance after Roll to leave the station and start to find again the perimeter wire to locate the mowing entry location according the timer setting, or track 1 meter if manual start from station.
On Go Home mode the mower track the wire and find the station (A voltage is detected on charging pin, or Bumper is pressed) it stop immediatly and slowly go forward for the Station check Distance to be sure the contact is OK.
If you use Right Sonar, the docking speed is reduce according to % of MaxSpeed each time something is detected while tracking the wire.
On full schedule mode it's better to activate the Reboot after charging, by this way all variable are restore and everything work for week or month without any intervention.
Perimeter setting
IMU setting
Imu is composed by 2 parts : Compass and Gyro/Accel.
The Compass use magnetic earth field and is disturb by all motor and electronics in the mower, so it's very difficult to have correct value (for example a change of 10 deg is possible if you move the mower for only 1 deg). But it's reliable (If indicate 25 Deg and roll for 360 deg or wait 10 minutes it's always 25 Deg)
The Gyro/Accel if very accurate (+/- 1 or 2 deg) but can drift over time, (If indicate 25Deg and you wait 5 minute it can be 30Deg, but when you rotate slowly the mower you can see that everything is OK from 0 to 179 and from -179 to 0 Deg)
The firmware can use or not the compass (Simply test and use the best according the location of the IMU in your platform)
Without Compass
Set Compass Use to NO and leave all setting to default.In this case, Heading 0 is the start position of the mower
Go To : Main Menu / Test IMU
Maybe you need to reduce the motor PWM max speed if the test fail sometime (The mower need to roll slowly)
****** SAFETY ****** Go To : Main Menu / Setting / Mow Motor
Set Force mowing off to YES
Start to mow in random mode and change the mower heading with your foot (If IMU is OK The mower need to always keep the heading)
Without Compass you can see that the Bylane mowing is not perfectly parallel over time
Only the GYRO Yaw is updated in arduremote setting.
With Compass
Set Compass Use to YES and leave all setting to default.In this case, Heading 0 is the North
You need To DO the Compass calibration each time you change IMU location in the mower or add metal/Magnet near IMU
Start and stop the compass calibration : click one time to start and move the entire mower around all axes until no new data coming in the Console click again to stop and save the new calibration data.
Now on the setting Imu arduremote page you can see the YAWCom value according to magnetic earth field