Apple picking 2021

September 28, 2021 - Reading time: ~1 minute

My original Silesian apple sauce is exceptionally delicious. The recipe is very simple. Peel the apples and then cut them into pieces. With a little water, cook the pieces until they fall apart. You have to stir well regularly so nothing gets burnt. Add a little sugar and cinnamon to suit taste. Lately I've been leaving out the sugar because I have to watch my weight. The most important thing about apple sauce, however, are the particularly good apples without bad spots. That starts with cultivation. The right irrigation is crucial so the apples get a firm flesh and the right size. The SMT100 soil moisture sensor, which I have installed in various places at different levels, helps me with this.

My irrigation system worked so well this year that I am already expanding it.

The harvest was accordingly good and I hardly manage to use all the apples for my delicious applesauce. My many grandchildren will help me with the tasting.

 


Apfelernte 2021

September 26, 2021 - Reading time: ~1 minute

Mein original schlesisches Apfelmus ist besonders lecker. Das Rezept ist ganz einfach. Die Äpfel werden geschält und dann in Stücke geschnitten. Mit ein wenig Wasser werden die Stücke so lange gekocht, bis sie auseinanderfallen. Dabei muss man regelmäßig gut umrühren, damit nichts anbrennt. Etwas Zucker und Zimt kommen nach Geschmack dazu. In letzter Zeit lasse ich aber den Zucker weg, da ich auf meine Linie achten muss. Das Wichtigste am Apfelmus sind aber die besonders guten Äpfel ohne faule Stellen. Das fängt schon beim Anbau an. Entscheidend ist die richtige Bewässerung, damit die Äpfel ein festes Fruchtfleisch und die richtige Größe bekommen. Dabei hilft mir der Bodenfeuchtesensor SMT100, den ich an verschiedenen Stellen in unterschiedlicher Tiefe eingebaut habe.

Meine Bewässerungssteuerung hat in diesem Jahr so gut funktionniert, so dass ich schon am Erweitern des Systems bin.

Die Ernte war entsprechend gut und ich schaffe es kaum alle Äpfel zu meinem leckeren Apfelmus zu verarbeiten. Meine vielen Enkelkinder werden mir beim Verkosten helfen.

 


SMT100 with 4 - 20 mA interface

August 29, 2021 - Reading time: 3 minutes

The 4 - 20 mA interface or current loop is still very popular in process control automation. There are a couple of advantages:

  • Only 2 wires are required (if sensor is low power and requires less than 4 mA current)
  • Voltage drop along the interconnection wires does not degrade accuracy, so extremely long cables are possible
  • Broken cable can be identified (no current)
  • High noise immunity (because of relatively high currents)

The disadvantage is:

  • Power consumption high and relatively high supply voltages required (typically 12 V to 24 V DC)

Generally I prefer digital interfaces like RS-485, but easy to use  4 - 20 mA sensor are ideally suited for my farmsite so that even untrained personnel can install or replace sensors without configuration hassle.

The choice of 4 - 20 mA sensors for soil moisture measurement is quite limited. Besides other disadvantages, Chinese sensors like Sonbus SM2801 or those from Rika are not real 2 wire sensors. A converter module by Vegetronix for voltage output sensors does not help as well since it requires an external power supply, so no real 2 wire solution as well. Even higher quality sensors like Gropoint are not a 2 wire solution. In the end I only found one real 2 wire solution which is from Decagon (now Metergroup) with their MAS-1 (and probably some OEM variants which look exactly the same). Unfortunately the manual of the MAS-1 contained an unpleasant surprise. The accuracy in volumetric water content is 6% which is mediocre but acceptable. What is more worrying is that the sensor air shall transmit approximately between 3.4 mA and 4.7 mA. I believe this is quite a very large tolerance since I hoped that at least in air it should be quite close to 4 mA. Fortunately a 4 - 20 mA variant of the SMT100 recently came on the market. I already own a couple of SMT100 with RS-485 interface for my garden irrigation system which are working fine, so I decided to give it a try with a SMT100 4 - 20 mA, which arrived these days. My first test was current measurement in air and the SMT100 was 4.03 mA, so right on spot. Even with 100 m cable length no degradation could be observed. So this is a good start for my upcoming farmsite project I hopefully can report on in the future.


Loxone mit SMT100 Modbus

April 17, 2021 - Reading time: ~1 minute

Es wird Frühling und Zeit die Bewässerungstechnik auf Vordermann zu bringen. Über die Loxone Steuerung hatte ich bereits in einem kleinen Blogbeitrag berichtet. Jetzt soll es etwas ausführlicher werden und ich bin dabei Schritt-für-Schritt Anleitungen zu erstellen.

Die erste Anleitung beschreibt, wie man einen SMT100 Modbus über die Modbus Extension von Loxone an die Steuerung anschließt.

Beispielprojekt Loxone


SMT100 Modbus mit ioBroker

March 7, 2021 - Reading time: 2 minutes

Es gibt inzwischen so viele Smart Home Systeme, dass die Auswahl immer schwieriger wird. Ich kann mich noch gut an das Jahr 1982 erinnern, als an der Carnegie Mellon University ein Cola Automat mit dem Internet verbunden wurde. Damals hatte ich mich schon intensiv mit den dazugehörigen Datenübertragungsprotokollen TCP und IP beschäftigt, die auch heute noch die Grundlage des Internets bilden. Meine erste drahtlose TCP/IP Verbindung erfolgte mit 1200 baud Schrittgeschwindigkeit, ein Bruchteil der heutigen Übertragungsraten. Webtechnologien waren damals noch nicht erfunden, so dass ich mir mit Tastern, Glühlämpchen und einer alten Türklingel eine Alarmzentrale zur Überwachung von Weidezäunen baute. Heute probiere ich der Reihe nach die verschiedenen Smart Home Systeme durch, um die Vor- und Nachteile  der verschiedenen Möglichkeiten zu verstehen und die beste Auswahl zu treffen. ioBroker habe ich dabei schon etwas länger im Fokus. Mein erstes Ziel war auszuprobieren, wie leicht man ein Modbus Gerät an ioBroker ankoppeln kann. Als Standardtestobjekt habe ich dazu wieder den SMT100 in der Modbus Variante verwendet. Die Installation von ioBroker auf einem Raspberry Pi war problemlos. Dann habe ich den Modbus Adapter ausgewählt. Entscheidend sind die Einstellungen wie der USB Port für den angeschlossenen USB nach RS-485 Konverter.

Danacht geht es an das "Eingemachte" mit den Registereinstellungen und der Umrechnungsformel für Temperatur und Wassergehalt.

Der Test mit den aktuellen Daten war sofort erfolgreich.

Nach ein paar weiteren Schritten war dann eine kleine Visualisierung erstellt.

Nach dem ersten erfolgreichen Test plane ich weitere Experimente mit ioBroker.


SMT100 with LoRaWAN (TheThingsNetwork) and Dragino

March 7, 2021 - Reading time: 8 minutes

After I have already carried out the first tests with LoRa and soil moisture sensors some time ago, a larger project is on the agenda for this year's gardening season.

Over the winter, I have been intensively occupied with LoRaWAN and also canvassed the relevant providers. At Dragino I found a very cheap LoRa module, which has a RS-485 interface. The advantage is that you can easily connect a SMT100 soil moisture sensor with Modbus (RS-485). The LoRa module also takes care of the power supply of the SMT100. The Litihium battery is even already supplied by Dragino. It's almost a plug-and-play system except for some minor software configuration work. What do you need to get started:

  1. Dragino RS-485BL LoRaWAN RS-485/UART converter
  2. SMT100 RS-485 soil moisture sensor from TRUEBNER (Modbus version)
  3. USB to TTL cable (3.3V) for software configuration

and of course a LoRaWAN gateway nearby. For me it is a TheThingsNetwork gateway, but other LoRaWAN systems should also work. The LoRa module must be registered with the LoRaWAN operator. For TheThingsNetwork, Dragino provides instructions in the LoRa module manual. TheThingsnetwork gateway near me still uses version 2 of TheThingsnetwork. In the course of the year 2021 it should be changed to version 3. Then the settings will change a bit. But now we stay with version 2 for the time being.

In the box of the LoRa module there is a sticker with all possible keys, EUIs, addresses and the serial number.

  • DEV ADDR
  • DEV EUI
  • APP EUI
  • APP KEY
  • APPSKEY
  • NETSKEY

After logging into TheThingsNetwork Console a new application is created. The APP EUI from the sticker is added via addEUI. Then a new device is created. It is very important to enter the DEV EUI, the APP EUI and the APP KEY from the sticker. Voilá, that's it for now with TheThingsNetwork and we go to the LoRa module. (Note: With other keys and EUIs you can certainly also work, but then have greater configuration effort on the module side).

The next step is to connect the SMT100 RS-485 soil moisture sensor with the LoRa module as follows (left green socket for screwing, attention: look up exact assignment in the Dragino manual!):

  • Brown wire +5 V
  • White wire GND
  • Green wire RS-485 A
  • Yellow wire RS-485 B

Then connect the USB to TTL cable for configuration (right socket for pin headers, attention: look up exact assignment in Dragino manual!):

  • GND
  • UART_TXD
  • UART_RXD

Please make sure that the USB TTL cable has 3.3 V level (TX from LoRa module to RX from cable, RX from LoRa module to TX from cable, if necessary check exactly how the cables are assigned and the connections are defined). I used a cheap cable from Ebay (about 4 Euro) and made sure that a FT232 USB chip is used. This usually does not give driver problems. I prefer to use HTerm as terminal program. The switches on the LoRa module must be set to 5V and Flash. The jumper for the supply of the module with the battery voltage must of course also be plugged. in HTerm you see the start of the module after plugging the power supply jumper.

Now you can configure the SMT100 by entering the password in HTerm (123456) and then send AT commands (Attention: Always capitalize commands and don't forget the CR at Send on Enter).

  • AT+BAUDR=9600 (9600 baud)
  • AT+PARITY=2 (even parity)
  • AT+5VT=100 (wait 100ms after turning on the 5 V supply for the sensor)
  • AT+MBFUN=1 (enable Modbus)
  • AT+COMMAND1=fd 03 00 00 00 01,1 (Temperature)
  • AT+COMMAND2=fd 03 00 01 00 01,1 (Soil moisture)
  • AT+DATACUT1=0,0,0
  • AT+DATACUT2=0,0,0
  • AT+TDC=60000 (Transmission interval, 60 s = 60000 ms)

You may check settings with:

  • AT+BAUDR=?
  • AT+PARITY=?
  • AT+5VT=?
  • AT+MBFUN=?
  • AT+COMMAND1=?
  • AT+COMMAND2=?
  • AT+DATACUT1=?
  • AT+DATACUT2=?
  • AT+TDC=?

The communication between the LoRa module and the connected SMT100 can be tested using AT+CFGDEV. Here is an example:

For explanation you should have the application note for Modbus from TRUEBNER ready.

The byte sequence fd 03 00 00 00 01 sends a Modbus broadcast to the one connected sensor and expects the temperature. The temperature is stored in the response in the 4th and 5th byte as a 16 bit number. If 2d e3 is converted to a decimal value, 11747 is obtained. If 11747 is divided by 100 and 100 is subtracted, 17.47°C is obtained. The byte sequence fd 03 00 01 00 01 sends a Modbus broadcast to the one connected sensor and expects the soil moisture. The soil moisture is stored in the response in the 4th and 5th byte as a 16 bit number. If 0b c3 is converted to a decimal value, 3011 is obtained. If 3011 is divided by 100, 30.11% is obtained as volumetric water content.

After the successful test the USB cable can be removed and the LoRa module is ready for operation. Now you can go back to TheThingsboard and watch the LoRa communication, but before that you should set a TTN decoder, so that the transmitted byte sequences are interpreted correctly. The decoder used here looks like this and extracts battery voltage, temperature and soil moisture from the data. (Note: The LoRa module transmits the battery voltage and also a payload version value by default, but we do not consider it here).

The following screenshot shows the data packets with the individual bytes and the decoding.

What is the next step? There is still a visualization missing, for which there are several possibilities. I use MQTT to fetch the measured values from TheThingsNetwork and then import the data into my Thingsboard system. I will describe that soon. For now I enjoy the spring sun with coffee and a delicious piece of crumble cake.

 

 

 

 

 


Gardenergrannys Homepage