制造商零件编号 4026
STEMMA SOIL SENSOR - I2C CAPACIT
Adafruit Industries LLC
License: See Original Project STEMMA
Courtesy of Adafruit
Guide by Lady Ada
What is STEMMA?
You may have noticed that starting in 2018, a lot of Adafruit development boards have connectors that look like this:
We call these STEMMA connectors - technically they are called 3 and 4 pin JST PH connectors. They're our way of making it easy to plug-n-play various sensors and devices without a lot of wiring. Especially with the board isn't breadboard-friendly, as above.
The idea is that by having easy-to-plug cables, you can wire up things without soldering, wiring, and complexity. For example, here's a STEMMA soil sensor.
As you can see, the soil sensor has a matching 4-pin JST PH connector on the end.
The sensor is well suited to using a cable connection - its an I2C sensor so needs 4 pins, and you will want to stick it into a plant, so it makes sense to have it on a cable!
Plugging in the sensor is easy, you just need to connect a JST-to-JST cable. So for example, you can make a IoT plant monitor with the two parts above with no soldering or special wiring.
STEMMA connector types
There are THREE different STEMMA connectors you will see:
STEMMA 4 Pin JST PH - These are larger 2.0mm pitch connectors
They are for I2C use!
STEMMA 3 Pin JST PH - These are larger 2.0mm pitch connectors
They are for PWM/Analog/Digital use!
STEMMA QT ('cutie') 4 Pin JST SH - These are smaller 1.0mm pitch connectors.
They are for I2C use when the larger JST PH connectors won't fit on a small sensor board!
What is STEMMA QT?
We like the JST PH 2.0mm pitch cables because they are cross-compatible with Grove/Gravity. But they're a bit large for smaller breakout boards and wearables. So, for smaller I2C devices, we'll use the JST SH that SparkFun Qwiic uses, so that Qwiic & STEMMA QT sensors are cross-compatible!
STEMMA QT devices keep the level shifting/regulator, so you can use STEMMA QT with Grove/Gravity/STEMMA/Qwiic controllers at any voltage range, safely!
Here's an example of a STEMMA QT sensor board. You can use it with any Qwiic board or device!
You can see how the larger cables are way bigger, and we can't keep the sensor boards nice and 'cutie' without the smaller QT connectors.
STEMMA QT ('cutie') 4 Pin JST SH - These are smaller 1.0mm pitch connectors.
They are for I2C use when the larger JST PH connectors won't fit on a small sensor board!
Technical Specs
Here are some technical specs if you'd like to make devices and sensors that work with STEMMA.
STEMMA 4-Pin I2C (both standard & STEMMA QT)
This connector is for I2C devices and has a 4-pin connector, in either 2.0mm or 1.0mm pitch:
For the STEMMA QT cables, we follow the Qwiic convention:
Note the colors are slightly different for SDA/SCL but the pin order is the same.
Power Lines
Ground is easy, that’s the power and data reference ground.
V can be anything from 3-5V DC. I2C devices must accept 3-5V DC and must use a regulator if the device requires 3V or less power voltage! I2C controllers may provide 3 or 5V.
The reason we don't force 3.3V is that there are some high-current controlled devices (servos, RGB LEDs) that may benefit from having a high voltage/current availability.
Data Lines
SDA and SCL are the classic I2C data lines. The I2C device is expected to have pullups from SDA & SCL to V . For that reason, both sides (I2C controller and I2C device) must be OK with 3-5V logic level and must implement I2C level shifting to the desired final voltage of the controller/device.
The reason we don't go with the simple 3.3V logic level is that there are still a lot of folks using 5V logic devices like the Arduino UNO, level shifting is incredibly inexpensive (4 x 10K resistor pack dual BSS138 is very compact and 10 cents total), and level shifting provides a bit of line level protection from reverse polarity, or overvolting. It's a little more effort but we think it's essential for a good experience.
STEMMA 3-Pin Analog/Digital/PWM
This connector is for Analog/Digital/PWM devices and has a 3 pin 2.0mm connector:
Power Lines
Ground is easy, that’s the power and data reference ground.
V can be anything from 3-5V DC. Devices must accept 3-5V DC and must use a regulator if the device requires 3V or less power voltage! STEMMA controllers may provide 3 or 5V.
The reason we don't force 3.3V is that there are some high-current controlled devices (servos, RGB LEDs) that may benefit from having a high voltage/current availability.
Data Line
There is a single data pin, that we try to make sure can be used for various purposes such as analog input, digital in/out, even PWM/servo control. For example, here's a NeoPixel strip that has a JST connector on it for easy attachment to add colorful lights! As you can see, it plugs in right into the HalloWing.
The connected device is expected to be OK with either 3-5V power and 3-5V logic. Use level shifting/dividers and regulators if necessary to be compatible!
To make things a little safer for the controller when it has 3.3V logic level, we put on a 1K 3.6V Zener diode protection circuit. This will keep the incoming voltage from going above 3.3V or below 0V.
STEMMA / STEMMA QT Comparison
STEMMA is not an original idea, we're working within an ecosystem of many other plug and play systems.
We started STEMMA in 2014, and intended to be compatible with Grove only (cause that's all that existed at the time) but then when Qwiic came around in 2017, added a smaller connector so we could work with those parts too!
STEMMA attempts to be as cross-compatible as possible with both Grove and Gravity (compatible connectors & 3-5V power/logic). STEMMA QT is cross-compatible with Qwiic - STEMMA QT connector/cable is same as Qwiic. You can use STEMMA QT devices with Qwiic devices/controllers.
What doesn't work?
Quick Comparison
Cross-Compatibility
Controller means the 'host' device, e.g. the microcontroller or Raspberry Pi computer.
Device means the 'client' device, e.g. the I2C sensor, potentiometer, servo, NeoPixels, etc.
DFRobot Gravity
DFRobot has their own plug-n-play system as well, called Gravity. It's a little less well defined than Grove/Qwiic, but it seems to use 3-pin JST's for digital/analog and 4-pin JST's for I2C/UART. Other than the UART 4-pin devices, Gravity and STEMMA are compatible with each other.
Compatibility:
Differences:
Seeed Studio Grove
STEMMA / Grove comparison
Grove is SeeedStudio's plug and play system, its the oldest/most established, initiated in 2010 as 'stem/twig' and then renamed Grove. There's only one type of cable and 4-pin connector, but it can have I2C/analog/digital/whatever on the cable. The cable/connector is proprietary and sold only by Seeed (it seems).
Compatibility:
Differences:
Below you can see two different Grove devices. The longer one to the left is a I2C device, you can see it has SCL/SDA marked next to the connector and is compatible with STEMMA. The one to the right has SIG marked next to the connector, and is not compatible because its analog output, not I2C!
Above you can see the Grove cables, even though these are not JST PH they will work just fine with STEMMA 4-pin connectors.
SparkFun Qwiic
STEMMA QT / Qwiic comparison
Qwiic is SparkFun's I2C prototyping system, its only for use with I2C devices. There's also only one cable, a JST SH 4-pin connector and will only use it for I2C. Qwiic is a bit newer than Grove, it was created around May 2017.
Compatibility:
Differences: