Arctic Hare mod by Jussi

Only warnings was in compiler, above is fixed code. 6 braces was missing.
Pi is usefull and working great most of the time but when something happen, serial connection failures freeze due
RFID working in due but storing rfid's has to do by editing robot.cpp. I dont know how to do that in pfodd and store them to eeprom
Code:
String rfid_list[10][8] = {
    {"44907165", "BACK_TO_STATION", "RTS", "240", "75", "0", "0", "0"},
    {"813FFA64", "BACK_TO_STATION", "RTS", "240", "87", "0", "0", "0"},
    {"A7D725BE", "BACK_TO_STATION", "RTS", "240", "49", "0", "0", "0"},
    {"455326BE", "BACK_TO_STATION", "RTS", "240", "35", "0", "0", "0"},
    {"719926BE", "BACK_TO_STATION", "RTS", "240", "95", "0", "0", "0"},
    {"8EA126BE", "BACK_TO_STATION", "RTS", "220", "-10", "0", "0", "0"},
    {"96D52480", "BACK_TO_STATION", "SPEED", "135", "0", "0", "0", "0"}};
 
See Piardu3523.py (not fully tested)
line 3049 A tag is Added (with 'WAIT') each time the mower detect one(need to activate or not this feature):
line 2960 The toDo list is create.
line 3077 The Status list is use
All other value are numeric, so PFOD can use slider.


So using this kind of work:
In DUE
You need to create the toDO list and the rfid Tag one, Status is already existing.
Now into Pfod it's possible to add a menu with unique id of your list 'like timer idx'
Code:
String rfid_list[10][8] = {
    {"1","44907165", "BACK_TO_STATION", "RTS", "240", "75", "0", "0", "0"},
    {"2","813FFA64", "BACK_TO_STATION", "RTS", "240", "87", "0", "0", "0"},
    {"3","A7D725BE", "BACK_TO_STATION", "RTS", "240", "49", "0", "0", "0"},
Now using the 3 list of char (tag,status,toDo) it's possible to create a submenu to enter new value.
Again see timer management into Pfod

To save into eeprom it's easy but it's very slow process so on startup you need to move all into Due for seek method.
create the adress
see line 46 of robot.cpp
#define ADDR_RFID_SETTINGS 4000 //4000 is example need to check if it is OK on rtc eeprom

Code:
void Robot::loadSaveRobotRfid(boolean readflag) {
  int addr = ADDR_ROBOT_RFID;

  if (readflag) {
    Console.println(F("Load Robot Rfid"));
  }
  else {
    Console.println(F("Save Robot Rfid"));
  }

  short magic = 0;
  if (!readflag) magic = MAGIC;
  eereadwrite(readflag, addr, magic); // magic
  if ((readflag) && (magic != MAGIC)) {
    Console.println(F("PLEASE CHECK IF YOUR ROBOT RFID ARE CORRECT"));
  }
  
  eereadwrite(readflag, rfid_list);
 
 etc......
 
  Console.print(F("Robot Rfid address Start = "));
  Console.println(ADDR_ROBOT_STATS);
  Console.print(F("Robot Rfid address Stop = "));
  Console.println(addr);
}


It's idea but certainly very complexe to build ;) ;) ;) ;)
 
Umm okay :D I'll check this later. Timer's are good start point (y)
Now some debugging or fault finding. That bad charger maybe broke something, or that short with capasitor. Don't have spare due yet so something else before that. For some reason mower start drive mow spirale and turn zombie. Pi stop responding also so I can't get console log (not pi's fault, this happen w/o pi also) How I write console output constant on file?
 
Today turned zombie one time when doing calibration roll and blade hit something. Something on that mow motor protection/high grass -function
 
grabserial is perfect for logging serial to file. https://github.com/tbird20d/grabserial
Theres something going on with timestamps but grabserial write line by line and newest is bottom
This is first serial console what I got when mower goes zombie. Left wheel is not turning and right turning and mow motors turning also.
Code:
[13:52:12 0.839438] NORMALMOWING / POUTFOR
[13:52:14 1.583251] NORMALMOWING / FRWODO
[13:54:02 107.865122] Error: motor left fault
[13:54:02 0.006108] Save Robot Stats
[13:54:02 0.514402] Robot Stats address Start = 800
[13:54:02 0.007064] Robot Stats address Stop = 826
[13:54:02 0.006755] ERROR / ERR
[13:54:02 0.002754] Error: motor left fault
[13:27:01 0.000144] AccelGyro Yaw: -0.00  Compass Yaw: 0.61  Diff between compass and accelGyro in Radian and Deg0.62 / 35.35
[13:27:01 0.050388] --------------------------------- IMU READY ------------------------------
[13:27:01 0.015122] Change to Area : 1
[13:27:01 0.004155] New sigcode in use  : 1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,-1,1,-1,-1,1,-1,-1,1,1,-1,
[13:27:01 0.016771] matchSignal size=24
[13:27:01 0.004311] subSample=4
[13:27:01 0.002653] capture size=192
[13:27:01 0.003598] START
[13:27:01 0.001567] Ardumower 1.2-Azurit-ber
[13:27:01 0.005141] Config: ArduMower
[13:27:01 0.003788] press...
[13:27:01 0.002030]   d for menu
[13:27:01 0.002780]   v to change console output (sensor counters, values, perimeter etc.)
[13:27:01 0.013968] off
[13:27:01 0.001334]
[13:27:01 0.000401] Watchdog is disabled
[13:27:20 19.185254] NORMALMOWING / FRWODO
[13:27:20 0.137448] 30011 Rotation direction Left / Right change
[13:27:22 1.955802] Warning  motorMowSense >= 0.8 * motorMowPowerMax
[13:27:22 0.010026] SPIRALEMOWING / STOPSPIRAL
[13:27:23 1.160664] SPIRALEMOWING / ROT360
[13:27:33 10.124195] SPIRALEMOWING / MOWSPIRAL
[13:27:41 7.663981] SPIRALEMOWING / NEXTSPIRE
[13:27:42 0.635690] SPIRALEMOWING / MOWSPIRAL
[13:27:51 9.420541] SPIRALEMOWING / NEXTSPIRE
[13:27:52 0.688054] SPIRALEMOWING / MOWSPIRAL
[13:28:03 11.264878] SPIRALEMOWING / NEXTSPIRE
[13:28:04 0.720055] SPIRALEMOWING / MOWSPIRAL
So, theres due reset w/o watchdog after left motor fault and then mowspirale? I have seen before when mower start spirale when mow motors are accelerating up to speed
 
What firmware did you use ?
Normaly if you have disable the watchdog and remove the function ,Reset may not occur.
Yes Something Strange with time stamp jump from 13:54 to 13:27 ?
After reset the mower need to be into WAIT / OFF ?
Did you start it manualy ??
Into arduremote info (Developer set it to yes)
If you have made change in the code ; Please send me your version, maybe it's possible to create a new branch on GitHub and compare it with the original code.
 
Zuletzt bearbeitet:
Code is here https://github.com/jussipu/AzuritBer RFID branch
grabserial write those timestamps, pi freeze also when mower freeze. I didn't start it manually. But when both freeze then power on/off is only option. When do that pi start much slower and dont record due startup. These freezes and power on/off are 11:17-12:03, 13:28-14:16 and 17:17-17:43
New due is on its way from germany
 

Anhänge

  • ArduMower-2020-05-26.log.txt
    181,4 KB · Aufrufe: 2
Ok .
I just see that the error message( when you have a motor error) is send no stop and very fast to Raspberry but is manage by the Pi and Nothing freeze.
You use Platformio and particular watchdog so maybe try to disable it totaly by removing also malloc signature !!!!

I send to git some minor change concerning the error message and power motor check on perifind ,also when motor overload while tracking now the mower try to escape
 
Also i never see this kind of error.
DS1307 comm error
RTC data error!
It is possible if PCB not powered correcly
 
I'll try tomorrow w/o malloc signature
Battery is samsung 30Q 3500mAh, 3 parallel. with 3A charger it was 5-6h charging and ~4h mowing.
 
How these lines, should those be disabled also?
Code:
watchdogReset();
change to:
Code:
#if Enable_DueWatchdog
watchdogReset();
#endif
 
Normaly no.
Remove the function void watchdogSetup(void) {} is enought.
Or put a very big value into watchdogEnable(5000) for example 200000.
Are you really sure that it's a watchdog reset ?
Maybe DUE issue or a bad solder somewhere on PCb ??

What's your value for battery low return to station:
Go home if below Volt into settting battery
 
Probably due issue :unsure: one zombie today -> nothing in log. last line was normalmowing/frwodo
23.8v is go home voltage, that is 3.4 cell voltage.

Googled rtc issues today and found that if using CR2032 battery, charging circuit should be removed or use LIR2032 battery. I ordered few those batteries.
Removing charging was easy few resistors and diode off and one res. shorted. Then soldered oscillator to pcb. vibrating can cause issues
 
Googled rtc issues today and found that if using CR2032 battery, charging circuit should be removed or use LIR2032 battery. I ordered few those batteries.
Removing charging was easy few resistors and diode off and one res. shorted. Then soldered oscillator to pcb. vibrating can cause issues
I try to remove resistor etc... 2 or 3 years ago but without result, i try also LIR2032 battery ,Same thing it Don't work.
Price is low but RTC are really shit
Many other members also have trouble with this module
The only solution for me was to order 5 RTC on 2 eBay shop and test
When you find 1 working ,you win 😆
 
5h mowing and no rtc faults. I have option to choose (true/false) change mowpattern or not. It's false now but still somehow it goes to lanes?
Code:
    if ((ChangeMowPattern) && (mowPatternDuration > mowPatternDurationMax))
    {
      Console.print(" mowPatternCurr change to ");
      mowPatternCurr = (mowPatternCurr + 1) % 2; //change the pattern each x minutes
      Console.println(mowPatternCurr);
      mowPatternDuration = 0;
    }
Code:
19:58:45 1.710653] NORMALMOWING / FRWODO
[19:58:48 3.383637] 23603420 Rotation direction Left / Right change 
[19:58:49 0.617134] NORMALMOWING / FINDYAWSTOP
[19:58:51 1.857001]  imu.comYaw 253.78 imu.ypr.yaw 246.20 distancePI(imu.comYaw, imu.ypr.yaw) -0.08
[19:58:51 0.021735] NORMALMOWING / ROLLTOFINDYAW
[19:58:54 3.406592] NORMALMOWING / STOPCALIB
[19:58:54 0.068751] NORMALMOWING / AUTOCALIB
[19:58:59 4.634763] 4 sec of read value, verify if the drift is stop
[19:58:59 0.010112] Drift is OK
[19:58:59 0.002631] NORMALMOWING / FRWODO
[19:59:10 10.784232] Motor Left current is 80 % of the max, value --> 52.46
[19:59:10 0.013799] NORMALMOWING / STOPONBUMPER
[19:59:10 0.580864] NORMALMOWING / POUTREV
[19:59:16 5.596126] Warning can't peri out rev in time 
[19:59:16 0.008260] NORMALMOWING / LANEROL1
[19:59:16 0.006023] WARNING PROTECTION ON LEFT MOTOR   motorLeftPWMCurr=-60  pwmLeft=60 state LANEROL1
[19:59:22 5.732189] Warning can't Roll1 by lane in time 
[19:59:22 0.015392] NORMALMOWING / NEXTLANE
[19:59:29 7.368269] Warning can't reach next lane in time 
[19:59:29 0.009741] NORMALMOWING / LANEROL2
[19:59:29 0.005444] WARNING PROTECTION ON RIGHT MOTOR   motorRightPWMCurr=76  pwmRight=-60  On state LANEROL2
[19:59:33 4.156108] Warning can't make the roll2 in time

And tried wire mowing but something happen and mower stopped mowing and tracked back home
Code:
[18:03:07 0.008270] WIREMOWING / STOPTOTRACK
[18:03:09 2.324796] WIREMOWING / ROLLTOTRACK
[18:03:11 1.927901] WIREMOWING / ROLLSTOPTOTRACK
[18:03:12 0.984391] WIREMOWING / PTRK
[18:03:14 1.763472] WARNING PROTECTION ON RIGHT MOTOR   motorRightPWMCurr=16  pwmRight=-8  On state PTRK
[18:08:35 20.482604] Motor Left current is 80 % of the max, value --> 52.02
[18:08:35 0.011026] Power motor left warning 
[18:08:35 0.005210] Total distance drive 61 meters 
[18:08:35 0.008824] Total duration 322 secondes 
[18:08:35 0.007905] WIREMOWING / STCHK
[18:08:38 3.074291] Warning can't make the station check in time 
[18:08:38 0.009277] WIREMOWING / POBSREV
[18:08:38 0.006014] WARNING PROTECTION ON LEFT MOTOR   motorLeftPWMCurr=60  pwmLeft=-60 state POBSREV
[18:08:40 2.622603] WIREMOWING / POBSROLL
[18:08:42 1.569416] WIREMOWING / POBSFRWD
[18:08:43 1.011657] WIREMOWING / POBSCIRC
[18:08:46 2.795716] Area In Mowing 1 Area To Go 1
[18:08:46 0.006326] WIREMOWING / PFND
[18:08:52 5.869438] Not inside so start to track the wire
[18:08:52 0.007869] BACKTOSTATION / STOPTOTRACK
[18:08:53 1.599209] BACKTOSTATION / ROLLTOTRACK
[18:08:55 1.409772] BACKTOSTATION / ROLLSTOPTOTRACK
[18:08:55 0.549219] BACKTOSTATION / PTRK
 
where did you buy your charger ?
Can you help me here :
For li-ion the charger manager the sense ,but what's append if the PCB1.3 use a small amount of this sense.
Maybe the charger think the bat is full and it's not the reality ???

I have option to choose (true/false) change mowpattern or not. It's false now but still somehow it goes to lanes?
Change is also possible when Autocalibration fail but normaly it initialize to random and not lane.

And tried wire mowing but something happen and mower stopped mowing and tracked back home

See my last change
When tracking or perifind if drive motor power >80% the mower generate obstacle Avoid when tracking.
But i need to remember that it was a WireMowing to reset it after the mower find again the wire.

In your Console there are warning.

Not really normal.
1 - "Motor Left current is 80 % of the max" the setting motor Power max (or maybe you have some obstacle that the bumper fail to manage).It's better if it's never append.
Possible if you have a very smooth movement
2 - "Warning can't make the xxxxx in time" the setting motor (Redo the Calib Ticks/Second) or increase the Speed Odo Minimum
 
I have two chargers. One from shop (1,5A) and on from ebay (china, 3A). http://www.topbikekit.com/t120-char...or-lifepo4-liion-lead-acid-battery-p-206.html
Li-ion charging is two stage process. First 'constant current' until voltage rise, then 'constant voltage' until current is low enough. If there is additional current consumption affect is opposite, charging last longer? pcb electronics and software cut off charging 'too early', sometimes it should last 12h or something like that for cell balance.

Maybe I have to rise power limit little bit, it's now 'quite tight'. odo min is 60 now, I'll try 70 and new ticks/sec calibration.
After autocalib compas theres no accelerate, mower almost jump forward :) should I turn off mow motors during calib.?
 
Oben