Adafruit STEMMA Soil Sensor driver

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
marcidy
Posts: 133
Joined: Sat Dec 12, 2020 11:07 pm

Re: Adafruit STEMMA Soil Sensor driver

Post by marcidy » Wed Oct 06, 2021 3:29 pm

You can draw a schematic, even in MS paint (though vector based drawing is much better). A schematic is just a visual representation of the circuit so we can talk about it. It's clearly available, you just haven't produced it yet :)

Is the power supply adequate? How are you powering it, and how much current can the 5v supply deliver?

Do you have pull-up resistors on SDA/SCL? If not, you can try:

Code: Select all

i2c = machine.I2C(sda=machine.Pin(SDA_PIN, pull=machine.pin.PULL_UP), scl=machine.Pin(SCL_PIN, pull=machine.Pin.PULL_UP), freq=400000)
Does the soil sensor run at 400kHz?

dhust
Posts: 40
Joined: Sun Jul 11, 2021 10:59 pm

Re: Adafruit STEMMA Soil Sensor driver

Post by dhust » Thu Oct 07, 2021 11:44 am

marcidy wrote:
Wed Oct 06, 2021 3:29 pm
You can draw a schematic, even in MS paint (though vector based drawing is much better). A schematic is just a visual representation of the circuit so we can talk about it. It's clearly available, you just haven't produced it yet :)

Is the power supply adequate? How are you powering it, and how much current can the 5v supply deliver?

Do you have pull-up resistors on SDA/SCL? If not, you can try:

Code: Select all

i2c = machine.I2C(sda=machine.Pin(SDA_PIN, pull=machine.pin.PULL_UP), scl=machine.Pin(SCL_PIN, pull=machine.Pin.PULL_UP), freq=400000)
Does the soil sensor run at 400kHz?
I understand that I can draw a schematic. It would just literally be 4 lines with the same information I provided before: ground to ground, vin to 5V or 3.3V, SDA to D2 (GPIO4: SDA), and SCL to D1 (GPIO5: SCL). The power supply is the USB power, which is 5 volts.

According to the specs of the soil sensor their SDA and SDC pins have a 10k pullup to VIN.

I'm not sure if it runs at 400kHz. The scan() I used doesn't look like it needs that and it didn't end up finding anything.

Post Reply