AZURIT FULL ODOMETRY MOUVEMENT CONTROL

Hi.
I have work on the Timer.
All is not tested but here the principe and the code.
Now it's possible to choise where the mower start to mow .
It's help a lot for very fast mowing area.
Sorry for the picture.

Sanstitre-2.jpg


First the mower start in A with red mowing path
After in B green path and last in C with Blue path.
It's possible to use also a D path in random mode to avoid mowing mark on the grass.

@Max
Before upload the sketch use the read setting to copy and paste the main value you have adjusted. and store this data for your mini.
There are change into the eeprom arrangement and for this time you need a factory setting after uploading the sketch to have correct data type.

Into the Zip the Excel file show explanation of the new menu.
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/3545/Sanstitre-2.jpg/
 
Zuletzt bearbeitet von einem Moderator:
Hi Bernard
Hope you had a good Christmas

I took some time off from this project to work on a gps robot. Also I have been building a charging station and adding a Bumperduino to my mini. As yet I have not loaded your latest software. So I am still with the previous version.

Can you tell me if that FW will work with a charging station and bumperduino?.

Also are they any functions that will not work with your firmware?

Do I need to make any hardware changes to incorporate the charging station?ie like adding or removing any jumpers

The Bumperduino is working well as a stand alone unit ie when I squeeze a tube the corresponding LED lights up. However I have not tested it outside just yet

I think, when entering the charging station the motors are stopped when the current is detected from the charging station. what happens if the bumperduino hits just before the current is detected?

regards
Max
 
Hi
Happy New Year everyone

FW will work with a charging station and bumperduino

I don't use BumperDuino but i think it is connected to Bumper left and Right on the PCB1.3 and it's the 2 input used into my firmware so no problem. The charging station is also OK without any change on the PCB.Verify that the yellow led on the sender need to flash and the station led on the PCB need to be on when you put the mower into the station.

Also are they any functions that will not work with your firmware?
What functions for example.
Actualy i am working on the connection with the Raspberry PI to remote the mower and a better use of the GPS.

what happens if the bumperduino hits just before the current is detected?
Yes you understand correctly and it's depend on the chassis of the mower
Actualy if the Bumper is hit before the current the mower try to avoid an Obstacle and never stop in the station.
But if you are sure there is no obstacle on your perimeter wire you can easily remove this test (Maybe it's also possible to add a small timer into the checkBumpersPerimeter function to keep the obstacle avoid working).
To remove the bumper check while tracking it's in Robot.cpp state_peri_track near line 4629
remove the checkBumpersPerimeter test by adding double cote.


Code:
case STATE_PERI_TRACK:
      // track perimeter
      checkCurrent();
      //checkBumpersPerimeter();
      checkSonarPeriTrack();


By.
 
Dear Bernard
I am getting some very strange responses since I rebuilt my mini. All is the same as before in terms of FW and connections.So to understand what is going on I have disconnected the bumperduino and sonar. The problem is seen when I am in manual and auto modes. In manual the mini (after 3 seconds) of driving forward the mini behaves erratically. It seems to start to calibrate its self.
The IMU and dodo test are working fine. In auto in both random and lane I get the same behaviour.
The only thing I can see different is that the eeprom is not keeping the date and time.
My mini often seems to blow the eeprom and loose the date and time. Is this require for your fw and any ideas why it is routinely damaging the RTC and eeprom
Of course it could be something else that I have not noticed
regards

Max
 
Hi Max.
With the perimeter use or not ?
Is there any beep or error ?

To understand the problem try to test the mower in manual mode (Wheel not on the ground) with the USB cable connected and look into the console to see what's happened in the 3 first second.
Try also without the IMU in random mode.

The only thing I can see different is that the eeprom is not keeping the date and time.
Yes it's Strange, i never see this kind of problem in my RTC (after finding a correct working one).
To verify the EEprom integrity simply use the read setting and check the last value (you can post a copy of the screen).
Try to change one setting value and save setting. Reset the mower to see if the eeprom work.

Remenber that if you disconnect the bumper or the sonar from the PCB you need also to disabled them in the PFOD Setting.

By.
 
Dear Bernard
Here is a file from the console. This test was in manual mode with wheels off the ground. The strange behaviour happens towards the end of the file.
The mowing motor can not be turned off. It stops for a few seconds and then restarts
I will now do a test with no mum in random mode as you suggested.
Thanks for helping
Is it important to get the date and time working or can it be ignored
Max
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/4262/MaxMini10Jan18.txt/
 
Zuletzt bearbeitet von einem Moderator:
Dear Bernard

The first test I sent, the perimeter had been disabled

I am now including a test in auto mode in random. Wheels off the ground. In the first part of the file the IMU is disconnected. After a few seconds I reconnected the IMU.
I do not know how to turn off the IMU via software.

hope you can find the problem.

If you want me to carry out any more test let me know

regards
Max
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/4262/MaxMinirandom10Jan18.txt/
 
Zuletzt bearbeitet von einem Moderator:
The eeprom works as it save settings and holds the values between resets. However the rtc does not hold the date and time and when I enable timer in settings I get an rtc error.
This has happens on at least 3 occasions in the past
How can I test the rtc unit
if the roc required for your software to work
could it be a flat battery
regards
Max
 
Hi Max
.
In the first test in manual mode at t=55s a bumper occur,so i think the bumperduino send Something.
In the second test in auto mode if the Wheel are not on the floor it's normal that the rolltofindyaw can't find the correct direction.

You don't need the RTC simply set USE NO into PFOD setting timer.
To disable the IMU in PFOD setting set USE to NO , save setting and restart the mower (do not forget to unplug the USB from PC to be sure shutdown the DUE) in the next start in the console the init message need to show nothing from IMU.

Set also the bumper to NO. and test the mower without IMU in Random mode.

Thanks.
 
Can you show me the setting (in console option d and read setting).
For the RTC maybe you can try (Without power on the PCB) to remove the battery for 10 secondes to reset the DS1307 but it never work for me and ony a new RTC solve the issue.
Remember that the RTC include 2 modules ,the DS1307 for date and time and the AT24C32 for the eeprom.
The mower can work without date and time but need the eeprom to save your setting, so no problem in your case.
 
Dear Bernard
I only just shaw your reply. For some reason I did not get an email informing me of your reply. I will review your response and respond accordingly on Monday when I get home again. Thanks again for your help. I think I owe you many beers by now. If you are ever in the UK in Shropshire we should meet up
Max
 
Hi Bernard

As the weather is getting better I am about to start working on the Ardumower again. Have you upgraded your software any further. If so if you like I can load it up and have a play

Second some advise if you would be so kind
I have been writing my own code for an Arduino mega to control a differential drive rover that uses a compass (HMC6343 tilt adjusted compass) and an FTK gps for feedback and control. Even though the RTK gps is supposed to be very accurate the rover still does not follow my desired course as closely as I want. I am working to fix this. Currently the rover is off course by up to 1 to 2m and I can accept up to 15-30 cm. RTK is supposed to be accurate to 2cm so the inaccuracy is likely come from the code, motors and ground conditions.

I want the Rover to drive a reasonably straight line between its current position and the next way point and then make a 180 degree turn at the end of a lane and then drive the next lane. The lanes are defined by waypoints.
Currently I use the gps to work out a target heading from the rover to the next WP and the compass to provide the current heading. The difference between the two is the heading error. I then use the heading error to drive the motors differentially to reduce the error heading and drive in a straight line to the WP. In general this is working. However the rover is still weaving around. I want to reduce the weaving.

I will enclose a video later to show you the behavior of my rover.

Can you advise me the best/simplest way to get a rover to drive a straight course along a slightly sloping area with accurate GPS and Compass and to stay on course.

I have just tried to average the compass values in to a 4 point average. This did not lead to a big improvement.

Next I will introduce a PID on the heading error to see if that improves things
After this maybe to use encoders for both wheels with PID's
then Kalman filters

If you have experience can you suggest what be the most logical implementation of these solutions from most simple to most complicated

Also are you aware of any books on these control subjects

Regards
Max
 
Hi Max.
Cool if you can share your experience into the GPS..
What kind of GPS did you use(In my case it's low cost Ublox M8N better than M6 but the acurate is not good 5 Ml by drifting) :evil: :evil:
THE GPS into arduino is not really easy to manage so during the winter i work a lot in the code to make it work with a raspberry PI
The Idea is like you to try to use a GPS for small mapping, and divide the mowing area into small parcel manage by Lane.

Actualy in the last Dev version the Return to Station now use the Sonar for gently hit the charging contact and the Timer manage the starting entry point on the perimeter but again need a lot of test to verify if i didn'd add new Bug so i am waiting until the rain stop and the sun is back.

For the Raspberry the exchange with the Due work better than i expected and now only need the time to continue DEV and manage GPS into Raspberry

For the straight line running the more accurate for me was the use of the MPU6050 IMU but not the compass or Odometry .
The compass is always inaccurate in all my test, and the Odometry work on perfect floor (into garage) but inaccurate into the Grass.
The GPS RTK is maybe a solution but the cost ????.

Cool if you can put a video and description of your rover.

By.
 
Dear Bernard
I am using the Ublox C94 M8P rtk evaluation boards. They are approx 250 Euros from Ublox. You get 2 in the package. One you use as a base the other as a rover. Interfacing with arduino is simple via 2 wires to a serial port. It takes a lot of effort to know how to set them up exactly how you want them, but I can help you with this if you buy them. They work well if you have open sky. Not so good in towns. If you are working in a small garden the the marvelmind sonar units will be better.
My rover has a sabertooth 2*32 motor controller, arduino mega, C94 M8P gps and a HMC6343 tilt adjusted compass. I use this large sabertooth as it is programmable and it can be driven by multiple inputs at the same time. I have configured mine to accept RC control for general movement around the garden and microprocessor control for the mission ie mowing lanes.
If the gps looses its Quality factor 4 status the software stops the rover until quality 4 is regained.
I also have radios to send data and a SD card to onboard data storage. I also have a virtual geofence a safety cutoff
The rover still does not drive so straight as I think the compass in the east west direction is not so good. I need to use the compass calibration to see if that improves things.
I am looking at IMU’s, encoders, PIDs , Kalman filters to see if the lane straightness can be improved.
Also as the software becomes more complex I may need to rewrite the software to be more like a Finite State Machine
Most of the items above are new areas for me.
The reason I am doing this is because the pixhawk hardware and ardupilot software although good is still not good a pivot turns And straight lanes
Videos to follow when the rain stops
Regards
 
Dear Bernard
Have you found a working Arduino sketch that will integrate GPS, Compass and IMU that will drive in a straight line to a waypoint. Probably using a kaman filter. If so can you please refer me to it I do not want to understand the maths just to implement the solution (if possible)
I am happy to share my code with you however it is not very pretty. Coding is my weakest area I think. I am wiriting my own code to force me to understand more complex rover code. Although I understand some of the Ardumower concepts and code I would not be so comfortable to start making major rewrites.
Very happy to collaborate on a rover that will drive long lanes with 180 degree turns. Basically I am working on 3 separate chassis. 2 small garden chassis one with my own code and a mega and one with pixhawk and adrupilot.
The larger chassis has a mower attached and can take the control system from either small garden chassis when they are working to a high enough standard. Currently I am not happy with either solution.
Earlier this year I was playing with the Ardupilot 3.2 firmware however the Ardupilot/Pixhawk combo did not drive straight enough so I decided to write my own code until the Ardupilot/Pixhawk gets better. They just made a new release of the firmware so I will go back to see the improvement.
Regards

Max


thanks
 
Hi Max.
GPS, Compass and IMU that will drive in a straight line to a waypoint.
Not at all.

And it's the main problem as you have discover the GPS is 2 Cm acuuracy on the paper and 20 into the garden ????
I'am not sure it's posiible to have 2 perfect parallel (10cm) lane over 10 meters.
At 5 or 7 meter my Bylane mowing with DMP of MPU6050 work well (2 or 3 deg accuracy) but 10 or 15 meter is never correct or need mower like Robomow RL2000 (53CM mowing cut).

Actually i work on the raspberry,Perimeter Wire,RFID to do this:
I want to record the GPS and Odometry position during long mowing time and try to check if it can be manage with very simple filter.
Because for me use kalman or other filter is usefull only if you have correct return from your sensor.

I never buy GPS RTK or Marvel sonar (into my garden there are a lot of Big Tree) and into all the post i have read on the net i never see a simple Rover repeat a simple 4 meters square more than 5 times without big error.
Maybe you can try it ??

Impatient to see your video result of the M8T and IMU.

By.
 
Very nice. Did you build the chassis by your own or do you have now another mower? I only know the green one.
 
Oben