AzuritBer Teensy

Sascha

Administrator
Staff member
Hello dear friends of the DIY robotic mower,
Bernard was kind enough to adapt his current AzuritBer version to the Teensy board.
If you want, you can download the software from Github and test it.
I think Bernard is happy about feedback.
You can find the thread about the Teensy PCB here: Teensy PCB Ardumower
 
It's OK on my side ,I have upload again but without change!
Do you use arduino ide ?
Maybe you have installed a GPS Library in the arduino ide (Certainly the Tiny one )? Try to remove it or show me the compilation output to see if the def in not only local.
OK i see the tinyGPS++ and it's good to know ,so if i need to work again on GPS certainly a take a closer look.
 
I have Arduino IDE 1.8.16 and TinyGPS Libary is installed. I will test it and remove it.

Output of compiling:
 

Attachments

  • error_messages.txt
    14.7 KB · Views: 2
@Bernard ,
will the mower Motor stop when the mower is lifted or tilted or when a certain angle is reached?
I have tilted it 90 degrees a few times now and it wanted to keep going.
Is there anywhere to set this?
 
My first attempt to redirect the console to the web server ("console") already works. I have extended the ShowMessage function. The input string and float are passed to a string which is then placed in the pfod on the webpage. So you can see the all the messages from ShowMessage. It would be even better if you could also redirect Serial.print without having to convert Serial.print to ShowMessage. But I'm missing the point.

Stepper motor odometry seems to work.

Now I guess I'll have to solder a perimeter sensor to continue.
 
@Bernard ,
will the mower Motor stop when the mower is lifted or tilted or when a certain angle is reached?
I have tilted it 90 degrees a few times now and it wanted to keep going.
Is there anywhere to set this?
Yes mow motor is stop for 1 minute and the mower reverse (like a bumper).04.jpg

Here the mow motor plot with stop at 66 Watts (can jump to 80 W for 1 sec) on very high grass.
On start the power move to 40 W and slowly decrease to 20 W on no load 02.jpg
 
My first attempt to redirect the console to the web server ("console") already works. I have extended the ShowMessage function. The input string and float are passed to a string which is then placed in the pfod on the webpage. So you can see the all the messages from ShowMessage. It would be even better if you could also redirect Serial.print without having to convert Serial.print to ShowMessage. But I'm missing the point.

Stepper motor odometry seems to work.

Now I guess I'll have to solder a perimeter sensor to continue.
Do you think it is possible in the ESP32 to record the console on a txt file to see it later : like inside Pyardu ?

Redirect Serial.print is not necessary , simply replace all Serial.print by ShowMessage.print.
The Serial.print is normally present only on startup before the showMessage function is initialised.
 
If pitch and roll are around 80 degrees, wouldn't it be better to make an emergency stop? I mean the mower is not supposed to go up the tree, but when it does and it's on its back like a bug, the wheels still keep turning.
Everything should then stop until it is back on its wheels, then press start and only then continue?

What setting do I need to change so that the mower reverses 50 cm out of the charging station, then turns 50 degrees to the right and starts mowing?
Or do I understand something wrong?
 
If pitch and roll are around 80 degrees,
Normally it's never append at 40 Deg the mower reverse and back to flat surface.
Check the station setting and tell waht you don't understand.
 
Yes, I think you can record the string.
It should be easy to save the data directly to the SD drive of the Teensy.
Now I delete the string if it is larger than 10000 characters.
You could then just save it.

I have already renamed Serial.print. Since the string is already "filled" when the setup is started, the data is not lost even if Serial.begin is not yet running.
 
I take a look to add this possibility on firmware.
The big problem actually is that i don't use the brake option on driver and it's take 10 Second for blade to stop :mad:
Also something is strange ,when mower stay more than 24 Hours on the charging station the battery is low !! (maybe need to disable the motor driver or something is wrong in my battery BMS.)
 
Yes, I have noticed that too. It takes a while for the blade to stop.

Maybe the charging function should just stay on when the mower is in the charging station?
I have a charger for e-bikes that I think switches to trickle charge when the battery is full.
I don't know if the charger on the mower does the same.
 
Yes the Li-ion charger stop the charge when bat is full, so maybe it's a good idea to keep the charging function ON .
 
I have a question about following cables to the station with an obstacle in the way.
I tested this earlier.
It drove against the obstacle, then drove back a short distance and then turned away from the cable to avoid the obstacle. However, it did not turn back towards the cable, but continued straight ahead.
Maybe it was just a coincidence that it didn't work.
 
This can help to understand how code work

Into robot.cpp :

line 3538 to 4853
State is initialised only once after each change

line 5742 to 7366
it's the state loop and code always run the actual state code until find a new state.

So for example from STATE_PERI_OBSTACLE_REV :
Search in code ;
case STATE_PERI_OBSTACLE_REV:
You find it 2 times the initial and the loop.
in the loop you can find the setnextstate sentence : setNextState(STATE_PERI_OBSTACLE_ROLL, RIGHT);

So now search
case STATE_PERI_OBSTACLE_ROLL:
etc .....


In your case

When track and bump (checkBumpersPerimeter) or motor sense >80% of max :
the state change like that :

setNextState(STATE_STATION_CHECK, rollDir);

so
STATE_STATION_CHECK if voltage it's station or reverse:
STATE_PERI_OBSTACLE_REV reverse for 30 cm fix in mower.cpp
STATE_PERI_OBSTACLE_ROLL roll for 45 degres. fix in mower.cpp
STATE_PERI_OBSTACLE_FORW drive straight 25 cm fix in mower.cpp
STATE_PERI_OBSTACLE_AVOID make a circle arc for distance you can adjust into Setting Perimeter


So you can try to increase the value locate into setting perimeter Circle Arc disance (cm) Obstacle while tracking
 
I uploaded the new version and let the Mower mow.
It has now found the charging station, but it hasn't quite hit the charging contacts. I still have to test it a bit.
But otherwise it works much better now.
Now it also charges with 1A. After I changed the settings back to 2A instead of 4.5A.
 
Back
Top