OSH Park
Profile for Pawelsky
- You need to sign in or sign up before continuing.
Shared projects
Teensy 3.1 CAN + MicroSD shield v0.2
by Pawelsky.
2
layer board of
1.50x0.70
inches
(38.13x17.81
mm).
Shared on
March 4th, 2015 14:19.
This Teensy 3.1 shield allows to communicate with the CAN bus with up to 1Mb/s speed. It includes the MicroSD push-push type slot to allow easy data logging. It also has a 3.3v regulator built in powered from the CAN+ line capable of providing up to 200mA for input voltages in the 4V-7V range.
Here is a RC Groups thread from which it has originated: http://www.rcgroups.com/forums/showpost.php?p=27129264&postcount=1
The shield has following pins broken out:
- CAN bus (CAN +, CAN GND, CAN H, CAN L)
- Serial ports (TX, RX and GND for Teensy’s Serial1 and Serial3)
- Analog pins (I/O1, I/O2, I/O3 and I/O4 mapped to Teensy’s A9, A8, A7 and A6 accordingly)
- Note that pin 9 can be used for card detection (shorted to GND when card inserted, floating otherwise)
Following components are needed to assemble this board:
- 1 * TI SN65HVD230, SN65HVD231 or SN65HVD232 (recommended) CAN transceiver in the SOIC-8 package
- 1 * TI LM1117 fixed 3.3V LDO regulator in SOT-223 package
- 2 * Tantalum 10uF/16V capacitors in SMD A package
- 1 * MicroSD card push-push type slot matching the Suntech ST-TF-003A or Adam Tech MCSP-08-C-SG dimensions
- 1 * 1x17 straight 2.54mm header pins (divided into 1, 1, 2, 2, 5, 6 sections)
- 1 * 2x7 straight 2.54mm header pins
- 1 * 120ohm resitor in 0805 package (optional, only needed if you require CAN bus termination)
Here is how the shield looks like when assembled (notice the place for the optional terminating resistor next to the transceiver chip)
The below picture shows how the shield shall be stacked together with Teensy and also provides pins description.
Before soldering the shield to the Teensy board make sure the blink sketch is loaded to prevent setting used pins into the state that could damage the boards (e.g. setting pin 9 high when the Micro SD card is inserted would short it directly to GND).
One important thing to remember when powering the Teensy with the shield is to not connect it to the USB when it is powered from the CAN bus. If for some reason you need to do it there are two options:
- Disconnect the CAN + wire
- Cut the VIN-VUSB pad at the bottom of Teensy (note that after you do that you’ll need to power Teensy from the CAN bus, or other external source every time when uploading a new sketch)
From software perspective following libraries have been tested to work fine with this shield:
- For CAN bus - teachop’s FlexCan library
- For MicroSD - either Arduino’s built in SD library or gremain’s SdFat library
This shield is meant for hobbyists and DIYers only. Although this board has been used and tested for quite a while there are no guarantees it will work. You can download the design file, modify it to your needs and build the board for yourself but you always use it at your own risk!