Adafruit now has Teensy -> Feather adapter

Status
Not open for further replies.

MichaelMeissner

Senior Member+
I noticed that Adafruit now has an adapter that converts the pin layout of a Teensy to their Feather microprocessors (arm cortex M0 or avr 32u4) to allow you to mount their various feather wings (i.e. feather shields). https://www.adafruit.com/product/3200

I do find it amusing that product ID for this is 3200, and it is made for Teensy 3.2, but then I find various things amusing.
 
Last edited:
I'd say that's cool - but this says that and more:
Oh man, is this not the best thing ever? You can now use the awesome Teensy 3 with any and all of our FeatherWings or Feather accessories and even get built-in LiPoly charging!

This Feather adapter rearranges the pins of a Teensy 3.x to give you the same shape and pinout for our Feathers. We've tested our FeatherWings so far and all are drop-in compatible. It's a great way to take advantage of the Feather ecosystem. Give your Teensy a stepper/DC motor driver, GPS, LED matrix or OLED add-on with ease. With the space left over, we even added in a 500mA LiPoly charger that automatically charges over USB and will switch over to the LiPo when USB is unplugged. There's also a 100K resistor divider for monitoring the battery voltage connected to A7
 
They sent me a prototype weeks ago for testing. Been keeping it quite 'til they released the product. I can confirm it works well. :)
 
Mine is coming tomorrow, so perhaps there is something in the shipments that indicates what to hook up. Adafruit normally provides hookup instructions, but I guess they assumed the average teensy use didn't need them, and that we should connect all of the pins.

Paul, did you have to cut the VIN-VUSB link to enable the li-po support? Somebody asked the same question in the Adafruit forums, but so far there is no answer. I would suspect that the circuit is such so that if there is any power on VUSB, that the battery goes into charging only mode, and normal power flows to VIN from the USB connection. If you remove the power from VUSB, then the li-po will connect the battery to VIN, and it will run at 3.7v. I can imagine it isn't set up for hot-pluging, and there might be a small period of time after removing the USB cord before the battery is enabled. It also would mean that you can't power the Teensy directly by applying power to VIN if a battery is connected.

I wonder how fast the li-po battery is charged. Normal rates are 100mA and 500mA. I would hope it charges at the 500mA rate. Since the tiny 100mA li-po batteries make no sense on the much bigger Teensy.

Likewise there is a solder jumper that appears to be connected to the program button. I assume this is so you can decide whether to enable the program function or not (since most of the feather wings seem to bring out the program button).
 
I haven't soldered mine yet, but I've been playing ways to mount it. The OLED feather wing is the main wing I'm interested in, in that it would give the ability to have a small OLED screen directly attached to the Teensy to give feedback, without having the display flop around. Secondarily, the server and motor wings might be useful, as will provide ways to drive servos and motors in a small footprint.

The feather system is a compromise, in that it provides common access among 5 different microprocessors (AVR 32u4, Arm Cortex M0, Teensy 3.x/LC, ESP8266, and WICED) to a common set of wings (shields). And within the AVR/ARM microprocessors, Adafruit gives alternate boards, that provide additional features (data logger, various radios, etc.). In terms of the wings for use with Teensy, the compromise is the wing only provides one serial port (using Serial1 in the case of the Teensy), one SPI port (using the standard 11/12/13 pins and pin 10 is used for CS by some of the wings), one i2c port (using the standard 18/19 pins), 4 analog inputs (A0/A1/A2/A3/A6 pins), one analog input/output (A14 for Teensy 3.2 or A12 for Teensy LC), 7 digital input/outputs (3/4/5/6/8/9/10 pins), a reset button (program button on Teensy), AREF, 3.3v power, 5v power (called USB, but connected to VIN, not VUSB), ground, and a direct battery pin. Most of the wings only use i2c, spi, or uart, but a few use specific pins as well.

I noticed that the JST connector for the battery on the back is far enough away that you could connect Frank B's connector board 2 (https://oshpark.com/shared_projects/0T6ZdhhG) if you wanted access to the pads underneath the Teensy, while also accessing the feather wings. The fit is a little tight, and you would have to raise the Teensy + connector board up slightly so that Franks board fits in the indentation of the JST connector. I'm not sure I ultimately will connect Frank's board, or leave it out.

I am thinking of attaching the LC prop shield underneath the Adapter. Originally, I thought the OLED wing was using pins 5 & 6 for two of the tactile buttons (those pins are used by the prop shield for the audio enable and flash memory enable SPI CS pins), but I misread the pin assignment list, and the translated pins used are 3, 4, and 8, which are not used by the prop shield.

The audio shield (and anything using i2s) would not be compatible, because the Audio shield uses pin 14 (A0) as the alternate SCLK, in order to use pin 13 as the i2s RX.

The WIZ820io shield looks like it would be compatible assuming the feather wings don't use pins 4, 8, or 9, and also don't use SPI. Note, the Feather ethernet wing is expected to be announced this week, so that might be another option.

What I know of the Teensy 3.5/3.6 layouts, they probably are not be compatible, since the extra pins stretch out where the li-po JST connector is. There are ways I can imagine mounting (mounting the Teensy adapter under the Teensy, and using the Feather doubler to mount the feather wing off to the side, instead of on top of the Teensy), or de-soldering the li-po JST connector.
 
Last edited:
I have several of the Feather Teensy units and have wired one up to the PJRC ILI9341 display (not the touch one). This display works fine with regular Teensy 3.2 ( not mounted in Feather) projects but I can't get it to work with the Feather mounted Teensy 3.2.

I have tried to find a schematic for the Teensy Feather but so far I haven't and perusing what schematics there are for other Feather units it seems that the pin designations change SCK, MOIS, MISO don't change pins but their Feather pin numbers do.

But as we are using a Teensy 3.2 as the brain I would think that we should use the Teensy 3.2 pin numbers?

I have gone over the wiring and it all seems correct.

The LCD is flckering in time with the changing graphic code but no image is forming, it is white to blocky greys.

I will check wiring again but has anyone got this combination to work?

The sketch I am using is the graphictest from ILI9341_ts.

Code:
/***************************************************
  This is our GFX example for the Adafruit ILI9341 Breakout and Shield
  ----> http://www.adafruit.com/products/1651

  Check out the links above for our tutorials and wiring diagrams
  These displays use SPI to communicate, 4 or 5 pins are required to
  interface (RST is optional)
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  MIT license, all text above must be included in any redistribution
 ****************************************************/


#include "SPI.h"
#include "ILI9341_t3.h"

// For the Adafruit shield, these are the default.
#define TFT_DC  9
#define TFT_CS 10


// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
ILI9341_t3 tft = ILI9341_t3(TFT_CS, TFT_DC);


void setup() {
  tft.begin();
  tft.fillScreen(ILI9341_BLACK);
  tft.setTextColor(ILI9341_YELLOW);
  tft.setTextSize(2);
  tft.println("Waiting for Arduino Serial Monitor...");

  Serial.begin(9600);
  while (!Serial) ; // wait for Arduino Serial Monitor
  Serial.println("ILI9341 Test!"); 

  // read diagnostics (optional but can help debug problems)
  uint8_t x = tft.readcommand8(ILI9341_RDMODE);
  Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(ILI9341_RDMADCTL);
  Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(ILI9341_RDPIXFMT);
  Serial.print("Pixel Format: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(ILI9341_RDIMGFMT);
  Serial.print("Image Format: 0x"); Serial.println(x, HEX);
  x = tft.readcommand8(ILI9341_RDSELFDIAG);
  Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX); 
  
  Serial.println(F("Benchmark                Time (microseconds)"));

  Serial.print(F("Screen fill              "));
  Serial.println(testFillScreen());
  delay(200);

  Serial.print(F("Text                     "));
  Serial.println(testText());
  delay(600);

  Serial.print(F("Lines                    "));
  Serial.println(testLines(ILI9341_CYAN));
  delay(200);

  Serial.print(F("Horiz/Vert Lines         "));
  Serial.println(testFastLines(ILI9341_RED, ILI9341_BLUE));
  delay(200);

  Serial.print(F("Rectangles (outline)     "));
  Serial.println(testRects(ILI9341_GREEN));
  delay(200);

  Serial.print(F("Rectangles (filled)      "));
  Serial.println(testFilledRects(ILI9341_YELLOW, ILI9341_MAGENTA));
  delay(200);

  Serial.print(F("Circles (filled)         "));
  Serial.println(testFilledCircles(10, ILI9341_MAGENTA));

  Serial.print(F("Circles (outline)        "));
  Serial.println(testCircles(10, ILI9341_WHITE));
  delay(200);

  Serial.print(F("Triangles (outline)      "));
  Serial.println(testTriangles());
  delay(200);

  Serial.print(F("Triangles (filled)       "));
  Serial.println(testFilledTriangles());
  delay(200);

  Serial.print(F("Rounded rects (outline)  "));
  Serial.println(testRoundRects());
  delay(200);

  Serial.print(F("Rounded rects (filled)   "));
  Serial.println(testFilledRoundRects());
  delay(200);

  Serial.println(F("Done!"));

}


void loop(void) {
  for(uint8_t rotation=0; rotation<4; rotation++) {
    tft.setRotation(rotation);
    testText();
    delay(1000);
  }
}

unsigned long testFillScreen() {
  unsigned long start = micros();
  tft.fillScreen(ILI9341_BLACK);
  tft.fillScreen(ILI9341_RED);
  tft.fillScreen(ILI9341_GREEN);
  tft.fillScreen(ILI9341_BLUE);
  tft.fillScreen(ILI9341_BLACK);
  return micros() - start;
}

unsigned long testText() {
  tft.fillScreen(ILI9341_BLACK);
  unsigned long start = micros();
  tft.setCursor(0, 0);
  tft.setTextColor(ILI9341_WHITE);  tft.setTextSize(1);
  tft.println("Hello World!");
  tft.setTextColor(ILI9341_YELLOW); tft.setTextSize(2);
  tft.println(1234.56);
  tft.setTextColor(ILI9341_RED);    tft.setTextSize(3);
  tft.println(0xDEADBEEF, HEX);
  tft.println();
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(5);
  tft.println("Groop");
  tft.setTextSize(2);
  tft.println("I implore thee,");
  tft.setTextSize(1);
  tft.println("my foonting turlingdromes.");
  tft.println("And hooptiously drangle me");
  tft.println("with crinkly bindlewurdles,");
  tft.println("Or I will rend thee");
  tft.println("in the gobberwarts");
  tft.println("with my blurglecruncheon,");
  tft.println("see if I don't!");
  return micros() - start;
}

unsigned long testLines(uint16_t color) {
  unsigned long start, t;
  int           x1, y1, x2, y2,
                w = tft.width(),
                h = tft.height();

  tft.fillScreen(ILI9341_BLACK);

  x1 = y1 = 0;
  y2    = h - 1;
  start = micros();
  for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
  x2    = w - 1;
  for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
  t     = micros() - start; // fillScreen doesn't count against timing

  tft.fillScreen(ILI9341_BLACK);

  x1    = w - 1;
  y1    = 0;
  y2    = h - 1;
  start = micros();
  for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
  x2    = 0;
  for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
  t    += micros() - start;

  tft.fillScreen(ILI9341_BLACK);

  x1    = 0;
  y1    = h - 1;
  y2    = 0;
  start = micros();
  for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
  x2    = w - 1;
  for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
  t    += micros() - start;

  tft.fillScreen(ILI9341_BLACK);

  x1    = w - 1;
  y1    = h - 1;
  y2    = 0;
  start = micros();
  for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
  x2    = 0;
  for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);

  return micros() - start;
}

unsigned long testFastLines(uint16_t color1, uint16_t color2) {
  unsigned long start;
  int           x, y, w = tft.width(), h = tft.height();

  tft.fillScreen(ILI9341_BLACK);
  start = micros();
  for(y=0; y<h; y+=5) tft.drawFastHLine(0, y, w, color1);
  for(x=0; x<w; x+=5) tft.drawFastVLine(x, 0, h, color2);

  return micros() - start;
}

unsigned long testRects(uint16_t color) {
  unsigned long start;
  int           n, i, i2,
                cx = tft.width()  / 2,
                cy = tft.height() / 2;

  tft.fillScreen(ILI9341_BLACK);
  n     = min(tft.width(), tft.height());
  start = micros();
  for(i=2; i<n; i+=6) {
    i2 = i / 2;
    tft.drawRect(cx-i2, cy-i2, i, i, color);
  }

  return micros() - start;
}

unsigned long testFilledRects(uint16_t color1, uint16_t color2) {
  unsigned long start, t = 0;
  int           n, i, i2,
                cx = tft.width()  / 2 - 1,
                cy = tft.height() / 2 - 1;

  tft.fillScreen(ILI9341_BLACK);
  n = min(tft.width(), tft.height());
  for(i=n; i>0; i-=6) {
    i2    = i / 2;
    start = micros();
    tft.fillRect(cx-i2, cy-i2, i, i, color1);
    t    += micros() - start;
    // Outlines are not included in timing results
    tft.drawRect(cx-i2, cy-i2, i, i, color2);
  }

  return t;
}

unsigned long testFilledCircles(uint8_t radius, uint16_t color) {
  unsigned long start;
  int x, y, w = tft.width(), h = tft.height(), r2 = radius * 2;

  tft.fillScreen(ILI9341_BLACK);
  start = micros();
  for(x=radius; x<w; x+=r2) {
    for(y=radius; y<h; y+=r2) {
      tft.fillCircle(x, y, radius, color);
    }
  }

  return micros() - start;
}

unsigned long testCircles(uint8_t radius, uint16_t color) {
  unsigned long start;
  int           x, y, r2 = radius * 2,
                w = tft.width()  + radius,
                h = tft.height() + radius;

  // Screen is not cleared for this one -- this is
  // intentional and does not affect the reported time.
  start = micros();
  for(x=0; x<w; x+=r2) {
    for(y=0; y<h; y+=r2) {
      tft.drawCircle(x, y, radius, color);
    }
  }

  return micros() - start;
}

unsigned long testTriangles() {
  unsigned long start;
  int           n, i, cx = tft.width()  / 2 - 1,
                      cy = tft.height() / 2 - 1;

  tft.fillScreen(ILI9341_BLACK);
  n     = min(cx, cy);
  start = micros();
  for(i=0; i<n; i+=5) {
    tft.drawTriangle(
      cx    , cy - i, // peak
      cx - i, cy + i, // bottom left
      cx + i, cy + i, // bottom right
      tft.color565(0, 0, i));
  }

  return micros() - start;
}

unsigned long testFilledTriangles() {
  unsigned long start, t = 0;
  int           i, cx = tft.width()  / 2 - 1,
                   cy = tft.height() / 2 - 1;

  tft.fillScreen(ILI9341_BLACK);
  start = micros();
  for(i=min(cx,cy); i>10; i-=5) {
    start = micros();
    tft.fillTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
      tft.color565(0, i, i));
    t += micros() - start;
    tft.drawTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
      tft.color565(i, i, 0));
  }

  return t;
}

unsigned long testRoundRects() {
  unsigned long start;
  int           w, i, i2,
                cx = tft.width()  / 2 - 1,
                cy = tft.height() / 2 - 1;

  tft.fillScreen(ILI9341_BLACK);
  w     = min(tft.width(), tft.height());
  start = micros();
  for(i=0; i<w; i+=6) {
    i2 = i / 2;
    tft.drawRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(i, 0, 0));
  }

  return micros() - start;
}

unsigned long testFilledRoundRects() {
  unsigned long start;
  int           i, i2,
                cx = tft.width()  / 2 - 1,
                cy = tft.height() / 2 - 1;

  tft.fillScreen(ILI9341_BLACK);
  start = micros();
  for(i=min(tft.width(), tft.height()); i>20; i-=6) {
    i2 = i / 2;
    tft.fillRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(0, i, 0));
  }

  return micros() - start;
}
 
Is the only connected hardware : Teensy + Feather_Adapter + ILI9341 - with the ILI9341 the only SPI device on those lines?
 
Yeah, I wish they had published a schematic (or even simple how-to discussions).

I've been wondering if they have pull-up resistors for the i2c bus.
 
I was looking up there as well, but did not see anything, also they were out of stock.

I was thinking about maybe using one on my well project, for battery power stuff, but maybe better to roll my own. Also looked to order pjrc touch display but also out of stock...
 
I was looking up there as well, but did not see anything, also they were out of stock.

I was thinking about maybe using one on my well project, for battery power stuff, but maybe better to roll my own. Also looked to order pjrc touch display but also out of stock...

In terms of battery and charging, there are the onehorse chargers that fit directly on the Teensy, and the Adafruit Trinket Pro backpack:
 
I've been wondering if they have pull-up resistors for the i2c bus.
FWIW, they do have pull-up resistors to allow i2c devices to work, and I've soldered my LC prop shield to the Teensy 3.2 and Feather wing adapter. I2c devices do seem to work (feather 128x32 OLED and a ds3231 real time clock), at least it works once I went over the solder connections to make sure every pin is soldered and has an electrical connection.

I would suspect that given the setup now has two sets of pull-up resistors that I might not achieve higher speeds. But it works for 100kps and with my setup.

I've put together a spreadsheet that shows the pin mappings of the various feather processors that I could find, including the Teensy:
 
Hi Michael,

Sounds like you are making progress. I may take a look at at onehorse chargers for my project. The bright side it is a one off project, so I can try it any which way. What I was not sure of with his products if they also run the Teensy off of the Lipo power when the USB (or external connector) power is removed... Again will continue on other (Well monitoring ) thread.

Looking at the pictures of the the adapter, I am surprised that feather wing has any Pull up resistors on SCL/SDA Looks like they have routing going directly from A4/A5 to their SCL/SDA pins. The only two obvious resistors on the adapter:
3200-04.jpg

Right by the word Feather, appear to be the Voltage Divider they mention and route to A7

Should mention there is probably a third resistor near the IC and power connector that are probably part of charging circuit, and maybe one near LED, although might be something else (TVS/Diode)
 
Last edited:
"if they also run the Teensy off of the Lipo power when the USB (or external connector) power is removed"

Yes, that's the whole point.
 
The lipo battery is connected to the VBAT pin. With a fully charged battery, the VBAT pin on the K20 microcontroller is > 4V. This is more than the max rating (3.8V) for this pin.

edit:
on the product page:
Rev A accidentally connects the Teensy's RTC VBAT pin to the Lipoly Battery, which may overdrive that pin - to resolve simply do not solder in the Teensy's VBAT pin when assembling!
 
Last edited:
Ah, thanks for the update. Now to see if I can cut the pin, since I've already soldered the Feather adapter, a Teensy 3.2, and prop shield all together. :)

I suspect it is why it isn't in stock after selling out. They need to re-engineer it and get new pcb's.
 
I think it was just today Limor was notified of and realized the VBAT bug. As for out-of-stock, Adafruit seems to typically make a small run when they first introduce a product. They gauge future demand based on how fast it sells out, and also have a chance to fix bugs in the next batch. They've even mentioned this strategy in their videos (I think one of the latest ones in the series about Circuit Playground).
 
I posted this over at the Adafruit forum, where somebody was asking whether if he/she used the feather adapter, whether he/she would lose access to the bottom pads (https://forums.adafruit.com/viewtopic.php?f=57&t=101377&p=508269#p508269):

I finally wired up my prop shield, feather adapter, FrankB adapter to get at the bottom pins, and Teensy 3.2. I soldered everything together directly. However the bottom pins are a little short to fit in a standard stacking header, and my soldering job could be better.

Any way, step 1 was to solder the long pins to the Teensy, which on the 14 pin rows, I had just enough of the pin sticking through the Teensy to solder on the top (you need to solder it on the top so that the FrankB shield will fit underneath directly. I had the feather and prop shields in place, to make sure I was soldering the pins to the right length.

Step 2 was to solder long pins for the back, taking out the pin for Vbattery. Note, the pins are moved up so when you attach the prop shield they just protrude under the prop shield, and using diagonal cutters to trim the pins down.

Step 3 was to solder normal male headers to the 4 inside pins, using a 5 pin header, and taking out one pin, since Vusb is 0.2" from Aref, A10, and A11.

Step 4 was to solder a wire to the reset pad under the Teensy, so that I can reset it without having to go into programming mode.

Step 5 was to solder the FrankB adapter underneath the Teensy. I should have made sure that all of the pins were connected before going to the next stages, but I didn't, and one of the pins does not seem to be connected.

Step 6 is to solder small female headers into the 2x7 pins brought out by the FrankB adapter. I had to go over these headers with a rotary tool to make sure all of the edges were sanded down, so the stacking headers on the feather adapter could be mounted.

Step 7 is to solder a small protoboard on the left side, that I will eventually use to bring out Vbattery, A10, A11, reset, program, etc. into a area with female or male headers.

Here are two pictures after step 7:
2016-08-13-21-18-001-electronics.jpg

2016-08-13-21-19-002-electronics.jpg


Step 8 is to solder the Feather adapter underneath the Teensy, FrankB shield, and protoboard.

Step 9 is to solder the stacking headers to the feather adapter so that feather wings can be added. Before soldering, I put the headers into the feather board, and used a sharpie to indicate where to cut the pins, and I cut the pins with diagonal cutters, so the stacking header pins did not protrude too much under the feather adapter. I put in an already soldered feather wing into the stacking header, so that the headers were positioned correctly.
2016-08-13-21-46-003-electronics.jpg


Step 10 is to solder the 4 pin right angle headers to the prop shield to bring out the speaker pins on one side, and the LED pins on the other.

Step 11 is to solder the prop shield underneath the Feather board.

Step 12 is to make sure everything works. I used the OLED feather wing. As was discussed in https://forums.adafruit.com/viewtopic.php?f=57&t=100042, the OLED adapter has some problems with Teensys. At times, I would lower the Teensy's speed to 48Mhz instead of 96Mhz w/overclock, so that the OLED would work (usually after I got it running at 48Mhz, I could raise the speed back to 96Mhz).
2016-08-13-23-39-004-electronics.jpg
 
Nice job !

Thanks. If I ever redo it, I will pay a little more attention to making clean, small soldering joints, as I had solder runs down some of the legs, which made it a little taller, as I couldn't get the boards closer together as I had when I was figuring out the layout. That in turn made the final legs a little on the short side.
 
...

I've put together a spreadsheet that shows the pin mappings of the various feather processors that I could find, including the Teensy:

Sorry to dig up an old thread but on the Feather Tab of your shared spreadsheet shouldn't cells M5-19 be shifted to M6-20 and M5 say L0? I am about to wire up my extra teensy and feather/OLED set up and just double checking a couple things. As I understand it I should leave the L0 pin out on the OLED Feather and the Vbat pin out of the Teensy to Feather adapter. Then to use your solution to the reset issue jumper the empty pin hole L0 to L8 a.k.a. Teensy A0/14. Correct? Also the other pins across the end of the Teensy between 12 and 13 don't seem to go anywhere useful. Ok to just leave all 5 empty? Thanks!
 
Status
Not open for further replies.
Back
Top