Skip to content

Wireling Adapter TinyShield

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)

      Materials

      Hardware

      Software


      Hardware Assembly

      To use the Wireling Adapter TinyShield, you will need a TinyCircuits processor that has the 32-pin tan connector (TinyDuino and USB TinyShield OR TinyZero OR TinyScreen+ OR RobotZero).

      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

      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 R12 R11 R10 0-3
      0x71 R12 R11 R10 4-7
      0x72 R12 R11 R10 8-11
      0x73 R12 R11 R10 12-15
      0x74 R12 R11 R10 16-19
      0x75 R12 R11 R10 20-23
      0x76 R12 R11 R10 24-27
      0x77 R12 R11 R10 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.


      Contact Us

      If you have any questions or feedback, feel free to email us at info@tinycircuits.com or make a post on the forum.

      Show us what you make by tagging @TinyCircuits on Instagram, Twitter, or Facebook so we can feature it!

      Thanks for making with us!


      Downloads