I have wired (continuity tested with a multimeter) a Grove - Lightning Sensor (AS3935) to the Seeed Studio XIAO ESP32S3 board. I followed the instructions from the well-detailed Wiki, but instead of using a Seeeduino, I used the ESP32S3. I connected the SDA/SCL from the board to the sensor, along with GND and 3V3. Additionally, I soldered the jumpers as per the instructions: 0-3V3, REG, CS, and SI.
When running an I2C scanning sketch, it reports the device is found at 0x03. However, when executing the script provided in the Wiki, it seems to get stuck at the initial scanning attempt, seemingly failing to detect the device. To my understanding, the Wiki’s sketch runs correctly up until line 162 (Wire.requestFrom(indevice, 1); // Request 1 bytes from slave device), but it seems to fail after executing the request. In addition, I attempted to run tests using a kitchen lighter, but the sensor never detected a signal.
Could you provide some guidance on what I should look into or potential troubleshooting steps?
Thank you for your quick response. I have indeed soldered the front pads as indicated in the Wiki tutorial. Please see the photos below where you can observe the soldered pads clearly.
Additionally, I’ve been wondering if the issue might be related to the available address range for the lightning detector. It seems that addresses 1 to 3 are either reserved or not available due to the I2C protocol, as suggested in this article: Extreme Weather Monitoring with Specialized Sensors.
Hi, did you follow this step on the wiki, you need to determine the power supply voltage and do a simple solder before using the module. Using 3.3V and 5V requires different welding methods
Yes, I followed the steps on the Wiki. Please see attached a picture of the voltage pads correctly soldered. Indeed, I double checked each step on the Wiki to ensure a correct wiring.
Hi, I have just identified a bug in the program which could be the main reason why the program is not executing properly. The details are as follows:
Wire.beginTransmission(indevice); <--- common mistake, don't do this
Wire.requestFrom(indevice, 1); // Request 1 bytes from slave device
Wire.endTransmission(); <--- common mistake, don't do this
The Wire.requestFrom() will do a complete I2C bus transaction with: START, send address, read data, STOP. Therefore, Wire.beginTransmission() and Wire.endTransmission() should not appear before or after all Wire.requestFrom() functions. I’ve fixed this for now, and I’ll update the Wiki code when I’m done testing.
I’ve recently obtained the updated sketch, and the scanning phase appears to be functioning as intended. Nevertheless, upon testing the sensor using a kitchen lighter, it failed to register any events. I’m not sure whether this issue might be connected to the calibration process that didn’t yield successful results. Is there a necessity to adjust certain parameters in this case?
Perhaps I should also consider testing the sensor with an Arduino Uno board I have on hand, to eliminate the possibility of an I2C communication issue specifically with the XIAO ESP32S3. However, I’d rather not have to switch to a different board if possible. I’m also not keen on resorting to the SPI protocol, although I suppose that might end up being my last resort.
I don’t have a disassembled lighter igniter on hand. The one I have is sealed, so I will attempt to purchase one and disassemble it in order to conduct the necessary tests.
I wanted to provide an update on my lightning detector configuration attempts.
I tried using the lightning detector with an Arduino Uno. It worked flawlessly using the I2C communication protocol. I conducted tests with both an arc generator and during actual thunderstorms, and in both cases, it performed as expected.
Since all my efforts to configure the lightning detector with the XIAO ESP32S3 using I2C were unsuccessful, I decided to give SPI a shot. Additionally, I wanted to follow the recommendations from a SparkFun article suggesting the use of the lightning detector with the SPI protocol. Unfortunately, I couldn’t get the detector to work with the XIAO ESP32S3 using SPI either. My main challenge was determining which pin to use for CS (Chip Select). After reading a lot of documentation, I tried several pins that seemed to work for others, but I had no luck personally. The lightning detector definitely didn’t work for me with the XIAO ESP32S3. This is disappointing, because Seeed promotes both products in conjunction.
Does anyone have any suggestions on how to configure the lightning detector with the XIAO ESP32S3, especially regarding pin configurations? Your insights would be greatly appreciated.