Skip to content

Wireling Adapter TinyShield

TinyCircuits Wireling Adapter TinyShield product photo

This TinyShield features a 4-channel Multiplexer, on-board voltage regulation and level shifting, and allows you to add up to 4 Wirelings to your project per board with ease!

Up to 8 Wireling Adapters may be stacked together by changing the address resistors on the board. I/O Pin 4 is used to control power to the Wireling Adapter. Driving it high will activate the Adapter board and its sensors, while driving it low will power down the board and its sensors to save on power consumption! Using a multiplexer also allows you to use two or more I²C devices with the same address, without interference problems.

NOTE: When bringing the device out of low power mode, it may be necessary to re-initialize certain sensors. Check the component datasheets to ensure proper operation and setup times for each Wireling is used.

Technical Details

    TECH SPECS

    MULTIPLEXER Specs

    • I²C Bus 
    • Four Active-Low Interrupt Inputs
    • Active-Low Interrupt Output
    • Three Address Pins 

      TinyDuino Power Requirements

      • Voltage: 3.0V - 5.5V 

      Pins Used

      • A5/SCL - I²C Serial Clock line
      • A4/SDA - I²C Serial Data line
      • INT - Optional IO2 or IO3 on TinyDuino
      • IO4 - Power Control 

      Dimensions

      • 20mm x 20mm (.787 inches x .787 inches)
      • Max Height (from the bottom of 32-pin expansion connector to top Wireling Connector): 5.9mm (0.23 inches)
      • Weight: 1 gram (.04 ounces)

      Hardware Assembly

      To use the Wireling Adapter TinyShield, you will need a TinyCircuits processor that has the 32-pin tan connector:

      Processor Adapter
      *TinyDuino and USB TinyShield Wireling Adapter TinyShield
      *TinyZero Wireling Adapter TinyShield
      *TinyScreen+ Wireling Adapter TinyShield
      *RobotZero Wireling Adapter TinyShield

      If you'd like to use a Wireling to test the adapter, be sure you have a Wireling Cable handy to plug it into the adapter.

      Connect the Wireling Adapter TinyShield to the processor you are using, and connect the board stack to your computer using a Micro USB Cable.


      Software setup

      You will need the Arduino IDE to program any of the boards name above, so be sure to install it before proceeding!

      The Wireling library is used with the Wireling Adapter TinyShield and every part of the Wireling family. It includes basic helper functionality to make Wireling usage simpler. If you have not already downloaded the library from under the the Software section above, do that now and save the library to the proper folder. For some options on installing into a library, check out our Library Installation Help Page.


      Upload Program

      The example program included with the Wireling library detects Wirelings attached to it's ports. You can open the program from the Arduino IDE under File/Examples/Wireling/WirelingScanner.

      Or you can open it from your Folder Explorer under Documents/Arduino/libraries/Wireling/examples/WirelingScanner and doubke-click it to open in the Arduino IDE.

      Wireling Program
      //-------------------------------------------------------------------------------
      //  TinyCircuits Wireling Basic Example
      //  Last Updated 4 December 2019
      //
      //  This example shows how to scan for I2C devices on each port as well as print
      //  out the state of the analog pin on each port.
      //
      //  Written by Ben Rose for TinyCircuits, https://TinyCircuits.com
      //-------------------------------------------------------------------------------
      
      #include <Wire.h>
      #include <Wireling.h>
      
      #if defined (ARDUINO_ARCH_AVR)
      #define SerialMonitorInterface Serial
      #elif defined(ARDUINO_ARCH_SAMD)
      #define SerialMonitorInterface SerialUSB
      #endif
      
      void setup() {
        Wire.begin();
        Wireling.begin();
        SerialMonitorInterface.begin(9600);
      }
      
      void loop() {
        for (byte port = 0; port < 4; port++) {
          Wireling.selectPort(port);
          SerialMonitorInterface.print("Port ");
          SerialMonitorInterface.print(port);
          SerialMonitorInterface.print(": ");
          int nDevices = 0;
          for (byte I2Caddress = 1; I2Caddress < 127; I2Caddress++ )
          {
            if (I2Caddress != 0x68 && I2Caddress != 0x70) { // Ignore the multiplexer and RTC address
      #if defined(_VARIANT_ROBOTZERO_)
              // On RobotZero, ignore the built in IMU, motor current setting digital potentiometer, and servo driver MCU
              if (I2Caddress != 0x1C && I2Caddress != 0x2F && I2Caddress != 0x6A) {
      #endif
                Wire.beginTransmission(I2Caddress);
                if (!Wire.endTransmission()) { // This means that a device has acknowledged the transmission
                  SerialMonitorInterface.print(" 0x");
                  if (I2Caddress < 16) {
                    SerialMonitorInterface.print("0");
                  }
                  SerialMonitorInterface.print(I2Caddress, HEX);
                  nDevices++;
                }
      #if defined(_VARIANT_ROBOTZERO_)
              }
      #endif
            }
          }
          if (nDevices == 0) {
            SerialMonitorInterface.print("None\t");
          } else {
            SerialMonitorInterface.print("\t");
          }
          int portAnalogPin = A0 + port;
          if (digitalRead(portAnalogPin)) {
            SerialMonitorInterface.print("High");
          } else {
            SerialMonitorInterface.print("Low");
          } 
          SerialMonitorInterface.print("\t");
        }
        SerialMonitorInterface.println();
      
      }
      

      This program works best if you have Wirelings to test with, as the Serial Monitor when opened will report the LOW/HIGH status, as well as the I²C address of any device on a given port (0-3).

      If you ever encounter issues later on with Wirelings, you can come back to this program to make sure you are still receiving some type of signal from the port and device you are using.

      Now you are ready to build any Wireling project!


      Adding more Wireling TinyShields

      You can add up to 8 total Wireling Adapter TinyShields per processor. To add more with different addressable ports, you need to edit one or more of the address resistors populated on the board next to the 32-pin tan connector.

      Mux Address: Resistor Pattern (Where red resistor is removed) Ports to Select:
      0x70 R16 R14 R12 0-3
      0x71 R16 R14 R12 4-7
      0x72 R16 R14 R12 8-11
      0x73 R16 R14 R12 12-15
      0x74 R16 R14 R12 16-19
      0x75 R16 R14 R12 20-23
      0x76 R16 R14 R12 24-27
      0x77 R16 R14 R12 28-31

      In order to change the address of a TinyShield, one or more of the address resistors needs scraped off (the resistors highlighted in red will need scraped off). To scrape off one of these tiny resistors, it is best to use a utility knife. Be very careful when using a utility knife, they are sharp!

      Then you can access the Wirelings connected to the modified TinyShield using the same Wireling.selectPort(), just with the updated port numbers shown in the last column of the above table.


      Downloads


      Contact Us

      If you have any questions or feedback, feel free to email us or make a post on our forum. Show us what you make by tagging @TinyCircuits on Instagram, Twitter, or Facebook so we can feature it.

      Thanks for making with us!