Tutorial: Intro to Grove Connectors for Arduino/Raspberry Pi Projects

Tutorial: Intro to Grove Connectors for Arduino/Raspberry Pi Projects

At SwitchDoc Labs, we have been building prototypes for engineering projects for many years.  Sometimes they move to being a product, sometimesGroveAlone not.  We have been on the lookout for a good pluggable prototyping system that allows swap outs of parts and yet has a good mechanical interface.   We have looked at a variety of systems over the years.   What did we want?  We wanted something that is supported by a number of manufacturers, no licensing fees involved,  easy for beginners and younger folks to use, straight forward enough so we can build boards without much problem and flexible enough for use with all three of the Raspberry Pi, Arduino and the ESP8266.   We have now found such a system that has some significant support in the industry.

This is Part 1 of this series.  Part 2 will show you some examples of Grove modules and projects.

Switchdoc Labs is now committed to support Grove in all new products (as well as to continue to pr0vide Pin Headers for other systems and breadboards).

IMG_6968 2
Dual Grove/Pin Header I2C 4 Channel Expander/Extender Board

SwitchDoc Labs has dozens of Grove based boards.   See shop.switchdoc.com/grove for details.

 

What is the Grove System?

Grove is a modular, standardized connecter prototyping system. Grove takes a building block approach to assembling electronics. Compared to the jumper or solder based system, it is easier to connect, experiment and build and simplifies the learning system, but not to the point where it becomes dumbed down.  Some of the other prototype systems out there takes the level down to building blocks.   Good stuff to be learned that way, but the Grove system allows you to build real systems.   It requires some learning and expertise to hook things up.

The Grove system consists of a base unit (stem) and various modules (twigs) with standardized connectors.  The people originating the Grove system (Seeedstudio) have tried to use “stems” and “twigs” as part of the Grove lexicon.  After a short period of consideration, We are dropping those names.   They just aren’t needed and just confuse the issue.

The Base unit, generally a microprocessor, allows for easy connection of any input or output from the Grove modules. and every Grove module typically addresses a single function, such as a simple button or a more complex heart rate sensor.

You don’t need a Base unit to connect up to Grove modules.   You an use a cable (Grove to Pin Header Converter) to run from the pins on the Raspberry Pi or Arduino to the Grove connectors.   That is what We do in the SunRover project and in the examples below.

So what is a Grove Connector?

Figure 2A Grove connector is a four pin standardized size connector used to plug into base units and Grove modules.  Figure 1 shows the male Grove Connector.  The male connectors come in flat 90 degree versions and vertical versions as in Figure 2.    Seeedstudio has the exact dimensions in this specification [ https://www.seeedstudio.com/wiki/images/6/69/3470130P1.pdf].   These standardized connectors (common to all types of Grove Connectors) are the key to making this system work.   They are keyed to prevent plugging them in backwards, and the four types of connectors (see below) are all designed so that if you plug the wrong type of device into the wrong type of base unit, there is no problem.  They just won’t work.   This is a good thing.

The one exception would be if you plugged in a 3.3V I2C Grove module that is non-5V tolerant into a 5V I2C Grove connector you could fry the device.

What are Base Units?

IMG_7418
Arduino Uno Grove Base Board

A Grove base unit is a controller or shield for which to attach the Grove modules. The base unit provides the processing power, and the modules offer the input sensors and output actuators of your system.

There are a number of good base unit shields available for the Arduino that provide a lot of Grove connectors.  See to the right for a base unit designed to plug into an Arduino Uno.   They are also available for the Arduino Mega, Due and others.   We haven’t seen any for the Arduino Tre or Yun yet, but they will be no doubt be coming.

On the Raspberry Pi side, the pickings are much slimmer.   The main reason for this is the lack of an ADC (Analog to Digital Converter) on the Raspberry Pi.  More on that below.  The base unit devices available tend to be “too smart” and isolate you from the Raspberry Pi Hardware and Software.   We prefer a solution that is closer to the hardware for learning and flexibility.   You can still mask the complexity with software drivers.

We believe that there is a better solution set for the Raspberry Pi.  Something that has the connectors and an external ADC without another processor in the middle.  More on that in later postings.

You do not have to have a hat or shield to use Grove with your Raspberry Pi or Arduino.   All you need to is connect the I2C, digital or analog inputs to the Grove devices by using a Grove to Header Pin converter as below.

 

Grove-4-Pin-Connector-to-Female-Jumper-Wire-Cable-5-pack-600x600
Grove to Header Pin Converter

You can easily add an I2C ADC to the Raspberry Pi (using a Grove Connector, no less) and then you have all four of the connector types possible.   The software for reading the I2C is simple and easily available.   Check out the latest postings on the SwitchDoc Labs Blog for more information [ref:  www.switchdoc.com] about those drivers.

The Four Types of Grove Connectors

Now, lets talk about some of the specifics of each of the four types of connectors.  First of all, physically all of them are the same.  Exactly.   The differences are in the signal types that are provided.   Now, note.   You will never short out power and ground by misplugging one type of Grove connector in the other.   However, it is possible to plug a 3.3V Grove Module into a 5.0V Grove connector and damage the device.   The same could happen with an output coming back from a Grove button or switch for example into another output.   While you do need to be careful and think about what you are doing, it is a lot less risky than soldering or using just jumpers to wire up devices to your Pi or Arduino.

Generically, all of the Grove connectors are wired the same:  Signal 1, Signal 2, Power, Ground.

Wire Colors

Wire colors on standard Grove Cables are always the same.

Grove Adaptor Cable on SunAirPlus
Grove Adaptor Cable on SunAirPlus

Pin 1 – Yellow (for example, SCL on I2C Grove Connectors)

Pin 2 – White (for example, SDA on I2C Grove Connectors)

Pin 3 – Red – VCC on all Grove Connectors

Pin 4 – Black – GND on all Grove Connectors

 

Grove Digital

Figure 8
Simple Digital Grove Module with LED

A digital Grove connector consists of the standard four lines coming into the Grove plug.   The two signal lines are generically called D0 and D1.  Most modules only use D0, but some do (like the LED Bar Grove display) use both.   Often base units will have the first connector called D0 and the second called D1 and they will be wired D0/D1 and then D1/D2, etc.

Examples of Grove Digital modules are:   Switch Modules, the Fan Module, and the LED Module.  In Figure 8, you can see what the Grove connector looks like on the schematic for the LED Grove module.   They range from the simple to the very complex.

Screen Shot 2016-02-20 at 11.44.24 AM

Grove Analog

Grove Analog Simple Voltage Divider
Grove Analog Simple Voltage Divider

An Grove Analog connector consists of the standard four lines coming into the Grove plug.   The two signal lines are generically called A0 and A1.  Most modules only use A0.   Often base units will have the first connector called A0 and the second called A1 and they will be wired A0/A1 and then A1/A2, etc.

Examples of Grove Analog modules are:  Potentiometer, Voltage Divider and my personal favorite, the Grove Air Quality Sensor that will be available shortly from SwitchDoc Labs.

Screen Shot 2016-02-20 at 11.44.43 AM

Grove UART

Grove UART RFID Reader
Grove UART RFID Reader

 

The Grove UART module is a specialized version of a Grove Digital Module.  It uses both Pin 1 and Pin 2 for the serial input and transmit.  The Grove UART plug is labeled from the base unit point of view.   In other words, Pin 1 is the RX line (which the base unit uses to receive data, so it is an input) where Pin 2 is the TX line (which the base unit uses to transmit data to the Grove module).

 

Examples of Grove UART modules are:  XBee Wireless Sockets, 125KHz RFID Reader

Screen Shot 2016-02-20 at 11.44.58 AM

Grove I2C

IMG_6968 2
Grove I2C I2C 4 Channel Mux Board

Those long term readers of this blog know that our favorite devices are I2C sensors.   There are many types of I2C Grove sensors available.   Most are 5V/3.3V devices, but there are a few that are only 3.3V or 5.0V.  You need to check the specifications.

The Grove I2C connector has the standard layout.   Pin 1 is the SCL signal and Pin 2 is the SDA signal.   Power and Ground are the same as the other connectors.  This is another special version of the Grove Digital Connector.  In fact, often the I2C bus on a controller (like the ESP8266, Raspberry Pi and the Arduino) just uses Digital I/O pins to implement the I2C bus.  The pins on the Raspberry Pi and Arduino are special with hardware support for the I2C bus.  The ESP8266 is purely software.

 

Screen Shot 2016-02-23 at 7.51.46 PM

 

What Kind of Grove Cables are Available?

There are many different length as specialized Grove cables available.  Below are some of the more common cables available.

Grove-4-Pin-Connector-to-Female-Jumper-Wire-Cable-5-pack-600x600

Figure 9

Figure 10

 

 

 

 

 

 

Coming Up Next

In part 2 of this tutorial, we will be showing a number of examples of using Grove modules to build systems and projects.

2 Comments

32 Trackbacks / Pingbacks

  1. Grove/Pin Version of INA3221 3 Channel Current Measurement Breakout Board - SwitchDoc Labs
  2. New Kickstarter Starting Tomorrow - The Missing Boards for the Raspberry Pi - SwitchDoc Labs
  3. Sun Tracking for More Solar Power - Part 1 - The Hardware - SwitchDoc Labs
  4. Kickstarter at 230%. Pi2Grover Specification Released - Grove to Raspberry Pi - SwitchDoc Labs
  5. Sun Tracking for Solar Power - Part 3 - The Results - SwitchDoc Labs
  6. Kickstarter at 332% - Last week for The Missing Boards for the Raspberry Pi - SwitchDoc Labs
  7. Tutorial: Measuring Current in Raspberry Pi and Arduino Projects - SwitchDoc Labs
  8. Pi2Grover - Grove Interface for the Raspberry Pi Released - SwitchDoc Labs
  9. Tutorial: DataLogger #1 - Measure/Graph/Log Current with the Raspberry Pi - SwitchDoc Labs
  10. Secrets of OurWeather - Weather Kit for STEM Kids - SwitchDoc Labs
  11. Tutorial: DataLogger #2 - Measure/Graph/Log Current with the Raspberry Pi - SwitchDoc Labs
  12. OurWeather REST Interface to the Raspberry Pi Released - SwitchDoc Labs
  13. New Kickstarter is Live! The Weather Board for the Raspberry Pi! - SwitchDoc Labs
  14. Kickstarter Weather Board for the Raspberry Pi over 300% - SwitchDoc Labs
  15. Specification for the Weather Board for the Raspberry Pi Released. Kickstarter over 800%. - SwitchDoc Labs
  16. Tutorial: WatchDog Timer - Adding a Status Bit - SwitchDoc Labs
  17. New Kickstarter! Solar - Grove Low Power Mini Pro Arduino Compatible Board - SwitchDoc Labs
  18. Tutorial: Part 1 -Building a Solar Powered Raspberry Pi Weather Station - GroveWeatherPi - SwitchDoc Labs
  19. GroveWeatherPi – Raspberry Pi Based Weather Station – No Soldering Required « Fribliss
  20. OurWeather - WeatherUnderground Interface Released - SwitchDoc Labs
  21. Tutorial: Grove Connector Project Examples for Raspberry Pi / Arduino - SwitchDoc Labs
  22. New! WXLink Product Released for Mini Pro LP Arduino Board - SwitchDoc Labs
  23. New! Solar WXLink Product Released for Mini Pro LP Arduino Board - SwitchDoc Labs
  24. Simple IOT Sunlight Sensing Raspberry Pi Project - SunIOT Part 1 - SwitchDoc Labs
  25. Solar Power - Sizing the Solar Panels for OurWeather - SwitchDoc Labs
  26. New Product - 3.3V to 5V I2C Converter / Hub - SwitchDoc Labs
  27. Tutorial - Using an Analog to Digital Converter with your Raspberry Pi - SwitchDoc Labs
  28. Tutorial - Part 2 – Using an Analog to Digital Converter with your Raspberry Pi - SwitchDoc Labs
  29. New Kickstarter! SmartPlantPi - Raspberry Pi Based Plant Monitoring and Watering System Kit - SwitchDoc Labs
  30. Tutorial: Using a Grove Button on Smart Plant Pi Kickstarter - Raspberry Pi - SwitchDoc Labs
  31. SmartPlantPi - One more day on Kickstarter! Successful! Raspberry Pi DIY Kit. - SwitchDoc Labs
  32. New OurWeather Software Released - WXLink and Solar Support - SwitchDoc Labs

Comments are closed.