Weensy 3.6 now available

Status
Not open for further replies.

rhyde

Active member
The Teensy 3.6 is an open-source/open-hardware (Creative Commons 4.0 Attribution International license) board that provides I/O expansion and breakout capabilities for a Teensy 3.6 module. The Weensy 3.6 offers the following features:

  • Open Hardware design based on Creative Commons 4.0 license
  • Single 5V power supply input connector (screw terminals); provides 3.3V for Teensy 3.6 and other peripherals.
  • LED indicates when power is applied.
  • Adafruit-compatible Feather bus (compatible with software written for the feather adapter for the Teensy 3.2).
  • Two MCP23S17 GPIO expansion chips provide 24 I/O lines (presented on two PPDIO96-compatible 20-pin headers) and eight DIP switches.
  • PPDIO96 compatible connectors support PPOPTO-12 opto-isolator and PPRLYIO-12 relay-based input boards.
  • Eight PWM-compatible digital output lines are routed through a ULN2308 darlington array (high-current, 500ma/pin).
  • Eight Teensy 3.6 GPIO pins are brought out to a header through a 5V level shifter.
  • Watchdog timer actuates a relay after five-second timeout without a refresh operation (timeout period can be changed by swapping out a different resistor).
  • An LED indicates current watchdog timeout state.
  • Watchdog state (relay) is available on a three-pin header (relay NO, COM, and NC contact signals).
  • An LED indicates when the watchdog timer is being refreshed.
  • 3.3V level shifting (from Teensy 3.6) to 5V for many I/O pins.
  • RS232 level shifting (from TTL to RS-232 levels) for one RS-232 serial port (using Sparkfun Max3232 or FTDI cable).
  • I2C level shifting for two I2C ports (one of which is multiplexed to eight ports).
  • Provides 8 independent I2C ports (routed to four six-pin headers on the board).
  • I2C expansion bus connectors support PPAIO-16/4 analog I/O boards (as well as PPAC-4 and PPAC420 analog conditioning boards).
  • SPI bus expansion with eight independent chip select lines (routed to two headers on the board -- PPDIO96 bus and PPDO bus; note: one CS line controls the two on-board MCP23S17 GPIO expanders).
  • PPDIO96-compatible bus supports up to six PPDIO96 digital I/O boards (96 digital I/O lines/board, up to 576 additional I/O lines!).
  • PPDO-compatible bus supports up to 10 PPRelay-12 and/or PPSSR-16 relay/digital output boards.
  • Headers for Teensy 3.6 analog input (ADC) ports.
  • Headers for Teensy 3.6 analog output (DAC) ports.
  • Headers for Teensy 3.6 USB Host port.
  • Full buffering for output signals.
  • Interrupt support for digital input devices.
  • Test pins for various important signals are present on the PCB.
  • Software-controlled reset line for resetting peripherals.
  • Watchdog state is also broadcast to all peripheral boards.
  • Schematic and board layout are available in Eagle format.
  • DIN rail brackets are available in .STL format for 3D-printing.

All the files and associated documentation can be found here: http://www.plantation-productions.com/Electronics/Weensy/Weensy.html

The Weensy 3.6 is also part of the Plantation Productions' DAQ system (also open source/open hardware). This include digital I/O expansion boards (PPDIO96 -- 96 bits of I/O), relay output boards (PPRelay-12 and PPSSR-16), and analog I/O (PPAIO-16/4, 16 single-ended analog inputs and four analog outputs) as well as the PPAC4 and PPAC420 analog conditioning modules. There are also opto-isolation modules available (PPOPTO-12) and a specialty relay input module (PPRlyio-12). All open source/hardware. The DAQ system supports Netburner MOD54415, Raspberry Pi 3, and Teensy 3.2 modules for control. DAQ system can be found at http://www.plantation-productions.com/Electronics/DAQ/DAQ.html

Currently, I'm waiting for Weensy 3.6 Rev 4 boards to come back from the PCB house for final testing. They *should* work, but I'd recommend holding off making any of your own until I test them. Think of this an an initial comment period.
Cheers,
Randy Hyde
 
I would strongly suggest reexamining the use of those TXB0108 bidirectional level shifters (and the related but different TXS0108) as GPIO level shifters. For that purpose they are horrible. They present neither high impedance as inputs, nor low impedance as outputs, and thus don't work like people expect GPIOs to behave when hooked to many real-world devices that people hook to GPIOs. Worse yet, they are basically a high speed pair of buffers arranged in a positive feedback loop, so in many scenarios oscillate, producing mystifying symptoms for users who lack a scope..

They are for the purpose of interfacing only between two buses or at least bidirectional chips (_requiring_ the bidirectionality) that operate at different voltages, on PCBs with a reasonably controlled-impedance design. They are not for hooking up to random transistors, LEDs, switches, sensors and so on with long dangly jumper wires.

Numerous projects have gone down the path of using them based on a superficial reading of the data sheet and imagining them to be a cure-all, only to discover that they chronically misbehave because they are not being operated within their limited design parameters.

Examples:
-- Dragonboard "Sensors" daughterboard: https://www.seeedstudio.com/96Boards-Sensors-p-2617.html
-- Sparkfun Edison breakout: https://www.sparkfun.com/products/13038

Both of those I've personally used and found them unusable for the purpose intended by the boards, and very prone ro oscillate in practice. There are forum discussions for the Dragonboard (maybe for the Edison, I don't know).

Just yesterday I saw https://forum.pjrc.com/threads/23959-Teensy-Arduino-adapter-shield in which the project stalled due to unexpected behavior of... the TXB08xx's

One alternative, the single-MOSFET style of level-shifters are at least stable, but these also don't behave as expected as GPIOs. Only the pull-down is active, and has to be used with a pull-up resistor, so again presents neither hi-Z input nor low-Z output.

The only trouble-free way to make low voltage I/Os usable with with higher voltage external devices is to use unidirection separate input and output buffers (with 5V-tolerant input and 5V compatible output respectively), and enable them as needed using, for example, jumpers. That was the direction on the RPi's Gertboard, for example.

Hope this helps you avoid this same pitfall!
 
Thanks, I will redesign that part of it.
I've had only one issue to date, but most of my I/O is slow and/or unidirectional, which is why I've probably gotten away with it. The one problem I've had has been with the J2_38 pin (legacy name, just a GPIO pin). It works great as an output pin, not so great as input. This is probably the cause.
 
Last edited:
After researching the whole bi-directional level shifter issue a bit, I think that I've come to the conclusion that for the Teensy I'll have to use separate input and output buffers for the GPIO pins. I suspect the simplest solution is the following. Further comments?

LevelConverter.gif

Keep in mind I'll be soldering these SMD parts by hand (well, I do have a reflow station) so it's easier to put multiple solder pads down (and make sure I solder the right ones) than to put SMD pull-ups down.
My current plan is to stick about eight of these circuits on a little board that replaces the Adafruit level shifter. Obviously a pain in the butt insofar as one has to choose the direction in hardware (and solder the pads) before use, but if it clears up problems down the line this is what has to be done.
 
After researching the whole bi-directional level shifter issue a bit, I think that I've come to the conclusion that for the Teensy I'll have to use separate input and output buffers for the GPIO pins. I suspect the simplest solution is the following. Further comments?

Let's first establish that there's no perfect solution here, given that the user has to manually make a hardware change to select in or out to coordinate with the software settings (and external connected devices of course. That said:

Regarding pull-ups, you are aware that resistors are available in multiples like eight or more in chip form-factors, right? Makes it much easier to apply a whole lot of pull-ups. but that might be moot, because...

As long as you're requiring four jumpers, you could apply those to the input and output terminals instead, and:

(a) reduce the jumpers to two

(b) avoid dealing with the individual tristate controls, so allow you to use octal parts (244, 245) instead of quad (125)

(c) makes the instructions to users easy: Select/solder only one of these jumpers (in each pair).

That would cut your part count to two, plus 16 jumpers. (Well, probably should have a bypass cap on each rail too.)

TeensyForum_LevelShifters.png

The HCT part has TTL-level inputs that detect 3.3V logic levels. The LVC part has 5V-tolerant inputs. You could substitute the corresponding 245 bidirectional parts, but set them to one direction only, as they won't fulfill the appropriate function in the opposite direction (probably obvious, I guess!).

That said, if I was your customer, I'd be rather frustrated that I had to get out a soldering iron to change GPIO direction. I'd be thinking "why oh why aren't there jumper pins, or DIP switches". I realize it's tough to get 16xdip switches or 16 jumper (=32 pins) on one of those on modules, but that's what I'd be thinking nonetheless.

-- Graham
 
Last edited:
I actually made a small two-side PCB to plug onto the Weensy in place of the Adafruit Level Shifter. For the ten boards or so that I will ever build, that's going to work out just fine.

As for a more generic solution for the Weensy 3.6 PCB, the correct solution is probably just to run the 3.3V signals to the header pins and leave level shifting, if even needed, for external circuitry. On the existing PCB, that is trivially accomplished by putting jumper wires in place of the level shifter.

As for dip switches, or other on-board solutions, it just doesn't make a whole lot of sense to take up too much board space (on the Weensy) for a function that's not likely to be used by many people. To be honest, there are already 8 output pins (PWM compatible) on the Weensy that are buffered with a ULN2308. If I actually change the Weensy board, I'd be more prone to put a 74LVN245 in place of the level shifter and only allow inputs on those pins. One thing nice about the Adafruit TXB0108 socket I have on the board is that it's *real* easy to stick a small protoboard there and put whatever I want in place of the level shifter.

As for customers, other than personal projects I've only got one application in mind -- monitoring some signals on a research reactor. All the I/O there is going to take place on the SPI and I2C busses, so the behavior of the eight left-over GPIO pins isn't that important to me. Of course, if *someone* else wants to do something with the Weensy, well, that's why it's open source/open hardware.
Cheers,
Randy Hyde
 
I would strongly suggest reexamining the use of those TXB0108 bidirectional level shifters (and the related but different TXS0108) as GPIO level shifters. For that purpose they are horrible. They present neither high impedance as inputs, nor low impedance as outputs, and thus don't work like people expect GPIOs to behave when hooked to many real-world devices that people hook to GPIOs. Worse yet, they are basically a high speed pair of buffers arranged in a positive feedback loop, so in many scenarios oscillate, producing mystifying symptoms for users who lack a scope..

They are for the purpose of interfacing only between two buses or at least bidirectional chips (_requiring_ the bidirectionality) that operate at different voltages, on PCBs with a reasonably controlled-impedance design. They are not for hooking up to random transistors, LEDs, switches, sensors and so on with long dangly jumper wires.

Numerous projects have gone down the path of using them based on a superficial reading of the data sheet and imagining them to be a cure-all, only to discover that they chronically misbehave because they are not being operated within their limited design parameters.

Examples:
-- Dragonboard "Sensors" daughterboard: https://www.seeedstudio.com/96Boards-Sensors-p-2617.html
-- Sparkfun Edison breakout: https://www.sparkfun.com/products/13038

Both of those I've personally used and found them unusable for the purpose intended by the boards, and very prone ro oscillate in practice. There are forum discussions for the Dragonboard (maybe for the Edison, I don't know).

Just yesterday I saw https://forum.pjrc.com/threads/23959-Teensy-Arduino-adapter-shield in which the project stalled due to unexpected behavior of... the TXB08xx's

One alternative, the single-MOSFET style of level-shifters are at least stable, but these also don't behave as expected as GPIOs. Only the pull-down is active, and has to be used with a pull-up resistor, so again presents neither hi-Z input nor low-Z output.

The only trouble-free way to make low voltage I/Os usable with with higher voltage external devices is to use unidirection separate input and output buffers (with 5V-tolerant input and 5V compatible output respectively), and enable them as needed using, for example, jumpers. That was the direction on the RPi's Gertboard, for example.

Hope this helps you avoid this same pitfall!
As the creator of the Teensy-Arduino board I can only say: yes to all of this. Except the superficial reading of the datasheet maybe :) . The TXB08xx positions itself as a universal bidirectional level shifter to interface a MCU to a peripheral, but they act horribly non-deterministic when that 'peripheral' happens to be anything other than another MCU. I spent a month ping-ponging with TI over this, before finally ditching the chip. The fact that PJRC released the T3.2 with 5V tolerance also took away most of the need for level shifting.

The single MOSFET solution works reliable for push/pull signal translation, but weak when used to drive loads (which isn't the meaning of the circuit anyway). The only reliable way to mimic true GPIO is indeed by using single direction level shifters or buffers like e.g. the 74HC4050. There are also level shifters that have a direction input, so you can use one MCU GPIO pin to change the direction of an entire GPIO port.
 
The single MOSFET solution works reliable for push/pull signal translation, but weak when used to drive loads (which isn't the meaning of the circuit anyway). The only reliable way to mimic true GPIO is indeed by using single direction level shifters or buffers like e.g. the 74HC4050. There are also level shifters that have a direction input, so you can use one MCU GPIO pin to change the direction of an entire GPIO port.

I've played around with a half-dozen solutions (including adding a shift register to provide OE bits so I can programably set the direction). In the end, I think that my final solution is to build two small breakout boards (same size and pinout as the Adafruit TXB0108) that make those 8 GPIO pins all inputs (using a 74LVC245) or all outputs (using a 74HCT245) with the two new breakout boards. Making it pin programmable really isn't worth the effort. The Weensy 3.6 has 8 buffered outputs already (that connect to PWM-capable pins). Redefining the remaining available GPIO pins as input-only probably won't affect much in the way of future designs. Particularly as the Weensy as two MCP23S17 GPIO ICs on board with 24 bits that can be individually programmed as input or output (8 lines connect to a set of DIP switches and are normally input-only).

Of course, the Teensy 3.6 GPIO pins are quite a bit faster than the MCP23S17 pins, but for most applications that won't really matter.
Cheers,
Randy Hyde
 
When the next batch arrives I might make a small number available. Probably around $25. Personally, I don't want to get in that business, but if there is sufficient interest in a group buy I could manage it.
 
I do have a small number of boards that require a single cut and jump. I'd let them go for $15 plus shipping.
 
Status
Not open for further replies.
Back
Top