Prototype. Actually you need to connect 3 signals: SDA, SCL, IRQ and 3V3/GND. Rest available signals on the GY-AS3935 you must connect to 3V3 or GND ( see attached scheme)
Of course you must flash your Wemos D1 (or other module with ESP8266) using tasmota_sensors image.
Workflow.
1. Download Tasmota image:
There is a big list of binaries for each release, which can be confusing if you don’t know which one you need. In case you should download binaries called tasmota-sensors.bin:
https://thehackbox.org/tasmota/tasmota-sensors.bin
2. Download and install esptool
Esptool is a utility that can be used to read and write the flash memory on devices using the ESP8266 and ESP32 microcontrollers.
Follow the instructions on that page to install it on your computer: https://github.com/espressif/esptool
3. Determine your serial device related to ESP8266
Your USB-to-Serial converter connects to your computer by USB, and appears to the computer as a virtual serial port like e.g. ttyUSB0 if you have only one device connected. Use dmesg command to determine serial name:
Code: Select all
[42904.761182] usb 2-1.2: new full-speed USB device number 13 using ehci-pci
[42904.870228] usb 2-1.2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.54
[42904.870229] usb 2-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[42904.870231] usb 2-1.2: Product: USB2.0-Serial
[42904.899590] usbcore: registered new interface driver ch341
[42904.899600] usbserial: USB Serial support registered for ch341-uart
[42904.899614] ch341 2-1.2:1.0: ch341-uart converter detected
[42904.900431] usb 2-1.2: ch341-uart converter now attached to ttyUSB1
[42905.047877] usb 2-1.2: USB disconnect, device number 13
[42905.048256] ch341-uart ttyUSB1: ch341-uart converter now disconnected from ttyUSB1
[42905.048306] ch341 2-1.2:1.0: device disconnected
Disconnect power from the Wemos D1 module, hold the GPIO0 pin low (use micro switch on the board if available), and connect power again. Then release GPIO0. This will put the Wemos into a mode where it waits for new firmware to be loaded.
5. Upload the Tasmota firmware
Open a terminal, and go into the directory where you have the Tasmota binary (downloaded earlier). Use esptool to push it to the Wemos by command:
Code: Select all
esptool.py -p /dev/ttyUSB0 write_flash -fm dout 0x0 tasmota-sensors.bin
6. Connect to Tasmota via WiFi
Disconnect the Wemos power, then reconnect it. When the Tasmota firmware starts up and doesn’t find any existing configuration, it goes into a setup mode and creates its own WiFi network. The network will have a name similar to “tasmota-a3b2”, with the 4 digits based on the last part of the unique MAC address of the ESP8266 hardware.
Connect to the Tasmota's WiFi network. From the web browser open address: http://192.168.4.1.
Your computer should then automatically open the WiFi configuration screen. Now enter the WiFi settings for your network using at home. Enter all required details, and click “Save”.
The Wemos will then reboot and attempt to connect to your WiFi network by using IP assigned to Wemos by your router. If for some reason it will not happens, wail around 180 seconds and try to connect to generic tasmota-a3b2 WiFi network and check/edit parameters.
6. Set required signals. 7. Customisation (very important!)
In order to avoid so quickly FLASH damage I recommending to switch off autosave configuration by using SaveData 0 option in console: Next, you should set the gain, noise flor level etc.
All details you may find on: https://tasmota.github.io/docs/AS3935/
8. Checking detection 9. PCB
Have a nice Lights!