Neues Projekt Hilfe?

LoRa-controlled switch with state feedback

Status: In der Entwicklung
16. September 2019
LoRa-controlled switch with state feedback
The LoRa-controlled switch with state feedback is based on the LoRaWAN Node Experimental Platform, and shows the versatil use of it. Here we use only the LoRa modulaton for propriatray data exchange, no LoRaWAN included. We have one transmitter and one receiver node involved. The Transmitter uses the same water resistant enclosure as used for the LoRaWAN Node Experimental Platform, a well priced Hammond enclosure, housing two lithum rechargable batteries. Changed from the basic LoRaWAN Node Experimental Platform, we have one switch with led feedback, utilizing the spare GPIOs if the baord.

On the switch side we have also the LoRaWAN Node Experimental Platform, this time driving a relay able to switch 115V / 230V

[Update 25.10.2019]

Software is transmitting the first time peer to peer. The Hardware for the switch needed to be changed a bit as some pins were connected wrong.

[Update 31.10.2019]

Software has furter improved and the basic feature are ready. The Transmitter as also the part at the relais can be configured with a serial interface and a serial terminal, like the one you have in the arduino ide.

[Update 28.11.2019]

Everthing is put together and working. We got a mobile knob with state feedback form the relais. Here you see the fully assembled Switch in the transparent bluish enclosure from hammond. As power source we used here a USB powerbank we had spare at the Lab. The PCB itself is pertty simple., most of
the tricky bits are in the Elektor LoRa Node itself. This PCB just keeps the components in the housing itself. A nice addition ist the FTDI connector on the side o fthe PCB that makes programming a lot simpler. The OLED Shown here is optional ut very usefull.To attach it to the PCB and to fit it into the baord you need to remove some pplastic form the display connector.
With some tools remove the surrounding plastic and you will get the bare metal pins that you need to connect to the PCB.

Uplaoding the software can be dne with the Arduino IDE or you can upload the files with the SMT32CubeProgrammer. The only tools requiered for this is a serial to usb- converter running with 3.3V levels.

For the switch the procedure is almost the same, after the finished assembly you will end with a nice little box lite this:

This box will switch the 230 or 110V and report back if 110V / 230V are applied to the output. The assembly is straight forward, you need the Elektor LoRa Node and also the PCBs and parts for the Relais and Switch part. After you put the components together you need tp get the software into both parts. To upload software you only need a 3.3V USB -Serial Cable and connect it to the Elektor LoRa Node like seen here :

Keep the boot button pressed and tick the reset button, like you do on an ESP32, this will set the MCU into the bootloader mode. You can then use the STM32CubePogrammer to upload the Hex files for the firmware to the Chip, or compile the code and uploading it with the arduino IDE.

A simple way is just to grab the hex file and upload it with the STM32CubeProgrammer.

After you put the firmware for each device into its mcu you can configure it with a serial terminal, like the one you find in the arduino ide. As parameter you need to set 115200 baud, 8 databits and 1 stopbit, no parity. As line ending character use Newline.

To make both parts work we need to setup a key to prevent other partys to contorl our relay. To do enter in the terminal "set key 12345678" this will use 12345678 as key. Also you can change the Spreadingfactor (SF ) and the Transmittpower. The Spreadinfactor determines the datarate used by the system, the slower the transmission is the more range you may gain. As startingpoint use SF7 with "set datarate SF7". Also you can change the transmittpower used with "set txpower 2" which sets the output to 2dBm. You can set the output up to 15dBm but be aware that this may collide with the regulator rules for the 868MHz band.

You need to do this setup twice, for the Relais and the Switch. After you have setup both sides you should be go to go.

Mehr anzeigen
Weniger anzeigen

Kommentare werden geladen...