TroubleshootingGravity

Ateempting to interface DFRobot Tipping Bucket with Particle Boron

userHead Bentley.Settin 2025-09-19 04:39:58 396 Views5 Replies

Hi all, 

 

I am currently trying to interface a Particle Boron with the DFRobot Tipping Bucket. I have tried a variety of ways to initialize the rainfall sensor and am having no success. I know that the docs and wiki do not explicitly say that this sensor is compatible with Borons but this is a microcontroller our lab continues to favor and have manipulated it with other peripherals before. Here are a few things I have attempted:

 

1. I have directly copy and pasted the rainfall library and I2C code linked in the rainfall sensor's wiki. 

2. I have edited portions of the code to align with Partice VS Code instead of using Arduino IDE. There has been no success with multiple edits. I keep recieving this error “Sensor Init Error!!” 

3. I moved forward with an even more simplified code to determine if these two electronic were even talking. 

4. I created a fresh project that simply scanned for an I2C connection which came up with nothing. It seems as if the boron does not even “see” the rainfall sensor after multiple attempts. 

 

I will attach a wiring diagram of what I have done so far. In the diagram it shows I use 4.7 pull up resistor which I have tried, but I have also tried a 10K pull up resistor. 

I am also working on determining if this could be a Particle Boron problem. I am reaching out to Particle forums but wanted to reach out here just in case there was any extra guidance. 

 

All the help is appreciated!

2025-09-27 11:54:31

I use VS IDE and PlatformIO with the Espressif IoT development framework for my ESP32-S3 boards.  A basic probing example in C is available (https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/i2c.html), and here is the snippet:

 

i2c_master_bus_config_t i2c_mst_config_1 = {
   .clk_source = I2C_CLK_SRC_DEFAULT,
   .i2c_port = TEST_I2C_PORT,
   .scl_io_num = I2C_MASTER_SCL_IO,
   .sda_io_num = I2C_MASTER_SDA_IO,
   .glitch_ignore_cnt = 7,
   .flags.enable_internal_pullup = true,
};
i2c_master_bus_handle_t bus_handle;

ESP_ERROR_CHECK(i2c_new_master_bus(&i2c_mst_config_1, &bus_handle));
ESP_ERROR_CHECK(i2c_master_probe(bus_handle, 0x22, -1));
ESP_ERROR_CHECK(i2c_del_master_bus(bus_handle));

 

More I2C examples are available here: https://github.com/K0I05/ESP32-S3_ESP-IDF_COMPONENTS

 

If you have a logic analyzer, it certainly helps with troubleshooting.

 

 

userHeadPic K0I05
2025-09-25 02:37:31

Hi again. As I mentioned I was using a Particle Boron but have switched to using a Arduino UNO just to see if I can narrow down the issue. Even when I use the steps recommended in the sensor's docs I recieve “Sensor Init Error”. 

 

Can anyone help with this or seen this issue before? I have tried a variety of other I2C devices too. 

userHeadPic Bentley.Settin
2025-09-19 10:43:51

wiki page: https://wiki.dfrobot.com/SKU_SEN0575_Gravity_Rainfall_Sensor

 

I don't use Arduino as a development environment, but ensure the switch has I2C enabled and UART disabled if you plan to communicate over I2C.  If you have another development board, interface the sensor and scan the I2C bus for an address; if it is wired properly, the address will show up.  Likewise, you can communicate with the sensor via UART instead of I2C as a means to verify sensor operation.

 

The processed output parameters are limited.  It is much easier to work with precipitation rate (i.e. mm/hr).  You can derive precipitation accumulation totals from it onboard the MCU or in a cloud environment.

 

 

userHeadPic K0I05
Bentley.Settin wrote:

Hi, thank you for your response!

 

When I attempt to use I2C I do have the switch on the Gravity board set to I2C. I have tried using UART but am still having no luck. It is as if the Boron doesn't recognize or “see” the rainfall sensor at all. 

 

I have tried using a ESP32-S3 board with the exact code and libraries from the DFRobot website. I followed the wiring instructions and still recieved this error: “Sensor Init Error”. Based on both these boards having Sensor Init Errors it seems like it could be a problem with the rainfall sensor? I am speaking only as a rookie so am happy to try other options. 

 

I referenced in my first response that I used very simple I2C commands for the boron just to see if I can get this microcontroller to scan for the rainfall sensor and it shows no responses. I find this very interesting. 

2025-09-19 20:53:32
Bentley.Settin wrote:

Another note: I am using Particle VS IDE for the Particle Boron. I only briefly used Arduino IDE with the ESP32-S3 device. 

2025-09-19 21:01:16
2 Replies