RL2000 goes Teensy

I forgot the settings.
Code:
---------- wheel motors -----------
motorAccel                 : 1500.00
motorSpeedMaxRpm           : 30.00
motorSpeedMaxPwm           : 108.00
motorPowerMax              : 50.00
motorSenseRightScale       : 1.87
motorSenseLeftScale        : 1.65
motorPowerIgnoreTime       : 2000.00
motorZeroSettleTime        : 2000.00
motorRollDegMax            : 100.00
motorRollDegMin            : 20.00
DistPeriOutRev             : 40.00
DistPeriOutStop            : 15.00
motorForwTimeMax           : 120000.00
DistPeriObstacleAvoid      : 100.00
circleTimeForObstacle      : 4000.00
motorRightOffsetFwd        : 0.00
motorRightOffsetRev        : 0.00
SpeedOdoMin                : 50.00
SpeedOdoMax                : 140.00
motorTickPerSecond         : 200.00
motorLeftPID.Kp            : 1.00
motorLeftPID.Ki            : 0.40
motorLeftPID.Kd            : 0.00
motorRightSwapDir          : 0.00
motorLeftSwapDir           : 1.00
motorRightOffsetFwd        : 0.00
motorRightOffsetRev        : 0.00
autoAdjustSlopeSpeed       : 1.00

---------- mower motor -----------------
motorMowForceOff         : 0.00
motorMowAccel            : 1000.00
motorMowSpeedMaxPwm      : 115.00
(motorMowSpeedMinPwm     : 100.00
motorMowPowerMax         : 65.00
highGrassSpeedCoeff      : 0.70
---------- bumper -----------------
bumperUse           : 0.00
bumper_rev_distance : 0.00
---------- rain ----------------
rainUse             : 0.00
----------  Temperature ---
MaxTemperature     : 55.00
Enable_Screen        : 0.00
---------- sonar ---------------
sonarUse              : 0.00
sonarLikeBumper       : 0.00
sonarLeftUse        : 1.00
sonarRightUse       : 1.00
sonarCenterUse      : 0.00
sonarTriggerBelow   : 87.00
sonarToFrontDist    : 30.00

---------- perimeter ------
perimeterUse             : 0.00
perimeterTriggerMinSmag  : 50.00
MaxSpeedperiPwm          : 85.00
perimeterTrackRollTime   : 1500.00
perimeterTrackRevTime    : 2200.00
perimeterPID.Kp          : 16.50
perimeterPID.Ki          : 8.00
perimeterPID.Kd          : 0.00
trackingPerimeterTransitionTimeOut: 1500.00
trackingErrorTimeOut     : 10000.00
perimeterMagMaxValue     : 5000.00
swapCoilPolarityRight    : 0.00
swapCoilPolarityLeft     : 0.00
read2Coil                : 0.00
trackingBlockInnerWheelWhilePerimeterStrug : 1.00
DistPeriOutRev           : 40.00
DistPeriObstacleRev      : 30.00
DistPeriOutForw          : 60.00
DistPeriObstacleForw     : 25.00
---------- By Lanes mowing ----------
yawSet1                   : 45.00
yawSet2                   : 90.00
yawSet3                   : 135.00
yawOppositeLane1RollRight : -138.00
yawOppositeLane2RollRight : -92.00
yawOppositeLane3RollRight : -42.00
yawOppositeLane1RollLeft  : -133.00
yawOppositeLane2RollLeft  : -88.00
yawOppositeLane3RollLeft  : -47.00
DistBetweenLane           : 38.00
maxLenghtByLane           : 9.00

---------- IMU (compass/accel/gyro) ----
imuUse                : 0.00
CompassUse            : 0.00
stopMotorDuringCalib  : 0.00
imuDirPID.Kp          : 4.40
imuDirPID.Ki          : 3.30
imuDirPID.Kd          : 0.00
maxDriftPerSecond     : 0.05
delayBetweenTwoDmpAutocalib : 360.00
maxDurationDmpAutocalib     : 60.00
compassRollSpeedCoeff       : 40.00
---------- model R/C ---------
remoteUse                   : 0.00
---------- battery -------- 
batMonitor           : 1.00
batGoHomeIfBelow     : 24.30
batSwitchOffIfBelow  : 23.00
batSwitchOffIfIdle   : 60.00
batFactor            : 1.00
batChgFactor         : 1.00
batFull              : 29.40
batVoltageToStationStart: 0.00
batChargingCurrentMax: 2.00
batFullCurrent       : 0.05
startChargingIfBelow : 25.00
chargingTimeout      : 36000000.00
chargingMaxDuration  : 10.00
stationHeading       : 0.00
batSenseFactor       : 1.11
---------- charging station ----------------------------------
stationRevDist     : 50.00
stationRollAngle   : 45.00
stationForwDist    : 30.00
stationCheckDist   : 2.00
UseBumperDock      : 0.00
dockingSpeed       : 60.00
checkDockingSpeed  : 0.00
autoResetActive    : 0.00

---------- odometry ------------------------------------------
odometryTicksPerRevolution : 2070.00
odometryTicksPerCm         : 29.60
odometryWheelBaseCm        : 43.00
---------- RFID -----------
rfidUse         : 0.00
---------- RASPBERRY PI------
RaspberryPIUse  : 0.00
---------- MQTT        ------
useMqtt  : 0.00
---------- GPS -----------------------------------------------
gpsUse                                     : 0.00
stuckIfGpsSpeedBelow                       : 0.20
gpsSpeedIgnoreTime                         : 5000.00
---------- other ------------
buttonUse              : 0.00
mowPatternDurationMax  : 120.00
---------- user-defined switch -------
userSwitch1       : 0.00
userSwitch2       : 0.00
userSwitch3       : 0.00
---------- timer -----------
timerUse       : 0.00
---------- robot stats ---------------------------------------
statsMowTimeMinutesTrip                    : 0.00
statsMowTimeMinutesTotal                   : 300.00
statsBatteryChargingCounterTotal           : 10.00
statsBatteryChargingCapacityTrip in mAh    : 0.00
statsBatteryChargingCapacityTotal in Ah    : 10.00
statsBatteryChargingCapacityAverage in mAh : 1000.00
DONE
 
New update on RL2000 rebuild.
After all test were successful with the Teensymower firmware, I tried to use sunray from @Bernard github. Compiling an uploading works perfectly and I got GPS fix :)
So far so good. Then I start testing the motors and all of them are chattering with a high current (as I saw later), also I need to change the polarity of one drive-motor.
As I tested the mow-motors, I got the same chattering and it results in the holy smoke of D5 on the power pcb.
20240407_161329.jpg

Can anybody help the find the reason of this strange "chattering" of the motors?


Any help is appreciatet.
 

Attachments

  • config.txt
    37.7 KB · Views: 2
The same "chattering" as in this Post?

Does Sunray also have a factory reset?
Do you also have settings for motor drivers etc.?

Perhaps @Bernard can tell you more about this, as he also uses Sunray.
 
New update on RL2000 rebuild.
After all test were successful with the Teensymower firmware, I tried to use sunray from @Bernard github. Compiling an uploading works perfectly and I got GPS fix :)
So far so good. Then I start testing the motors and all of them are chattering with a high current (as I saw later), also I need to change the polarity of one drive-motor.
As I tested the mow-motors, I got the same chattering and it results in the holy smoke of D5 on the power pcb.
View attachment 1272

Can anybody help the find the reason of this strange "chattering" of the motors?


Any help is appreciatet.
It's very strange i use the RL2000 with the same config and no issue except the SD Card not always OK
I use VSCode to compile the code.
Here my last code version with config.h and directly the firmware.hex, Try to use directly my firmware.hex with teensyloader to see if it's not a compilation issue.


Take a look at the console to see if there is a message ?.
All the setting are locate into config.h.
First test in manual mode and with 0.2 m/s speed Wheel need to rotate perfectly smooth.

You can reduce the max mowpwm into config.h
#define MAX_MOW_PWM 50 // use this to permanently reduce mowing motor power (255=max)
 

Attachments

  • sunray teensy.zip
    1.9 MB · Views: 1
The same "chattering" as in this Post?

Does Sunray also have a factory reset?
Do you also have settings for motor drivers etc.?

Perhaps @Bernard can tell you more about this, as he also uses Sunray.
@Sascha no, different, more like Start-Stop-Start-Stop
I will repair my Power-PCB and test again with @Bernard suggestions.
May the battery is not strong enough? I use a LiFePo4 battery with 6Ah and nom. 25,5V.
 
It's very strange i use the RL2000 with the same config and no issue except the SD Card not always OK
I use VSCode to compile the code.
Here my last code version with config.h and directly the firmware.hex, Try to use directly my firmware.hex with teensyloader to see if it's not a compilation issue.
I'm using VS-Code too and will try your precompiled firmware - Thanks for that.
I will fix the Power PCB and test it again.
 
I did a mistake on assembling the Power-PCB, the Schottky diodes are 1A types only :( so I need to change D3 and D5 which I need to order first.
My try (without motors connected) with bridged D5 results in smoke of Q3 too.
Than I connected 5V only to the main PCB and I think all the devices still ok.


Code:
trying to detect Bluetooth 4.0/BLE (HM-10 module) (make sure your phone is NOT connected)115200...
BLE: AT
OK     
Bluetooth 4.0/BLE (HM-10) module found!
BLE: AT+VERSION
+VERSION=ESP32 firmware V0.4.5,Bluetooth V4.0 LE
BLE: AT+NAMETeensyRay
+NAME=TeensyRay     
RCModel disabled in config
Motor Begin
PID Right Motor kp 2.00 ki 0.03 kd 0.03
ENABLE_PASS
ENABLE_TILT_DETECTION
FREEWHEEL_IS_AT_BACKSIDE: 0
WHEEL_BASE_CM: 42
WHEEL_DIAMETER: 265
ENABLE_ODOMETRY_ERROR_DETECTION: 0
TICKS_PER_REVOLUTION: 2070
MOTOR_FAULT_CURRENT: 6.00
MOTOR_OVERLOAD_CURRENT: 2
USE_LINEAR_SPEED_RAMP: 1
MOTOR_PID_KP: 2.00
MOTOR_PID_KI: 0.03
MOTOR_PID_KD: 0.03
MAX_MOW_PWM: 210
MOW_FAULT_CURRENT: 8.00
MOW_OVERLOAD_CURRENT: 4.00
ENABLE_OVERLOAD_DETECTION: 1
ENABLE_FAULT_DETECTION: 0
ENABLE_FAULT_OBSTACLE_AVOIDANCE: 1
ENABLE_RPM_FAULT_DETECTION: 0
RAIN_ENABLE: 0
BUMPER_ENABLE: 1
BUMPER_DEADTIME: 1000
BUMPER_TRIGGER_DELAY: 0
BUMPER_MAX_TRIGGER_TIME: 30
CURRENT_FACTOR: 0.50
GO_HOME_VOLTAGE: 23.20
BAT_FULL_VOLTAGE: 29.30
BAT_FULL_CURRENT: 0.00
BAT_SWITCH_OFF_IDLE: 1
BAT_SWITCH_OFF_UNDERVOLTAGE: 1
REQUIRE_VALID_GPS: 1
GPS_SPEED_DETECTION: 1
GPS_MOTION_DETECTION: 1
GPS_REBOOT_RECOVERY: 0
GPS_CONFIG: 1
GPS_CONFIG_FILTER: 0
CPG_CONFIG_FILTER_MINELEV: 10
CPG_CONFIG_FILTER_NCNOTHRS: 10
CPG_CONFIG_FILTER_CNOTHRS: 30
ALLOW_ROUTE_OUTSIDE_PERI_METER: 0.30
OBSTACLE_DETECTION_ROTATION: 1
KIDNAP_DETECT: 1
KIDNAP_DETECT_ALLOWED_PATH_TOLERANCE: 1.00
DOCKING_STATION: 1
DOCK_IGNORE_GPS: 0
DOCK_AUTO_START: 1
TARGET_REACHED_TOLERANCE: 0.05
STANLEY_CONTROL_P_NORMAL: 1.10
STANLEY_CONTROL_K_NORMAL: 0.30
STANLEY_CONTROL_P_SLOW: 1.10
STANLEY_CONTROL_K_SLOW: 0.10
BUTTON_CONTROL: 1
USE_TEMP_SENSOR: 0
SERIAL_BUFFER_SIZE=4096 (increase if you experience GPS checksum errors)
-----------------------------------------------------
UBLOX::begin serial
using gps driver: UBLOX
trying to connect to ublox f9p...
NOTE: if GPS is not responding either set 'GPS_CONFIG=false' in config.h or perform GPS wire fix (see Wiki)
trying baud 115200
ERROR: GPS receiver is not responding
trying baud 38400
GPS receiver found!
ublox f9p: sending GPS rover configuration...
idx=0...OK
idx=1...OK
idx=2...OK
config sent successfully
sizeof Point=8
Map Begin
map load... no map file!
map dump - mapCRC=0
points:
perimeter pts: 0

exclusion pts: 0
exclusions: 0

dock pts: 0

mow pts: 0

free pts: 0
mowPointsIdx=0 dockPointsIdx=0 freePointsIdx=0 wayMode=3
probing for ESP8266 (NOTE: will fail for ESP32)...
[WiFiEsp] Initializing ESP module
[WiFiEsp] >>> TIMEOUT >>>
[WiFiEsp] >>> TIMEOUT >>>
[WiFiEsp] >>> TIMEOUT >>>
[WiFiEsp] >>> TIMEOUT >>>
[WiFiEsp] >>> TIMEOUT >>>
[WiFiEsp] Cannot initialize ESP module
[WiFiEsp] >>> TIMEOUT >>>
[WiFiEsp] No tag found
ERROR: WiFi not present
MPU ID=0x68
MPU6050/9150 found
using imu driver: MpuDriver
resuming is activated
state load... ok
Watchdog configuration start
Watchdog configuration Finish
WARN: PID unmet cycle time Ta=22.30 TaMax=0.10
WARN: PID unmet cycle time Ta=22.30 TaMax=0.10
Exceed Control time duration better if < 20 ms : 31050
==> changeOp:ImuCalibration(initiatedByOperator 0)->Idle
IMU gyro calibration (robot must be static)... 1
------ LOOP NOT OK DUE IS OVERLOAD -- Over 1 sec 31051
GPS jump: 1.95
IMU gyro calibration (robot must be static)... 2
SWITCHING OFF (undervoltage) batV=0.00<20.00
Y3
Countdown before Power OFF : 0
Countdown before Power OFF : 1

Now I have to order the Schottkys and rework the power-PCB first.
 
But take care the motor never chatter with a very high current , it can damage the DC/DC 24/5V regulator and send high voltage on all component and destroy everything.

So first test all the motor in manual mode and check the sense into sunray app without the GPS connected (very expensive)

Comment out gps config false or the firmware can't start if gps is not connected.
Code:
//#define GPS_CONFIG   true     // configure GPS receiver (recommended - requires GPS wire fix above! otherwise firmware will stuck at boot!)
#define GPS_CONFIG   false  // do not configure GPS receiver (no GPS wire fix required)
 
Thank you @Bernard I will do like this as soon the new parts are here.
I hope the problems are due to the wrong diodes.
I don't remember exactly,but in the past i see this kind of issue (chattering motor) when compiling with arduino ide, recompiling the same code on VS studio work , so it's possible that a bad library (SDcard or watchdog can cause the problem) .
When motor chattering it can generate reverse voltage on driver and can destroy the diode, but it's only a supposition.

On my side Sunray on teensy code work well except this:
Sdcard fail sometime to record that last map progression.
Near wall or big tree the GPS lost the fix.
When charging sometime sense is note as NaN
 
I don't remember exactly,but in the past i see this kind of issue (chattering motor) when compiling with arduino ide, recompiling the same code on VS studio work , so it's possible that a bad library (SDcard or watchdog can cause the problem) .
When motor chattering it can generate reverse voltage on driver and can destroy the diode, but it's only a supposition.

On my side Sunray on teensy code work well except this:
Sdcard fail sometime to record that last map progression.
Near wall or big tree the GPS lost the fix.
When charging sometime sense is note as NaN
The diode was definetly to small for the current of 3 motors, but I think this causes not the problem with chattering motors. Tomorrow I should receive the new diodes, then I can repair the Power-PCB, but I will check all the drivers and the 5V DC-DC before I do the next test.
In my second "smoke" test, the Q4 was gone, the Gate-pin burnt out - this is a bit strange to me...

Did you update your firmware with the GNSS_v3 fix? May this help with the fix
 
I don't remember exactly,but in the past i see this kind of issue (chattering motor) when compiling with arduino ide, recompiling the same code on VS studio work , so it's possible that a bad library (SDcard or watchdog can cause the problem) .
When motor chattering it can generate reverse voltage on driver and can destroy the diode, but it's only a supposition.
After the modification of the Power-PCB and some hardware-tests I was able to do some more tests. First I tried with the same firmware as before the "holy smoke" and the robot is still chattering (I compiled with VS-Code too). Second I tried @Bernard 's precompiled firmware and this works as expected. Now I will recompile the firmware again and give it a try.
Thanky @Bernard for your tireless help on this.
 
Back
Top