2nd perimeter wire - need help

alterschwede

New member
As I posted in a different thread concerning zone mowing, i am presently including a second perimeter wire B inside my outside wire B.
I am working on a solution, where the mower is able to identify which wire it has crossed and let it track wire A or B.
zonen.jpg

Both cables share a common Connection at the sender, since they are interconnected. But that means, that I have to periodically switch Signal A and B off ( 50 ms period). I am sending two different orthogonal codes via loop A and loop B. The mower calculates the correlation between those signals, and the greater MAG tells him, which loop is underneath / closest. Which is working very good so far. But the outside/inside recognition is my problem. I need a way, to let the receiver focus on Loop A or B and only update the MAG value A, when the Sender is transmitting on the loop A and vice versa. So the receiver needs to by synced to the sender and should change its focus phase correct every 50 ms.
My first thoughts are:
1. differentiate the MAG over time, where dMAG/dT is biggest/over specific Threshold, we found a Signal Change
2. sync a CTC Timer to this timestamp and let it overrun every 50 ms
3. change a Focus variable ( which MAG to be stored) inside the Timer ISR
continously: check if we are still synced

I am relative new to Timer coding and tried to learn as much as I could about it, but there might be some knowledge gaps.
my Questions are:
- if we let a Timer create an Interrupt every 50ms, will the Mega be able to handle it to all other tasks/interrupts?
- still a Timer left, perhaps all 5 Timer already needed
- is it possible to manually reset the TCNTn to zero at the time dMAG/dT is greatest

Does anybody see a chance that this could work, or perhabs a more simpler way in achieving the syncing?
Regards
Frederic
 
Hi Frederic,
I think, that much easy solution to drive between zones is use a GPS as described in German thread regarding mowing zones.
This GPS solution I want also implement, but when all basic problems are solved

Alex
 
Under this circumstances I would use two receivers. One for A and one for B and receive the signal all the time.The control software can then decide which signal should be use.
 
Hi Frederic :)

1. Sending signal code A and signal code B on one wire in parallel can be difficult (superposition of signals), so the idea of switching looks fine.
2. Synchronization of sender and receiver looks difficult and is not needed if the receiver memory buffer is as least twice as large as the sender memory buffer.

So, I would not try to synchronize sender and receiver but instead drecrease the switching time between both signal codes A and B, so you get both signals with one sampling session in the receiver. If you do not have enough memory buffer for such a sampling session in the receiver, I would go for an Arduino Due.

Regards,
Alexander
 
I thought he multiplex the signals. Under this condition he must sample the signal for 4 periods to sample each signal twice. Then he must use two correlation runs to recognize both signals. Then he only need one receiver.
 
Thx Nero.
I will give it a try. But I am not 100 % sure, if I got it right. Probably you have to explain it again.
When I have both Signals inside the buffer, I will have to check all of it against the known codes of A and B inside the matchfilter. At one/ some points I will have a change in the MAG values where the Signal changes. This points I will have to remember and store the MAG in its Wire related variable.
Is this the way you think it should work?
But what if both Mags are equal? Can that happen? Perhaps at the junction?

Would it be also possible to send a 0 Signal of different length before changing the Signal? The receiver could measure the time with its external interrupts and then decide which Signal comes next. In this way we could also reduce the Power of the Sender, by not sending it all the time.


@alda: no the gps code was not complete. I can publish it when I am back from holidays.

Looking forward to hear your thoughts.
regards Frederic
 
Hi Frederic,
alterSchwede schrieb:
I am working on a solution, where the mower is able to identify which wire it has crossed and let it track wire A or B.

Let's say your signal is 'A' on wire A and 'B' on wire B. Then you send something like ABABABABABA... (so signal A, after that signal B, and so on)
On your receiver you will see something like AB or BA
If you cross wire A you will see -A B or B -A
If you cross wire B you will see A -B or -B A

In other words the polarity/sign of the signal will change when crossing a wire. The correlation result for both signals will have that polarity/sign too (you can try this out in a simulator like this and change polarity via the Invert button and see what happens with the correlation result: http://www.grauonline.de/alexwww/ardumower/filter/filter.html).
If polarity/sign changes for A, you have crossed wire A.
If polarity/sign changes for B, you have crossed wire B.
If polarity is negative, you are inside, if it is positive you are outside.

So for tracking wire A, you would track for A,-A,A,-A,A,-A,etc. and for tracking wire B, you would track for B,-B,B,-B,B,-B,etc.

I'm not sure what else you are trying - Do you want to know which wire is closer to the robot? I think correlation magnitude can work, but will be fuzzy at some positions...

Btw, this is how I assume 'inside' will look for both wires A and B:
inside_outside.jpg

Attachment: https://forum.ardumower.de/data/media/kunena/attachments/905/inside_outside.jpg/
 
Zuletzt bearbeitet von einem Moderator:
Oben