AZURIT FULL ODOMETRY MOUVEMENT CONTROL

Hi.
For the perimeter.
The main coil is the Left One ,so connect your coil to the P12 P.Left.
Into PFOD SETTING
into Perimeter set use to YES
Into Read 2 Coil set NO.
Save setting
Restart the mower.

For the Sonar .
Not tested with SR04 but normaly it's OK.
Maybe You need to adjust value:
Into robot.cpp near line 3940, you need to adjust the min max distance detection of your sonar..
For SR04 value 10 instead of 30 and 80 instead of 150 but you need to verify.
Don't forget into Pfod Sonar to activate and set the value for trigger.
For example if you set 45CM into trigger when the sonar detect object at 45CM it start to brake and stop at 0CM before reverse.



Code:
if (sonarDistCenter < 30 || sonarDistCenter > 150) sonarDistCenter = NO_ECHO; //need to be adjust if sonar is directly in front of mower 25Cm in my case
  if (sonarDistRight < 30 || sonarDistRight > 150) sonarDistRight = NO_ECHO; // Object is too close to the sensor JSN SR04T can't read <20 CM . Sensor value is useless
  if (sonarDistLeft < 30 || sonarDistLeft  > 150) sonarDistLeft = NO_ECHO;



Also
If your sonar is directly on front of the mower into robot.cpp
Change the distance (25) value near line 2900:


Code:
case STATE_SONAR_TRIG: //in auto mode and forward slow down before stop and reverse different than stop because reduce speed during a long time and not immediatly
      justChangeLaneDir = !justChangeLaneDir;
      distToObstacle = distToObstacle - 25; //  25 cm is the distance between sonar and front of mower
      UseAccelLeft = 0;
      UseBrakeLeft = 1;
      UseAccelRight = 0;


If you find the correct working value do not hesitate to tell me so i can add test on the firmware.


IF PFOD can' t work you can change the value into mower.cpp but need upload sketch and a firmware reset.


Hope it's OK.
 
Until I get the perimeter working I will ignore sonar.
I entered the values as you directed and I get 0/0 on the L/R
Yellow led is solid on the sender and I try different positions of the receiver pot and nothing registers. When I try plugging the perimeter receiver in the right channel I get low readings -=10 values on the R channel and 0 on the L channel
Previously I have reduced the voltage on the sender to 9V and I also increased it to 13 volts to see if this was the problem.
The resister is getting warm but not very hot.
Can you advise as I am really interested to see your code working
regards
Max
 
Hi Max.

Sender Side

First to be sure the Yellow Led is (Mower_in_Laderstation) on P3 between 1 and 2
yellowled.jpg


If possible connect the Arduino IDE on the sender and verify into console that Peircurrent value are OK (near 0.5 to 1A) and 0 when disconnect wire
You can also verify that the yellow led switch to OFF and ON when plug and unplug the perimeter wire .

Receiver Side.
Verify with voltmeter that you have 2.5V at the output of the recceiver
On P12
between 1 and 2 --> 5V
between 2 and 3 --> 2.5V approx
If all is OK with console on the mower can you show me the starting and read setting of the mower .
This part need to show perimeterUse=1

Code:
---------- perimeter -----------------------------------------
perimeterUse                               : 1
perimeterTriggerTimeout                    : 0
MaxSpeedperiPwm                    : 180
perimeterTrackRollTime                     : 1500
perimeterTrackRevTime                      : 2200
perimeterPID.Kp                            : 16.50
perimeterPID.Ki                            : 8.00
perimeterPID.Kd                            : 0.00
trackingPerimeterTransitionTimeOut         : 1500
trackingErrorTimeOut                       : 10000

By.
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/3545/yellowled.jpg/
 
Zuletzt bearbeitet von einem Moderator:
Also a precision about how work the setting and EEPROM into AZURIT.

I explain here the User Setting starting at addr 0
but it's same for IMU or error or Stat, only the starting addr is changed.

Code:
Load ErrorCounters
ErrorCounters address Start=500
ErrorCounters address Stop=522
LOAD  UserSettings
UserSettings address Start=0
UserSettings address Stop=401
Load Robot Stats
Robot Stats address Start = 800
Robot Stats address Stop = 826


At the initial and new board first startup .

The NEW RTC eeprom contains ramdom value.
The firmware start and load all parameters from mower.cpp.
After it try to read the eeprom and at first adrr (0) but it can 't find the value 52 (call magic value) so don't read the data and keep the value from mower.cpp (also named factory setting).

If you call the save setting
The firmware write into EEPROM value 52 at addr 0 and continue to write all the variable (near line 300 in robot.cpp) until end (for example 401)

You can now shutdown the power.

At the next startup .
The firmware start and again load all parameters from mower.cpp.
After it try to read the eeprom and at first adrr (0) it find the value 52 (call magic value) so continue to read the data from eeprom and replace the mower.cpp value.

When you use the load factory settings.
The firmware simply replace value 52 at addr 0 by other but don't erase the EEPROM.
By this way at the next startup the firmware didn't find the value 52 and didn't read the EEPROM and keep the variable previously read from mower.cpp(factory setting).

So always shutdown power after use load factory settings, and use save setting immediatly after the mower restart.
If after use load factory you use Save Setting Nothing is changed.


If the eeprom don't work at all, the mower can start but always use mower.cpp setting (factory setting).

Into the last firmware i have deactivated all option like Bluetooth,Perimeter,Sonar,IMU, into mower.cpp(Factory setting) so i can debug code without PCB and only with a DUE connected on the PC.
It's why you need to reactivate all into PFOD and save the setting , but normaly if you do this one TIME all the newer Upload read setting from eeprom and ignore the factory setting.

In normal process you never need to use the load factory settings.

Sorry for my English but it's not really easy to explain
By.
 
Dear Bernard

I forgot to tell you that after I load the firmware I get an eprom error. I have just been cancelling it and moving on. I think your last post may help to get rid go the problem
I will try to implement both of your lastest posts this afternoon as it is raining here in Shropshire. You English works for me and I must owe you a beer by now
Thanks for your help it is appreciated. I am looking forward to this working as you planned it to
Max
 
Into the ZIP of the last firmware you have txt file with my setting so you can compare.

If the eeprom did not work, simply change the USE value to 1 into mower.cpp for perimeter,BT,IMU etc...
 
Dear Bernard
I have one Ardumower and a mini (which is almost set up like the Ardumower) The reason for the mini is it is easier to work on as it is more open.
With both the sender wire led is solid yellow so I see no problem there. When I disconnect the wire to switched off

On the Ardumower the voltage of the receiver is 1.6 volts and on the Mini it is 4.3 volts. On both units the pot seems not to make a difference. These values were measured with the sender being off.

You mentioned that the voltage should be about 2.5 volts. So are my voltages in error..

I tested the Ardumower against the perimeter wire and got goo readings. I was using an earlier version of your firmware.
When I tested the mini with your latest firmware the values are very low and useless. I think the amplifier on the mini is not functioning so I will order another.

Most other things seem to be ok. I will send you a file with the start up from the mini in a separate post
Regards
Max
 
Hi Bernard
The amplifier on my Mini that was not working has been changed and the voltage at the output of the amplifier reads 1.7 volts (this is the same as my Ardumower) As the ardumower is working with this voltage on an other version of your firmware I think this is a software/ settings issue
I will enclose some pictures
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/4262/IMG_1743.jpg/
 
Zuletzt bearbeitet von einem Moderator:
Hi.
You mentioned that the voltage should be about 2.5 volts. So are my voltages in error..

2.5V is read with Voltmeter but here the scope and you can see that max value can be 4.3V, so maybe depend the multimeter (read the averrage ???).

Receiverout_2017-11-12.jpg


What is Strange is the 1.6V and 4.3V, normaly if it's the same receiver you need to have the same result.

Can you confirm that with the old firmware the perimeter is OK ??

Tomorow I read again value form the coil and tell you the result .

The Console is OK, The eeprom work, Did the GY88 work well also ?
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/3545/receiveronthewire_2017-11-12.jpg/
 
Zuletzt bearbeitet von einem Moderator:
Can you confirm that with the old firmware the perimeter is OK ?? Yes the perimeter seems to be working with my full scale Adrumower.

The console is fine and the GY88 is very good. does the 5 revs forward/backward 180 360 turns. All is fine except the perimeter readings.

I am getting an oscilloscope soon so I will be less in the dark

Max
 
One thing I have not tested is the eeprom saving the date and time. Should it be able to hold a current time date and year???

I will test it now

I do not get any eprom errors
 
Hi Max,

when you disable the perimeter signal, the output of the amplifier should be rund about 2.5 V DC.
Have you shorten the capacitor on the amplifier?
The resistor should then have no big influence to this 2.5V DC because you don't receive a signal.
To get max amplification for the signal you should turn the resistor counter clockwise - I think.

Maybe you can send a picture form the top and one form the bottom of the sender.
 
If it' s work with older it's a bug into the last firmware.
I never test with only one coil connected.

So try into perimeter.cpp to force one coil reading.


Code:
void PerimeterClass::run(){
  //bb 1coil read
  for (int idx=0; idx < 1; idx++){
    if (ADCMan.isConvComplete(idxPin[idx])) {
   matchedFilter(idx);
    }
  }
}

For the 2.5V
Like roland say:
Put the sender off and turn the receiver pot to max and maybe more than 1.6V.

And tell me ?
Your Mini is very funny, did the IMU work better on the towel ?
 
Dear Bernard and Roland
I have a confession to make.

On the Mini(NEW FIRMWARE) that reads 4.3 volts I used a receiver amplifier that I made early on and I HAVE shorted the capacitor
I forgot about the shorting issue and last night I replace the amplifier with a new amplifier that was NOT shorted (ie I forgot to do this) . Still it is not working properly.

So I looked at my Full Scale Ardumower (with the Bernard September firmware) and the Amplifier in NOT shorted either however this is working OK with the perimeter. The values are as expected.

So now I am confused

I am now going to short the mini capacitor
take some pictures of the sender and receiver
re-read all the emails and build instructions to try to understand the issue

I do appreciate your help and I apologize for not remembering the shorting issue. I will not forget this a second time

thanks
Max
 
Zuletzt bearbeitet von einem Moderator:
Hi All
On my mini the voltage is now reading 2.5 volts at the output of the amplifier
I soldered the capacitor C3 and cap C1 is not present.
I only have a one coil setup
I can go to 2 if that will make this work
I have commented out the void PerimeterClass::run(){ code and added the code provided
coils
and the mag reading is still to low to be of any use

so not sure what to do now other than try 2 coils

max
 
Oben