0

I2C Soil Sensor I2C Issue
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

I2C Soil Sensor I2C Issue

by greenfrogs on Wed Jun 16, 2021 5:49 am

Sorry to post on the forum about this but I seem to be having a problem with two Adafruit I2C Soil Sensor I ordered recently from PiHut (who directed me to pos there). I am really surprised that I had issues with both of these sensors but they have been driving me insane yesterday. I have followed all of the guidance given by Adafruit (for example: https://learn.adafruit.com/adafruit-ste ... duino-test) and looked around on the forums and my only conclusion is that there is some sort of issue. I have attempted the following steps:

1. Connected each soil sensor in turn to the i2c connectors on a Firebeetle ESP32 (see image 1/2 and I2CSoilSensor) and tried the soil sensor provided code, followed by an I2C scanner.
2. Connected each sensor to an Arduino Uno with same results.
3. Verified I2C works on both Firebeetle and Uno (see image 3 and I2CArduino, blue/yellow cable swapped as SCL/SDA pins are inversed - although I have tried everything at this point).
4. Checked cable connections, voltages across input pins on soil sensor.

I have used lots of I2C devices before and these are the only ones which have caused me issues. Do these sensors normally have a fairly high failure rate? Thank you for any help or support it will be really appreciated.

edit: it seems to be the same issue reported here: viewtopic.php?f=19&t=171603
Attachments
Image-1.jpg
First soil sensor connections
Image-1.jpg (315.51 KiB) Viewed 400 times
Image3-1.jpg
Arduino I2C connections with the same cable closeup
Image3-1.jpg (381.78 KiB) Viewed 400 times
Image3-0.jpg
Arduino I2C connections with the same cable
Image3-0.jpg (386.09 KiB) Viewed 400 times
Last edited by greenfrogs on Wed Jun 16, 2021 6:13 am, edited 1 time in total.

greenfrogs
 
Posts: 7
Joined: Wed Jun 16, 2021 5:44 am

Re: I2C Soil Sensor I2C Issue

by greenfrogs on Wed Jun 16, 2021 5:49 am

Additional images
Attachments
I2CArduino.png
I2CArduino.png (3.89 KiB) Viewed 399 times
I2CSoilSensor.png
I2CSoilSensor.png (2.61 KiB) Viewed 399 times
Image-2.jpg
Image-2.jpg (321.84 KiB) Viewed 399 times

greenfrogs
 
Posts: 7
Joined: Wed Jun 16, 2021 5:44 am

Re: I2C Soil Sensor I2C Issue

by greenfrogs on Sat Jun 26, 2021 8:22 am

I have continued trying to test the devices with more configurations/different cables. Even going as far as to produce custom cables to ensure they are fully connected (following this guide: https://learn.adafruit.com/assets/66338). At this point I feel the only conclusion is that they are both broken (as unlikely as this seems). Any help or guidance would be appreciated.

greenfrogs
 
Posts: 7
Joined: Wed Jun 16, 2021 5:44 am

Re: I2C Soil Sensor I2C Issue

by adafruit_support_mike on Mon Jun 28, 2021 10:00 pm

The photos above show the ESP32 board connected to the Arduino, but I don't see a connection between the Soil Sensor and the Arduino.

adafruit_support_mike
 
Posts: 63053
Joined: Thu Feb 11, 2010 2:51 pm

Re: I2C Soil Sensor I2C Issue

by greenfrogs on Tue Jun 29, 2021 12:36 pm

Hi @adafruit_support_mike, thank you very much for your response. Sorry the Arduino Uno photos seem to not have been uploaded. I have attached them below (also retested and no response from the sample soil sensor code). Look forward to hearing from you soon.
Attachments
IMG_20210629_172814.jpg
IMG_20210629_172814.jpg (358.7 KiB) Viewed 104 times
IMG_20210629_172807.jpg
IMG_20210629_172807.jpg (316.02 KiB) Viewed 104 times

greenfrogs
 
Posts: 7
Joined: Wed Jun 16, 2021 5:44 am

Re: I2C Soil Sensor I2C Issue

by adafruit_support_mike on Tue Jun 29, 2021 10:33 pm

Thank you. Those connections look correct.

As a sanity check, have you tested the STEMMA cable by using it with some other I2C device? The sensor should have address 0x36, and one of the images above shows the microcontroller finding a sensor at address 0x08. It would be unusual for two devices to fail with the same incorrect address, and I'd like to rule out the chance of a connector problem.

adafruit_support_mike
 
Posts: 63053
Joined: Thu Feb 11, 2010 2:51 pm

Re: I2C Soil Sensor I2C Issue

by greenfrogs on Wed Jun 30, 2021 5:02 am

Yes I have tried the STEMMA cable with another I2C device (in this case a slave esp32). That was the image I sent before showing a device in 0x08 (+ checking pin outputs, voltage across 5v and gnd). I also tried a different STEMMA cable which did not help.

Both of the soil sensors are not been found with an I2C scanner or with the sample soil code.

I will send another image later today showing the connection between the Arduino and the i2c device.

greenfrogs
 
Posts: 7
Joined: Wed Jun 16, 2021 5:44 am

Re: I2C Soil Sensor I2C Issue

by greenfrogs on Wed Jun 30, 2021 7:15 pm

Here is the setup for testing the STEMMA cable (finds a slave I2C device), I also attached an LED across 5v and GND and it was working fine (wire is broken in the image as it was a bit tricky getting everything in the right slot but fixed and replaced now). Also tested with a multimeter across each connection (between the soil sensor and the arudino).
Attachments
IMG_20210701_000306.jpg
IMG_20210701_000306.jpg (413.98 KiB) Viewed 87 times

greenfrogs
 
Posts: 7
Joined: Wed Jun 16, 2021 5:44 am

Re: I2C Soil Sensor I2C Issue

by adafruit_support_mike on Wed Jun 30, 2021 9:43 pm

It looks like you've ruled out everything except the STEMMA sensors, thanks.

Let the folks from Pi Hut know we've approved two replacements.

adafruit_support_mike
 
Posts: 63053
Joined: Thu Feb 11, 2010 2:51 pm

Re: I2C Soil Sensor I2C Issue

by greenfrogs on Mon Jul 19, 2021 12:35 pm

Just to provide an update for people looking at this post in the future. Both I2C soil sensors were dead on arrival but they have been replaced now and work perfectly! Thank you Adafruit Support and PiHut!

greenfrogs
 
Posts: 7
Joined: Wed Jun 16, 2021 5:44 am

Re: I2C Soil Sensor I2C Issue

by adafruit_support_mike on Mon Jul 19, 2021 2:08 pm

Glad to hear things are working for you. Happy hacking!

adafruit_support_mike
 
Posts: 63053
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.