Sheep Sheep

holoratte

Member
Grüezi aus der Schweiz,

seit ca 3 Monaten mäht nun auch ein Ardumower im Aargau.
Vielen Dank an all die aktiven Entwickler hier.


WP_20150810_0011.jpg


WP_20150810_0021.jpg


Die Platine (V0.5) habe ich horizontal eingebaut, damit ich ohne Probleme an die noch zu bestückenden weiteren Verbindungen (GPS, IMU... ) herankomme.
Motorschutzplatine ist auf der Basis einer Linienrasterplatine aufgebaut.

WP_20150810_0031.jpg


Das Akkupack (7S2P Konion) ist selbst gelötet und hat einen Temperatursensor bekommen.
Der Not-aus ist auf ein Relais geführt, welches nur die Vin der Motortreiber ausschaltet.
auf der Rückseite hat Hauptschalter, Ladebuchse, USB-buchse und ein zusätzlicher Taster (wird wahrscheinlich für die Abschaltautomatik verwendet) Platz gefunden.

WP_20150810_0071.jpg


Der Sender V2 ist etwas speziell geworden, da noch ein Arduino Uno von einen anderen Projekt übrig war und auch das MC-Shield war bereits vorhanden. Das Gehäuse dafür muss ich dann noch anpassen, läuft aber auch offen...

WP_20150810_0041.jpg


WP_20150810_0051.jpg


WP_20150810_0061.jpg


Die Pfod-app konnte ich leider nicht nutzen, da mir kein Android System zur verfügung steht und ich nicht noch so ein Teil anschaffen wollte. Eine Android-Portierung von meinem eee-Netbook konnte die App zwar öffnen, aber die Plots haben nicht funktioniert.

Dafür habe ich mir eine eigene Kommunikation auf Basis Bluetooth/Serial - Python/Matplotlib/Tkinter programmiert. Funktionert soweit ok. Hat moch ein paar Kinderkrankheiten, ist aber einsatzfähig.
Falls jemand interess daran hat(Code) bitte melden. (läuft bei mir auf Windows, kann aber mit wenigen Änderungen
bestimmt auch auf Linux zum laufen gebracht werden...
Zu gegebener Zeit wird daraus wohl ein Github-Projekt.Braucht aber noch etwas Gehirnschmalz.

dk1.jpg


DK3.jpg


DK2.jpg
 
Hi Chris,

Sorry, I can't write in German

Dafür habe ich mir eine eigene Kommunikation auf Basis Bluetooth/Serial - Python/Matplotlib/Tkinter programmiert.

Great work! I was thinking to do something similar, so I am very interested in this. Can I use/try it already in its current state?

During debugging I often add additional debug traces in the mower code that are sent on the pfod channel (so Bluetooth or Wifi). With Wifi I often open a telnet session and type in pfod commands directly (like "{z00}" to clear the errors and so on). So it would be cool if we could add a window to your tool so that we can see the additional traces printed by the mower. This way I could see the debug-traces in real time while I don't have to remember the pfod commands :)

Frederic
 
Hi Frederic,

Yes you can test it if you want.
There are some prerequisites required.

This program is running on my eee-pc 1000ha (1.6GHz CPU, 2GB RAM, Win8.1), however the plot update is much faster with a more "uptodate" system , especially when the y-axis of the plots have to be updated... (it hangs some time, but it will come back once the Axis udates are done... you will see if you are patient... :)
"Log Sensors" is not yet implemented (programm might crash).

Dependencies:
Win XP, Win Vista, Win 7(tested), Win 8(tested), Win 10(tested)
Bluetooth Serial emulation *COM port installed (outgoing)
Python 2.7 32bit
Pyserial
Matplotlib
(tested and working with the latest Python portable build http://portablepython.com/wiki/PortablePython2.7.6.1/)
ArdumowerDK will scan all available comports and send {.},while listening to an "Ardumower" reply to determine if talking to your sheep or not
if no Ardumower is found some debug messages (kind of simulation mode) will be sent to the program and the plot will automatically load and plot some data.
no comport has to be set.


I also added some Keyboard shorcuts(don't use them while plotting, first go 'Main')

Keyboard shortcuts:
Up: manual forward
down: manual stop
left: manual left
right: manual right
b: maunal back
F1: manual mower off

a: automatic mode
Esc: OFF
Page up: not yet implemented
page down: not yet implemented

an Entry field to send code manual should not be too difficult, there is a function to send strings (already active for the keyboard shortcuts)

Be aware that I am NOT a professional coder - some programming might be 'dirty' and I guess a experienced Python freak would probably get crazy about my style...
Also don't expect all Pfod command to be implemented and some implementations might not be in the style of Pfod App.
I had to do some workarounds for some commands.

Have fun...


Chris
 
Nice!

No, no special characters. For example:

Code:
PerChange 216597
P  9.30 117 136
P  8.18 118 135
P  8.22 118 135
P  8.26 118 135
P  8.30 118 135
P  8.34 118 135
P  8.38 118 135
P  8.42 118 135
P  -23.88 150 103
PerChange 217497
P  -7.86 134 119
P  -7.90 134 119
P  -7.94 134 119
P  -7.98 134 119
P  -8.02 135 118
P  -8.06 135 118
P  -8.10 135 118
P  -8.14 135 118
P  -8.18 135 118
P  -8.22 135 118
P  -8.26 135 118
P  14.66 112 141
PerChange 218778
P  8.02 118 135
P  8.06 118 135
P  8.10 118 135
P  8.14 118 135
P  8.18 118 135
P  8.22 118 135
P  8.26 118 135
P  8.30 118 135
P  8.34 118 135
P  8.38 118 135
P  8.42 118 135
P  8.46 118 135
P  8.50 118 135
P  8.54 118 135
P  8.58 118 135
P  8.62 118 135
P  8.66 118 135
P  8.70 118 135
P  8.74 118 135
S 220787 218778 -1844 0 85
S 220887 218778 -1935 0 85
S 220987 218778 -1961 0 85
S 221103 218778 -1913 0 85
S 221203 218778 -1886 0 85
S 221303 218778 -1977 0 85
S 221403 218778 -1839 0 85



Is there a need that python needs to be a 32 bit version?
Yesterday I was struggling to get Matplotlib installed, did not succeed and did not have more time

Years ago I made a comparable tool using wxPython and the plot features seemed enough for my needs. ( http://wiki.mikrokopter.de/en/VibrationTest ) It seems Matplotlib looks very heavy (I might be mistaken).

Frederic
 
As long as don't use ',' or '|' or '{' or '}' in the debug strings, the program (and debug window) should work. I use these characters to filter pfod-commands/plotting data.

You are right I also feel matplotlib is a bit too much, but it has some nice features and tkinter by itself is too slow in realtime plotting. Tkinter is anyway not ideal for this purpose. Wx seem to be much faster, but I have not yet studied wx, so therefore I stayed with what I knew best before.

I also had a hard time installing matplotlib on windows with python 2.7 32bit... too many dependencies. Not sure if it will run at all on the 64bit Version(never tried).
If you use portable Python (see link below) all can be automatically installed (just need to choose the packages you want). Portable Phyton even runs from a USB stick. Just install it once and use it on any windows system.

Here you go...

Chris
 
Hi Chris,

I tried your script under Linux and had only two small problems.
For problem one I've attached a patch (icon problem).
Problem two is a little harder to solve: enumeration of available serial ports.
My port is /dev/ttyUSB0 and I currently hardcoded it to test the script.

A configure option to choose the port is better than the autodetection in my opinion.

Nice work!
Sebastian

Sorry, didn't manage to attach the patch as a text file
patch.zip

Attachment: https://forum.ardumower.de/data/media/kunena/attachments/2695/patch.zip/
 
Zuletzt bearbeitet von einem Moderator:
additional remark: without the *.pyc files, the script does not find the import statusbar. Did you forget to zip statusbar.py or is that intentional?
 
yes, I forgot to zip it. But it doesn't matter. It's anyway not used in the current program(import is a leftover from a older version)
-> just delete the line 'import statusbar'

I included the file statusbar.py to the zip archive
 
Hi Chris,

I installed Anaconda, only needed pyserial and then your tool started :) However, I use Wifi instead of Bluetooth... Any plans to put it in github so that I can adapt it and share any improvements?

Frederic
 
Sebastian Held schrieb:
Hi Frederic,

extract the zip and do a
Code:
git init
and add files to the local repo (that's what I did).

Sebastian

Sure, but if you go a step further and push it to GitHub or so, it is easier to work together than posting patches in the forum...

Frederic
 
Zuletzt bearbeitet von einem Moderator:
I updated the code the last few days quiet a lot.

@Sebastian: could you test the latest master script with linux? the serial port enumeration should now also work with linux

github.com/Holoratte/ArdumowerDK.git

Chris
 
Kleines Update vom Sheep:

Langzeitstabilitätsprobleme:

Sonar: Habe nun RCW-0006 Ultraschallmodule installiert -3stk, sind meiner Meinung nach stabiler - sehen keine Geister mehr

Sender: hat ein Alugehäuse bekommen und ein ein Upgrade auf V594- die ReadAnalogMilivolt-Funktion ist genial (ist glaub schon in der V592 drin)...
Ich musste den Code etwas anpassen für meinen MC33926-Shield Treiber.

WP_20160330_0031.jpg



Was aber wirklich den Unterschied machte ist die Änderung der Samplefrequenz beim ADCMAN: mit 19kHz läuft er ohne Fehler jetzt schon 2 Akkuladungen durch. (Hatte davor immer sporadisch Odometriefehler, ca. 1-2 pro Akkuladung und keine Ahnung weshalb...)



Zusätzlich ist das Schaf jetzt mit einem Eigenbau - RCreceiver auf Basis RF24L01+Arduino uno ausgestattet. Als Sender dient mein Netbook mit PS3-Joypad und RF24L01+Arduino uno. Ich hatte gehofft die RF24L01+ hätten eine bessere Reichweite als die HC-05 BT-Module... Sind aber in etwa Vergleichbar. Aber auch bei RF24 Modulen gibt es Versionen mit grösserer Reichweite...

Gruess

Chris
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/2380/WP_20160330_0031.jpg/
 
Zuletzt bearbeitet von einem Moderator:
Moin Chris,

Sender Software V 594???
Hab ich ein Update übersehen? Wo finde ich das denn?
Danke und Gruß
Peter
 
Oben