Perimeter Empfänger Software

Olaf S

New member
Hallo zusammen,

ich bin mir nicht sicher, in welchen Bereich ich posten soll, also bitte verschieben.

Ich baue seit 2 Jahren an einem autonom fahrenden Roboter, der im Laufe seiner Entwicklung zum Rasenmäher wurde. Hardware Basis ist ein Raspberry 3. Ich bin weit gekommen, bevor ich den Ardumower entdeckte, deswegen will ich jetzt nicht komplett umstellen, bin aber begeistert von der Perimeter Sender Empfänger Kombi. Den Sender habe ich gebaut mit einem Nano und einem L298N, was wunderbar funktioniert. Als Empfänger würde ich gerne ebenfalls einen Nano oder ähnlich verwenden und nur die entscheidenden Infos an den Raspberry (innen, außen, Annäherung) weitergeben, der dann die Fahrbefehle ausgibt. Ein Empfängerkit habe ich mir bereits besorgt und mit dem Oszi geschaut, was ich mit dem Signal anfangen kann.

Jetzt kann ich Python und PHP programmieren, Basisskripte für Arduino kriege ich auch hin, leider aber kein C. Kann mir jemand auf die Sprünge helfen, wie ich den entscheidenden Teil der Software (nach meinem Verständnis der Matched Filter?) für mein System heraustrennen und nutzen kann?

Danke und Gruß
Olaf
 

Anhänge

  • 2021-04-04 11_58_03-.jpg
    2021-04-04 11_58_03-.jpg
    125,9 KB · Aufrufe: 18
Hallo, es gibt in einer älteren Version schon ein fertiges Script für den nano, schau Mal ins GIT.

VG thorsten
 
Danke für den Hinweis, das wäre genau das, was ich suche.
Ich bin gerade mal da durch gegangen. Die älteren Versionen (tags) bei Github durch gegangen, kann aber nichts Entsprechendes finden. Hast du evt. einen Link für mich?
 
Super! Sieht tatsächlich genau nach dem aus, was ich brauche.
Mein Plan ist auf jeden Fall, alles zu veröffentlichen, dafür muss sie aber erst fertig werden. Die Konstruktion ist noch im Fluss und passt sich ständig der geänderten Technik an. Ich hoffe, in diesem Frühjahr alles zusammen zu haben, so dass ich die Karosserie fertig bekomme und drucken kann, dann könnte ich Pläne und CAD teilen.
 
Hello, i'm trying to do something similar. I managed to get it working on Nano but not on Arduino micro (that's what i am using in my robot). Is there any reason why it should not work on micro? Any tips?

Robert
 
Hi Robert, I use the Nano also and from this side is everything okay. Why the Micro doesn' t works I don't know, maybe related to some specs concerning the pins? Have a look at this table, maybe it helps: https://www.educba.com/arduino-micro-vs-nano/

But beside that: do u use a pi also to copntrol your mower? I'm not really there to follow the perimeter wire, there is to much latency in the pi. If you are using the pi I'm really interested in your code.
 
Sehr schön,
Freue mich auf die pi Variante ;)
Ich mich auch - ich bin echt nicht weiter was die Latenz in meiner Pi Software angeht. Es dauert zu lange, bis die Inside-Outside Info ausgelesen wird. Wenn hier jemand mitliest, der Python programmiert, kann ich auch die Codestellen posten, die relevant sind...
 
Thanks for the reply. No, i'm not using Pi, upgrading my own 4wd mower, had trouble with noise on my old perimeter setup.
I had it working with Nano as a piggyback, it would sense the perimeter and then just switch 4 digital pins hi / low. The micro would read them in the loop and act accordingly.
I tried I2C between arduinos as well, but couldn't get it to work reliably, micro would just hang sometimes, probably waiting for i2c or something.
Note , i'm an amateur at programming, just trying until it works.
So now i would like to put it all on micro.

I tried same code i used in the Nano, which had only perimeter sensing and I2c. The code runs but I get no reaction to coil signals.
 
Funny to here your I2C problems. I tried to connect my Nano to the Pi with I2C and it doesn't work, sometimes 2 min, sometimes 20 sec until an error rises. I switched to serial communication which is much more reliable but maybe slower, I don't know. I'm a web developer and familar with php, javascript and so on but C or Python is beside my daily work and therefor not really professional.
 
I2c works most of the time, but that's not good enough :) i'm sure it is doable, but my programming knowledge is too limited to find what's wrong :(
 
Connecting Pi and arduino is easy into serial mode using a simple USB cable (You can find many tutorial on the net)
Connecting everything over I2C inside a case with motor noise is always more tricky .Simply test with mow motor deactivate to be sure the motor noise don't kill the I2C bus or check I2C pull up resistor.It's valid for IMU RTC etc......

I test many PI (ZERO W, 3B+,4) connected to arduino DUE on fast native USB (Not programming) and the result is OK since 2 year with 0 communication error. Only the outdoor WIFI connection is a little tricky.

 
I use a wired serial connection using GPIO pins and level shifter and it works without errors so far. I have may other I2C connections between sensors (AD converter, INA219, TOF) and all together working without any problems and are resistant against motor noise. As you can see in the video my sense motor is near to them.
 
Thanks for tips on I2C. I had no external pullups , but it did not get better with 4k7 pullups either. I think I solved it with some caps on 5v line close to arduinos, it works good on the bench, field testing today. I tracked it down to wheel motor/drivers. When i stop a wheel and the current goes up, the nano will freeze and not restart sometimes, even without i2c code.

Any ideas about why perimeter code does not want to work micro bernard? It seems i'm getting a very weak mag signal on some analog inputs and others just return 0. On micro i get a message that calibration data found and not on nano? Where is that data stored?
 
Hello, I found out why micro was not working. It was using other analog pins than specified in the code. Analog pin layout on micro is different the on other boards. Usually A0 is ADC0, A1 is ADC1 and so forth, but on micro its oposite, A0 is ADC7 and A5is ADC0. I think adcman is the fault.
 
Oben