Skip to content

Modular Teensy Project

Kris Winer edited this page Jul 19, 2014 · 15 revisions

I am creating modular add-on boards (AKA shields) for the Teensy 3.1 with either Invensense's MPU9250, ST Microelectronics' LSM9DS0, or Bosch's BMX-055 9-axis motion sensors all coupled with either Freescale's MPL3115A2 or Measurement Specialties' MS5637 altimeters/pressure sensors. The intent is to gain 10-DoF motion sensing capability using open-source Madgwick/Mahony sensor fusion in a very small package. The modular approach allows other capabilites such as Bluetooth Smart, power management (battery charging), and motor control boards to be added to the same Teensy to provide flexible configurations tailored to specific applications.

I have reached the first milestone by successfully designing, assembling, and testing a board with the LSM9DS0 motion sensor that is attached to the pads on the back of the Teensy and functioning. Here is what it looks like:

Top left is the bare PCB I had made at OSH Park. Bottom left is the populated board with passive components (don't look too closely at the bad solder job!) and the LSM9DS0 9-axis motion sensor. This was only my second solder reflow experiment and the first really successful one. The big board on the right is the Teensy 3.1 available from OSHPark.com for $17---a steal for an easy-to-use Cortex M4 ARM processor. The idea is to mount the sensor board on the back pads of the Teensy to provide absolute orientation without tying up, well, any of the pins one would normally be using.

Here is what the final product looks like mounted onto the back of the Teensy 3.1. Yes it hasn't been soldered yet in this picture but, trust me, I soldered it and it is working well.

The picture is poor but you get the general idea.

It turns out there is a specific problem with the design of this board that I discovered after it was sent to the fab. One of the interrupts was broken out to pin 33 of the Teensy 3.1 This pin has several non-digital IO functions including toggling between boot modes. So, bottom line, it really cannot be used as a GPIO pin as I have done here. Fortunately, I learned this before I soldered this pin so the board still works, just without the use of this interrupt. I am in the process of redesigning the board to re-route this interrupt elsewhere, which should be easy to do, but requires another OSHPark board order. Alternatively, Paul Stoffregen, the designer of the Teensy, is working on a modification to the bootloader that should solve this pin conflict issue. So the first demonstration of the modular Teensy concept is a success!

For the next installment of the modular Teensy saga, I got the bigger brother of the first board assembled and tested. It works well mounted underneath the Teensy 3.1, this time at the end opposite the USB port on the last five pins(8 - 12 and 13-17) on either side of the Teensy using ground and power at the end. Here is the obligatory bad picture of the setup.

Bare board from OSHPark.com on top left, populated board on bottom left, and the Teensy 3.1 with headers soldered into the pins ready to accept the add-on board. This bigger board makes adding the MPL3115A2 pressure sensor/altimeter to the LSM9DS0 9-axis motion sensor pretty easy. I have sketches for each of these sensors individually; my initial mashup of the two produced tolerable results but I think I have some integer-type issues that are causing incorrect values of the temperature and altitude to be reported. The pressure seems fine. I'll work on these and post a working sketch in my repository on github.com.

Here is a picture of the board 'dry' mounted on the Teensy 3.1 to give some idea of the intended use.

Of course, the intent is for the sensor board to be soldered onto the Teensy headers. This particular design breaks out all of the LSM9DS0 and MPL3115A2 interrupts so that all 12 pins have a function. It is hardwired for I2C and, unfortunately, it occupies the SPI port pins 8 - 15 on the Teensy so no other add-on board can use SPI with this board installed.

The more modular alternative is a similar-sized board (MPU9250TeensyMiniShield.v03) with the MPU9250 motion sensor and MS5637 pressure sensor/altimeter which I have purposely designed to leave the SPI port pins unoccupied so that an RF radio or bluetooth module could also be mounted onto the Teensy 3.1 and communicate via SPI. Getting the MPU9250 board assembled and tested is the next phase of the modular Teensy project and I will report the results as they become available.

I have assembled and tested one version of the MPU9250 motion sensor mini add-on board. This one is like the LSM9DS0 mini add-on in that it too is accompanied by the MPL3115A2 pressure sensor/altimeter. Here are some pictures of what it looks like:

It appears to be very similar to the LSM9DS0 mini board, and both 9-axis motion sensor work well, the MPU9250 is just a little smaller. I have other variants in the works including one using the MPU9250 motion sensor with the 3 mm x 3 mm MS5637 pressure sensor/altimeter, and one using ST Microelectronics' new 2.5 mm x 2.5 mm, low-power, LPS25HTR pressure sensor/altimeter. The trend in both motion sensors and pressure sensor is toward smaller and less power hungry devices. This is great from the individual maker perspective and also for any portable or wearable applications. It does, however, require a certain nimbleness to keep up. It looks like one aspect of this project will have to include a rapid prototype capability!

More adventures with the modular Teensy project to come...

Clone this wiki locally