Access to more GPIOs on Teensy4.1

I've also been kicking around the idea of making some sort of "Teensy Pro" board which would bring out most (all?) pins for use. The target for this would be folks designing consumer-facing products which would look a little "cheap" if an end user were to pop the proverbial hood only to find their product was simply designed around an off-the-shelf microcontroller. No offense to the PJRC crew, of course, but in my mind, the Teensy is great for prototyping, but a final product needs something with a bit of a more purpose-specific appearance. And I don't think that's a controversial statement - after all, the bootloader chip is sold separately for a reason! :)

For this design, I was at first thinking about doing a square-ish board with a row of pins on each side, but that was quickly shot down when I realized exactly how many pins still needed to be brought out. 128+ pins at the standard 2.54mm pitch would make for a ~3+ inches on all four sides. Way too large! Of course, you could reduce the pitch, but I think I have a better way.

I looked into a ton of options for connectors, but I think the best happens to also be the cheapest and simplest - good old pin headers. I'm currently envisioning something along the shape of the Motorola 68000 which, for those who never saw one, is a DIP-packaged CPU about 25% longer than a Teensy 4.1, at least from me eyeballing it. This would give 32-pin rows, which aren't too difficult to remove (I've done it) and would be even easier to remove when using low-profile pin headers or ZIF sockets. As I'm sure you already noticed, though, two rows of 32 pins only total 64. Where do those other 64 pins connect? To neighboring rows on the same sides - basically double rows of through-holes on each side. Such an arrangement was also brought up on the "future Teensy" thread, and possible configurations include:

Soldering all four rows - two per side - directly to a finished PCB:
All ~128 pins would be easily accessible this way, maximizing the I/O abilities of the iMXRT.

Soldering a single row of male pins on each side:
This configuration gives the breadboarder many more pins than a stock Teensy 4.1, with the flexibility to later have additional I/O available as well if it eventually gets soldered into a finalized PCB.

Soldering both male and female headers:
One row of male and one row of female headers soldered side-by-side, on each side, allowing all pins to be used even when breadboarding; 32 pins through the breadboard's connections and the remaining 32 via wires plugged into the female headers.

I'm not saying anyone has to adopt my ideas on this, but I figured I'd just throw it out there in case anyone finds it helpful. :)
 
As I've had this idea in the back burner for a while now, I figured what better time to bring it to the forefront! :)

I've begun laying out a schematic in KiCad, which will eventually be a near clone of the official PJRC schematic. I realize there are other schematics for custom boards available, but the commonly-available symbols for the i.MXRT1062DVJ6B itself are... let's just say far from elegant. I'm modifying a symbol for it that I found elsewhere on the web which splits the chip into two units. I combined them back together manually, and did so in such a way that it will mesh up nicely with the schematic provided on the Teensy 4.1 page. When done, this will provide a great jumping-off point for anyone wanting to create their own board. I have a little over half done (progress photo attached) and should be able to wrap the first draft up by the end of this week. At that point, I'll post the completed file here to assist in locating anything I may have missed.
1756099553642.png


After the "clone" schematic is finished, I will then expound upon it to create an open-source schematic for a Teensy-compatible board which will bring out all 38 additional available GPIO pins from the CPU. This means that the finished product will only require 86 pins - a far cry from the 128-ish that had been mentioned earlier. Good news for when it comes time to pull this thing back out of its socket, eh? lol
 
I've also been kicking around the idea of making some sort of "Teensy Pro" board which would bring out most (all?) pins for use. The target for this would be folks designing consumer-facing products which would look a little "cheap" if an end user were to pop the proverbial hood only to find their product was simply designed around an off-the-shelf microcontroller. No offense to the PJRC crew, of course, but in my mind, the Teensy is great for prototyping, but a final product needs something with a bit of a more purpose-specific appearance. And I don't think that's a controversial statement - after all, the bootloader chip is sold separately for a reason! :)

For this design, I was at first thinking about doing a square-ish board with a row of pins on each side, but that was quickly shot down when I realized exactly how many pins still needed to be brought out. 128+ pins at the standard 2.54mm pitch would make for a ~3+ inches on all four sides. Way too large! Of course, you could reduce the pitch, but I think I have a better way.

I looked into a ton of options for connectors, but I think the best happens to also be the cheapest and simplest - good old pin headers. I'm currently envisioning something along the shape of the Motorola 68000 which, for those who never saw one, is a DIP-packaged CPU about 25% longer than a Teensy 4.1, at least from me eyeballing it. This would give 32-pin rows, which aren't too difficult to remove (I've done it) and would be even easier to remove when using low-profile pin headers or ZIF sockets. As I'm sure you already noticed, though, two rows of 32 pins only total 64. Where do those other 64 pins connect? To neighboring rows on the same sides - basically double rows of through-holes on each side. Such an arrangement was also brought up on the "future Teensy" thread, and possible configurations include:

Soldering all four rows - two per side - directly to a finished PCB:
All ~128 pins would be easily accessible this way, maximizing the I/O abilities of the iMXRT.

Soldering a single row of male pins on each side:
This configuration gives the breadboarder many more pins than a stock Teensy 4.1, with the flexibility to later have additional I/O available as well if it eventually gets soldered into a finalized PCB.

Soldering both male and female headers:
One row of male and one row of female headers soldered side-by-side, on each side, allowing all pins to be used even when breadboarding; 32 pins through the breadboard's connections and the remaining 32 via wires plugged into the female headers.

I'm not saying anyone has to adopt my ideas on this, but I figured I'd just throw it out there in case anyone finds it helpful. :)
This is a very interesting idea! I had originally vered away from dual pin rows because the stm32s drive me nuts when breadboardimg. I'd not considered soldering only the inside row male downwards for the breadboard, then soldering the outside row upwards to use jumper wires. That is very elegant!!!
 
See post #17 to which p#21 referred.
The purpose is 'Zero Insertion Force' - as otherwise inserting and removing the PCB results in possible damage.
Ok, let me ask my question differently haha. Do you imagine having like a carrier board that is a ZIF daughter board? Or do you imagine having a carrier board that you can plug other zif cards into? I can't think of any other uses, if I'm missing something fill me in :)
 
I think I've pretty much got the schematic done. Maybe some experienced folks with good eyes for detail can let me know if I missed anything!

Some notes about this schematic:
- I made a custom footprint for the i.MXRT1062, which lists all its pins. The ones left unused in the Teensy 4.1 appear at the top and bottom of the symbol.
- I added the name for each test point
- The names of the chips have been added/enhanced (e.g. "DP83825 Ethernet Interface" instead of simply "DP83825") of course the component numbers are all kept identical for consistency reasons
 

Attachments

  • output.pdf
    223.6 KB · Views: 77
You might consider the following addition to schematic.

When T4.x is externally powered while simultaneously powered by USB, we have to cut JP1 and place a diode across its pads. It would be great if you could add a diode footprint in parallel with JP1. A similar addition to Vin (add JP2 plus diode footprint).

I've checked U1 symbol for all existing T4.1 connections. I've not checked U1 top/bottom additions.
U1 pin E6, PJRC label NVCC_EMP. Above schematic shows label NVCC_EMC.

Checking the rest of schematic:
U2 pin 1, PJRC shows Vdd. Above schematic shows pin 8?
 
You might consider the following addition to schematic.

When T4.x is externally powered while simultaneously powered by USB, we have to cut JP1 and place a diode across its pads. It would be great if you could add a diode footprint in parallel with JP1. A similar addition to Vin (add JP2 plus diode footprint).
I like the idea! This first edition of the schematic is intended to represent the Teensy 4.1 as-is, but I will incorporate that idea into the next version - the "enhanced" schematic - like this:
1756259164226.png

The diodes wouldn't be installed by default, but left as blank pads for the end user to populate. I got the part number from this page for the Teensy 2.0, but as the voltage levels are the same on the Teensy 4.1, I figure the same parts should work just fine.

I've checked U1 symbol for all existing T4.1 connections. I've not checked U1 top/bottom additions.
U1 pin E6, PJRC label NVCC_EMP. Above schematic shows label NVCC_EMC.
On page 100 of the iMXRT Datasheet, it shows that the "official" name for pin E6 is NVCC_EMC; it seems the PJRC schematic needs a minor update. :)

Checking the rest of schematic:
U2 pin 1, PJRC shows Vdd. Above schematic shows pin 8?
Oooh, good eye! Not sure how I screwed that up. lol Fixed! Updated version is attached.



Thanks so much for taking the time to check this thing out! I figured it was inevitable that there would be some little detail I'd miss, so it's nice to have another pair of eyes on it.

I'll give it until maybe the end of the week or so and, if nobody catches any more errors in that time, I think it'll be safe to say this version is finished enough for me to move on to the next version. Who knows, maybe @PaulStoffregen will see fit to include it on the Teensy 4.1 page? :D

I'll post the KiCad files on my website and/or GitLab as they become "official".
 

Attachments

  • output.pdf
    223.2 KB · Views: 72
As the saying goes, no news is good news!

It's been a while now, and I haven't had any further bug reports, so I've gone ahead and uploaded the completed KiCAD file to my website for download here. Enjoy! :)
 
My project requires a full 32-bit input port. The only viable option is GPIO9 (EMC__00 through EMC_31). there a a couple of caveats:

1. The DEBUG_EN (EMC_01) must not be routed to the MKL02Z32 chip. This does not seem to have any ill effects.

2. The optional external memory is accessed through EMC_22, and EMC_24-29. I do not need this, but the setups that happen in startup.c won't allow me to simply set GPIO9 as inputs. I needed to disallow the setup code encompassed by the the 'ifdef' starting at line 180 as well as at line 344. I really was hoping to not have to modify core firmware, though I suppose I could write code to undo these setups? In any case, this does seem to work, so if you need a 32 bit bus, this ought to help.
 
In the time since the release of the last version in September, I went ahead and created Revision B, which incorporates all the modifications listed in the 'Design Changes' section of the Teensy 4.1 page. That should make this an accurate representation of the Teensy 4.1's design as it currently ships.

You can find the file in the same place as the original version and, as always, let me know if any bugs are found! I'm all about making sure things are as accurate and precise as possible. :)
 
Continuing the ongoing evolution of this project, I present Revision C of the Teensy 4.1 Recreation schematic, which is mainly a cleanup pass over the previous version. I replaced several rough or vendor-specific library symbols and footprints (mainly SparkFun and Digi-Key-derived parts) with cleaner standard KiCad library parts wherever possible, falling back to custom-made library parts only when needed. In addition, explicit footprints have now been assigned to 58 components which previously had none. The USB connector has been updated to the exact (as far as I can tell) "MICROXNJ" part used by the Teensy 4.1, with grounded mounting tabs on the shield. Explicit no-connect markers have been added where appropriate, one on the J1 USB connector and another on pin 6 of the BAT54 diode array. The schematic now has header symbols for the two main rows of pins (one on each side of the Teensy 4.1) as well as the VUSB, Power, USB Host and Ethernet connectors. I also found two electrical issues with the previous schematics, one being a spurious junction linking pin 25 (A11) to the 3.3V power rail, and the other a pin (VIO) left floating on the DP83825 Ethernet Interface. Both issues are now fixed. In preparation for further work, I added LCSC numbers to all components, as appropriate, to ease fabrication via JLCPCB.

It can be found here, along with a more detailed list of changes.
 
Back
Top