ERR_BATTERY - PCB1.3 | Azurit1.0a7

joachim

Member
Hallo,
ich komme nicht weiter und würde mich über Hilfe zu dem Fehler ERR_BATTERY freuen :) .
- J8 habe ich auf "auto" gesetzt.
- Mit dem Taster und auch mit arduremote kann ich den Mower aktivieren und die Motoren drehen.
- einen Auszug aus der seriellen Konsole habe ich beigefügt
Ich verstehe nicht, warum ein Fehler kommt, muss ich da vielleicht noch was kalibrieren?
Gruß Joachim

ADCMan: found calib data
---ADC calib---
ADC sampleRate=38462
AD0 min=9999 max=-9999 diff=-19998 ofs=0
AD1 min=9999 max=-9999 diff=-19998 ofs=0
AD2 min=9999 max=-9999 diff=-19998 ofs=0
AD3 min=9999 max=-9999 diff=-19998 ofs=0
AD4 min=9999 max=-9999 diff=-19998 ofs=507
AD5 min=9999 max=-9999 diff=-19998 ofs=776
AD6 min=9999 max=-9999 diff=-19998 ofs=0
AD7 min=9999 max=-9999 diff=-19998 ofs=0
AD8 min=9999 max=-9999 diff=-19998 ofs=0
AD9 min=9999 max=-9999 diff=-19998 ofs=0
AD10 min=9999 max=-9999 diff=-19998 ofs=0
AD11 min=9999 max=-9999 diff=-19998 ofs=0
SETUP
matchSignal size=24
subSample=4
capture size=192
1 0 -1 0 1 -1 1 -1 0 1 -1 1 0 -1 0 1 -1 0 1 -1 0 1 0 -1
IMU error: no calib data
--------
accOfs=0.00,0.00,0.00
accScale=2.00,2.00,2.00
comOfs=0.00,0.00,0.00
comScale=2.00,2.00,2.00
--------
initL3G4200D
gyro read error
gyro read error
gyro read error
loadSaveErrorCounters: read
loadSaveErrorCounters addrstop=422
loadUserSettings
loadSaveUserSettings addrstop=313
loadSaveRobotStats: read
loadSaveRobotStats addrstop=826
START
Ardumower 1.0a7-Azurit PCB 1.3 Arduino Due IOREF=3.30
Robot: Ardumower
press...
d for menu
v to change console output (sensor counters, values, perimeter etc.)
sen_counters
Battery warning: triggered batSwitchOffIfBelow
loadSaveErrorCounters: write
loadSaveErrorCounters addrstop=422
loadSaveRobotStats: write
loadSaveRobotStats addrstop=826
BATTERY switching OFF
t 4 L 0 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat -43.-8 chg 938.3 50.8 imu 0 adc 0 Ardumower
ERR_BATTERY
loadSaveRobotStats: write
loadSaveRobotStats addrstop=826
t 0 L 0 m0 STAT rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat -43.-8 chg 938.3 50.8 imu 0 adc 0 Ardumower
BATTERY switching ON again
t 0 L 0 m0 STAT rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.5 chg 938.3 50.8 imu 0 adc 14 Ardumower
loadSaveRobotStats: write
loadSaveRobotStats addrstop=826
t 0 L1641 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.5 chg 0.0 0.0 imu 0 adc 0 Ardumower
t 0 L1641 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.4 chg 0.0 0.0 imu 0 adc 71 Ardumower
t 1 L17915 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.4 chg 0.0 0.0 imu 0 adc100 Ardumower
t 2 L25667 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.4 chg 0.0 0.0 imu 0 adc100 Ardumower
t 3 L25077 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.4 chg 0.0 0.0 imu 0 adc100 Ardumower
t 4 L24537 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.4 chg 0.0 0.0 imu 0 adc100 Ardumower
ERR_BATTERY
t 5 L24804 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.4 chg 0.0 0.0 imu 0 adc100 Ardumower
t 6 L24338 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.4 chg 0.0 0.0 imu 0 adc100 Ardumower
t 7 L24228 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.4 chg 0.0 0.0 imu 0 adc100 Ardumower
t 8 L23919 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.4 chg 0.0 0.0 imu 0 adc100 Ardumower
t 9 L24206 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 27.4 chg 0.0 0.0 imu 0 adc100 Ardumower
ERR_BATTERY
 
Hallo Joachim,
kannst Du bitte noch schreiben was Du einsetzt einen Mega oder einen DUE?
Hast Du die RTC auf der 1.3 gesteckt?
Der ADC muss einmal kalibriert werden.
Hast Du die ArduMower APP und BT zur Verfügung?

Grüße
Jürgen
 
Hi.
Maybe a rtc eeprom issue.
With option d enter in the console menu.
Do a factory setting anb shut down the power ,do not forget to disconnect the usb
After restart do a save setting.
Check that the Rtc eeprom work by changing some value with arduremote and shut down the power.
By.
 
Hallo Jürgen und Bernard,
kannst Du bitte noch schreiben was Du einsetzt einen Mega oder einen DUE?
==> einen DUE habe ich
Hast Du die RTC auf der 1.3 gesteckt?
==> Ja
Der ADC muss einmal kalibriert werden.
==> ADC habe ich jetzt noch mal gemacht
Hast Du die ArduMower APP und BT zur Verfügung?
==> Ja, App und BT läuft

I have done a factory setting and shut down the power incl. the usb and after restart a save setting.
When i change the date to the actual date of today (with arduremote) the old date sun 01.01.2013, 12:00 appears again.

Beste Grüße
Joachim
 
Hi Joachim.

The Main test you need to do is check if the RTC eeprom work (maybe a I2C issue).
Remove IMU and the jumper for it to be sure it's not I2C bus error.
Into Arduremote change a value, for example set the MaxPWM of motor at 10.
Shut down all.
If the value is again 10 on the next startup the EEprom is OK.
So only after you can setup the Battery Setting.
By.
 
Hi Bernard,
actually i do not have an IMU. I have checked, that no jumper for IMU is set.
Then I have done the test with MaxPWM at 10, but after reboot the old value of 255 is there again.
Do you have any idea?
Joachim
 
Certainly RTC issue.
The EEprom is use to store data with the DUE.
If possible test with a new RTC.
If not you can test the I2C bus to check the RTC with i2cscanner software (look on Google or check with the 3 version into the ZIP,i don't remember the correct one for DUE)
The result need to show the 2 i2c adress : the 24C32 eeprom and DS1307 clock
By
i2ctest.zip

Attachment: https://forum.ardumower.de/data/media/kunena/attachments/3545/i2ctest.zip/
 
Zuletzt bearbeitet von einem Moderator:
Hi Bernard,

thanks for the I2CScan.zip. I have tried the three I2CScan files. The I2CSCANNER could not be compiled and throws the error "stray '302' in program". Because i couldn't detect any weird characters in the code, i searched for the code with google and found it also there.

When i let the sketch run the result is: "No I2C devices found". Looking to the program code i found that "Wire.endTransmission" gives "2" instead a "0" in combination with the DUE. So it is clear, that the program gives no result for I2C-devices. This seems to be an issue with the DUE.
i will keep on testing...

greetings Joachim
 
Auf der Suche nach einer Lösung für das Problem bin ich in der Software unter "codetestsrtc" auf "rtc.ino" gestossen. Mutig in der Annahme, dass dieses das geeignete Testprogramm ist, um das RTC-Modul zu testen, habe ich das dann mal laufen lassen.
Ergebnis: "error: no RTC module found" (Meldung der seriellen Konsole siehe unten)
Was nun???
Modul neu kaufen???

Gruß Joachim :(

START
RTC default address=104
testing address=81
testing address=82
testing address=83
testing address=84
testing address=85
testing address=86
testing address=87
testing address=88
testing address=89
testing address=90
testing address=91
testing address=92
testing address=93
testing address=94
testing address=95
testing address=96
testing address=97
testing address=98
testing address=99
testing address=100
testing address=101
testing address=102
testing address=103
testing address=104
testing address=105
testing address=106
testing address=107
testing address=108
testing address=109
testing address=110
testing address=111
testing address=112
testing address=113
testing address=114
testing address=115
testing address=116
testing address=117
testing address=118
testing address=119
testing address=120
testing address=121
testing address=122
testing address=123
testing address=124
testing address=125
testing address=126
error: no RTC module found
 
Hi
The code into the folder sketch_jul30c work perfectly into my DUE and PCB1.3.
The result without IMU is

Code:
I2C Scanner
Scanning...
I2C device found at address 0x50
I2C device found at address 0x68
64
Scanning...
I2C device found at address 0x50
I2C device found at address 0x68
578
Scanning...
I2C device found at address 0x50
I2C device found at address 0x68
1092

and you need to have the same value 0x50 and 0x68..
Maybe need to add the wire Library into your IDE to make it compile.
By.
 
Hi,
thks, now i know, which file to use.
Here is the result:

Code:
I2C Scanner
Scanning...
No I2C devices found

I will order a new RTC to compare.
by Joachim
 
Hi,
i am back again. Today i have got a new RTC-module.
For testing i have disconnected all sensors and motors from the PCB to eliminate other errors.
Now the I2CScan "sketch_jul30c" gets a result:


Code:
Scanning...
I2C device found at address 0x50
I2C device found at address 0x68
9316
Scanning...
I2C device found at address 0x50
I2C device found at address 0x68
9830


As the next step i followed your proposal and i have changed a value in arduremote, and set the MaxPWM of motor at 10.
Then i shut down all. The value was not stored. Old value of 255 appears again.

Because i have found the message "Battery warning: triggered batSwitchOffIfBelow" in the console, i have added a few lines in the code to show the actual values of the if condition. The "batVoltage" shows -43.89.
I do not know why.....

Code:
START
Ardumower 1.0a7-Azurit  PCB 1.3  Arduino Due  IOREF=3.30
Robot: Ardumower
press...
  d for menu
  v to change console output (sensor counters, values, perimeter etc.)
sen_counters
--> batVoltage: -43.89 batSwitchOffIfBelow: 21.70
--> idleTimeSec: 0 BATTERY_SW_OFF: -1
Battery warning: triggered batSwitchOffIfBelow
loadSaveErrorCounters: write
loadSaveErrorCounters addrstop=422
loadSaveRobotStats: write
loadSaveRobotStats addrstop=826
BATTERY switching OFF
t     4 L  0 m0 OFF  rpm    0    0 set    0    0 sen    0    0    0 bum    0    0 dro    0    0 son   0 yaw   0 pit   0 rol   0 bat -43.-8 chg 938.3 50.8 imu  0 adc  0 Ardumower
ERR_BATTERY
loadSaveRobotStats: write


Joachim
 
Hi
After changing the rtc you need a factory setting to start from correct value.
Respect this order.
After click on factory setting shutdown the power,restart,click on save setting and now it s ok you can do the adc calib.
 
Hi Bernard,
i think, i did not have the right order of commands.
Now i seems to work, the ERR_BATTERY is not appearing.
Example changes in maxpwm were visible after restart too.
Tomorrow i will test more.
Thank you and have a nice evening :)
Joachim
 
I have the same problem... but no result...

PCB 1.3
Due
Azurit 1.0a7

speed max pwm to 10, remains in arduremote
time remains correct in arduremote

Did factory reset with arduremote
saved settings
disconnected everything

then ADC calibration (do I have to change something there) on arduremote
save settings and disconnect...

still this batt error

see serial monitor...
ADCMan: found calib data
---ADC calib---
ADC sampleRate=38462
AD0 min=9999 max=-9999 diff=-19998 ofs=0
AD1 min=9999 max=-9999 diff=-19998 ofs=0
AD2 min=9999 max=-9999 diff=-19998 ofs=0
AD3 min=9999 max=-9999 diff=-19998 ofs=0
AD4 min=9999 max=-9999 diff=-19998 ofs=476
AD5 min=9999 max=-9999 diff=-19998 ofs=511
AD6 min=9999 max=-9999 diff=-19998 ofs=0
AD7 min=9999 max=-9999 diff=-19998 ofs=0
AD8 min=9999 max=-9999 diff=-19998 ofs=0
AD9 min=9999 max=-9999 diff=-19998 ofs=0
AD10 min=9999 max=-9999 diff=-19998 ofs=0
AD11 min=9999 max=-9999 diff=-19998 ofs=0
SETUP
matchSignal size=24
subSample=4
capture size=192
1 0 -1 0 1 -1 1 -1 0 1 -1 1 0 -1 0 1 -1 0 1 -1 0 1 0 -1
IMU error: no calib data
--------
accOfs=0.00,0.00,0.00
accScale=2.00,2.00,2.00
comOfs=0.00,0.00,0.00
comScale=2.00,2.00,2.00
--------
initL3G4200D
gyro read error
gyro read error
gyro read error
loadSaveErrorCounters: read
loadSaveErrorCounters addrstop=422
loadUserSettings
loadSaveUserSettings addrstop=313
loadSaveRobotStats: read
loadSaveRobotStats addrstop=826
START
Ardumower 1.0a7-Azurit PCB 1.3 Arduino Due IOREF=3.30
Robot: Ardumower
press...
d for menu
v to change console output (sensor counters, values, perimeter etc.)
sen_counters
RTC date received: Sun 15.04.2018
Battery warning: triggered batSwitchOffIfBelow
loadSaveErrorCounters: write
loadSaveErrorCounters addrstop=422
loadSaveRobotStats: write
loadSaveRobotStats addrstop=826
BATTERY switching OFF
t 4 L 0 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat -1014.-4 chg -569.0 -6.0 imu 0 adc 0 Ardumower
ERR_BATTERY
t 5 L 0 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 26.5 chg 0.0 0.0 imu 0 adc100 Ardumower
t 6 L26004 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 26.5 chg 0.0 0.0 imu 0 adc100 Ardumower
t 7 L27042 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 26.5 chg 0.0 0.0 imu 0 adc100 Ardumower
t 8 L27012 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 26.5 chg 0.0 0.0 imu 0 adc100 Ardumower
t 9 L27013 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 26.5 chg 0.0 0.0 imu 0 adc100 Ardumower
t 10 L27013 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 26.5 chg 0.0 0.0 imu 0 adc100 Ardumower
ERR_BATTERY
t 11 L27013 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 26.5 chg 0.0 0.0 imu 0 adc100 Ardumower
t 12 L26825 m0 OFF rpm 0 0 set 0 0 sen 0 0 0 bum 0 0 dro 0 0 son 0 yaw 0 pit 0 rol 0 bat 26.5 chg 0.0 0.0 imu 0 adc100 Ardumower



what should I do?...

greetz, Peter
 
Hi Peter.
The IMU is not connected so:
Go to arduremote and Setting IMU and put Use to NO.
Verify all the setting and activate only what is really connected to the PCB1.3 (Bumper,Sonar etc.....).
Save the Setting.
Completly restart.
Into the console use option d and x to read all the setting value and check the batSwitchOffIfBelow value.
Copy and show me the result.
JP8 is Autom or ON ??
By.
 
Hi Bernard,

IMU was already "NO"
No sensors connected ("NO") (see list below)
batSwitchOffIfBelow: 21.70
JP8 = "Dauer-on", not "Autom"
I have sent you a private message a few days ago...

This are the results

---------- wheel motors --------------------------------------
motorAccel : 1000.00
motorSpeedMaxRpm : 25
motorSpeedMaxPwm : 255
motorPowerMax : 75.00
motorSenseRightScale : 6.15
motorSenseLeftScale : 6.15
motorPowerIgnoreTime : 2000
motorZeroSettleTime : 3000
motorRollTimeMax : 1500
motorRollTimeMin : 750
motorReverseTime : 1200
motorForwTimeMax : 80000
motorBiDirSpeedRatio1 : 0.30
motorBiDirSpeedRatio2 : 0.92
motorLeftPID.Kp : 1.50
motorLeftPID.Ki : 0.29
motorLeftPID.Kd : 0.25
motorRightSwapDir : 0
motorLeftSwapDir : 0
---------- mower motor ---------------------------------------
motorMowForceOff : 0
motorMowAccel : 2000.00
motorMowSpeedMaxPwm : 255
motorMowPowerMax : 75.00
motorMowModulate : 0
motorMowRPMSet : 3300
motorMowSenseScale : 6.15
motorMowPID.Kp : 0.00
motorMowPID.Ki : 0.01
motorMowPID.Kd : 0.01
---------- motorMowModulate Interrupt ------------------------
motorMowModulate Interrupt :
---------- bumper --------------------------------------------
bumperUse : 0
---------- drop ----------------------------------------------
dropUse : 0
dropContact : 1
---------- rain ----------------------------------------------
rainUse : 0
---------- sonar ---------------------------------------------
sonarUse : 0
sonarLeftUse : 1
sonarRightUse : 1
sonarCenterUse : 0
sonarTriggerBelow : 0
sonarSlowBelow : 100
---------- perimeter -----------------------------------------
perimeterUse : 0
perimeterTriggerTimeout : 0
perimeterOutRollTimeMax : 2000
perimeterOutRollTimeMin : 750
perimeterOutRevTime : 2200
perimeterTrackRollTime : 1500
perimeterTrackRevTime : 2200
perimeterPID.Kp : 51.00
perimeterPID.Ki : 12.50
perimeterPID.Kd : 0.80
trackingPerimeterTransitionTimeOut : 0
trackingErrorTimeOut : 10000
trackingBlockInnerWheelWhilePerimeterStruggling : 1
---------- lawn sensor ---------------------------------------
lawnSensorUse : 0
---------- IMU (compass/accel/gyro) --------------------------
imuUse : 0
imuCorrectDir : 0
imuDirPID.Kp : 5.00
imuDirPID.Ki : 1.00
imuDirPID.Kd : 1.00
imuRollPID.Kp : 0.80
imuRollPID.Ki : 21.00
imuRollPID.Kd : 0.00
---------- model R/C -----------------------------------------
remoteUse : 1
---------- model R/C Interrupt --------------------------------
Pin 10 pinRemoteSpeed :
Pin 11 pinRemoteSteer :
Pin 12 pinRemoteMow :
Pin 52 pinRemoteSwitch :
---------- battery -------------------------------------------
batMonitor : 1
batGoHomeIfBelow : 23.70
batSwitchOffIfBelow : 21.70
batSwitchOffIfIdle : 1
batFactor : 0.35
batChgFactor : 0.35
batFull : 29.40
batChargingCurrentMax : 1.60
batFullCurrent : 0.20
startChargingIfBelow : 27.10
chargingTimeout : 2147483647
chgFactor : 0.02
---------- charging station ----------------------------------
stationRevTime : 1800
stationRollTime : 1000
stationForwTime : 1500
stationCheckTime : 1700
---------- odometry ------------------------------------------
odometryUse : 1
twoWayOdometrySensorUse : 0
odometryTicksPerRevolution : 530
odometryTicksPerCm : 3.37
odometryWheelBaseCm : 36.00
---------- Odometry Interrupt ---------------------------------
oneway left : Oneway right : twoway left : twoway right : ---------- GPS -----------------------------------------------
gpsUse : 0
stuckIfGpsSpeedBelow : 0.20
gpsSpeedIgnoreTime : 5000
---------- other ---------------------------------------------
buttonUse : 1
---------- user-defined switch -------------------------------
userSwitch1 : 0
userSwitch2 : 0
userSwitch3 : 0
---------- timer ---------------------------------------------
timerUse : 1
---------- bluetooth-----------------------------------------
bluetoothuse : 1
---------- esp8266 ------------------------------------------
esp8266Use : 0
esp8266ConfigString : 123test321
---------- robot stats ---------------------------------------
statsMowTimeMinutesTrip : 2
statsMowTimeMinutesTotal : 2
statsBatteryChargingCounterTotal : -1
statsBatteryChargingCapacityTrip in mAh : 0.00
statsBatteryChargingCapacityTotal in Ah : 0.00
statsBatteryChargingCapacityAverage in mAh : 0.00
DONE
 
Hi,
i decided to live with the ERR_BATTERY. When i start the mower, i do an error-reset with the arduremote and then he mower is working.

Just for testing i have installed the version 1.0a8. With this version i get no error for the battery at startup.
rgds
Joachim
 
Hi Joachim.
If the issue occur only on startup ,maybe it's a bug.

The Batvoltage use a low-pass filter:
Robot.cpp line 568:

Code:
double accel = 0.01;
		//double accel = 1.0;
    if (abs(batVoltage-batvolt)>5)   batVoltage = batvolt; else batVoltage = (1.0-accel) * batVoltage + accel * batvolt;


But on the first start the value is 0 so it's take a delay to find a correct value.
What is Strange is that you are the first to find this ?? , maybe in your config a lot of option are not use so the DUE run very fast.

To help maybe you can try to initialise the batvoltage with 24V instead of 0
It's line 157 in robot.cpp

Code:
batADC = 0;
  //batVoltage = 0;
  batVoltage = 24;
  batRefFactor = 0;

By.
 
Oben