Quantcast
Channel: Arduino-Pi Ramblings
Viewing all articles
Browse latest Browse all 47

Developing a Robot Shield for Teensy 3.1: Looking for feedback

$
0
0
The many features and beautiful simplicity of the venerable Arduino, have captured the minds and imaginations millions of hobbyists, programmers, and Roboteers.  

Arduino, as a company, has created a diverse number of boards as Open Source Hardware . This diversity caters to various physical, electrical, and I/O requirements, allowing for a broad spectrum of applications.   That said, an entire industry has sprung up around reproducing variants of the Arduino

All of these boards, however,  have two things in common.  
  1. They use Atmel AVR 8bit microcontrollers(Typically ATmega328 or in the case of the Mega - ATmega1280 or 2560)
  2. They have an Arduino bootloader installed to allow quick and convenient development/upload cycles with the Arduino IDE.


One of the most recent trends, has been to reproduce the Arduino form factor, complete with I/O, A/D and D/A for other microcontrollers, to allow them to utilize the hundreds (thousands?) of "shields" developed to support the Arduino family. 

Many of these alternative boards have also provided plug-ins (cross compilers and compatible libraries) for the Arduino IDE, to allow a smooth transition from the comfort of developing for the Arduino's 8bit AVR chip to a more complex 16 or 32bit microcontroller.


Today, I'm going to discuss the   Teensy 3.1.  

https://www.pjrc.com/teensy/teensy31.html 

Although not pin compatible with the Arduino family, it does leverage the Arduino IDE through Teesyduino for quick application development, while hopefully grooming it's users to step into more robust ARM development tools.  If UNO form factor compatibility is a requirement (for instance to use an existing shield) then the Teensy Development board from PetitStudio will do the trick.



The Teensy 3.1 is based on the   Freescale K20P64M72SF1 ARM Cortex M4 processor. It runs at 96Mhz, has 256K flash, and 64k RAM, 43 digital I/O, 21 Analog inputs, 12 PWM outputs,  12 Timers, 2 I2C ports, and 4 Serial UARTS.  Whew...

In addition to that, there are two TRUE Analog to Digital Converters that can be read simultaneously ie: no multiplexing inputs. Currently, Pedvide's ADC librarycan be used to access both ADCs. Thanks to Freescale, there is also a CAN Bus
(Controller Area Network - communication channel used in automobiles) Libraries for this will be available shortly.



Comparison Of Arduino UNO R3, Mega2560, and Teensy 3.1 specifications
Technical Specifications
FeatureArduino
Uno R3
ArduinoMega2560Teensy 3.1Units
Price255419.8US Dollars
ProcessorAtmega328ATMega2560MK20DX256VLH7
Bits8832
    CoreAVRAVRCortex-M4
    Rated Speed161672MHz
    Overclockable242496MHz
Flash Memory32256256kbytes
    Bandwidth1616192Mbytes/sec
    Cache00256Bytes
RAM2864kbytes
EEPROM142kbytes
Direct Memory AccessN/AN/A16Channels
Digital I/O145434Pins
    Voltage Output553.3VVolts
    Voltage Input555V TolerantVolts
Analog Input61621Pins
    Converters112
        Resolution101016Bits
            Usable101013Bits
        Prog Gain Amp002
    Touch SensingN/A6412Pins
    Comparators113
Analog Output001Pins
    DAC Resolution--12Bits
Timers36 Total12 TotalPins
    FTM Type003
        PWM Outputs61212
    PDB Type001
    CMT (infrared) Type001
    LPTMR Type001
    PIT (interval) Type1x8bit 2x16bit2x8bit
 4x16bit
4
    Systick001
    RTC (date/time) **011
Communication
    USB111
    Serial103
        With FIFOs002
        High Res Baud003
        Fast Clock002
    SPI111
        With FIFOs001
    I2C112
    CAN Bus001
    I2S Audio001
        FIFO Size008

























 
Now, if you've happened to get this far, here is the meat of this article:
There are few "shields" available for the Teensy as yet. There are a few adapters that provide UNO form factor, there is an audio shield, a TFT display shield, and a Smartmatrix shield, as well as a few other special use shields. 

What I am looking to develop, is a multifunction shield that maintains the small size of the teensy as much as possible, but incorporates a 9dof  like the LSM9DS0 Teensy 3.1 Micro Shield, as well as an l293d to drive two small DC motors. I2C, as well as Remaining I/O will be brought out to right angle headers on the edge of the shield.  

Before I complete the board design, I'm looking for feedback, motivation, and warnings (like "that l293 is going to get too hot!") ... 

 Cheers.



References:

https://www.pjrc.com/teensy/K20P64M72SF1.pdf
http://cache.freescale.com/files/32bit/doc/ref_manual/K20P64M50SF0RM.pdf 
http://cache.freescale.com/files/32bit/doc/quick_ref_guide/KQRUG.pdf


 









My Teensy Playlist on Youtube  



 










http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=K20_72
https://www.pjrc.com/teensy/td_libs_USBHostShield.html
OSH Park: SmartMatrix Shield for Teensy 3.1 
https://community.freescale.com/thread/320695 
http://hackaday.com/2013/12/09/meet-the-teensy-3-1/ 

http://trippylighting.com/category/uncategorized/
SmartMatrix Shield for Teensy 3.1
Adafruit 2.8" TFT Touch Shield for Arduino for Teensy 3.1
https://www.tindie.com/products/loglow/teensy-31-breakout/
http://petitstudio.blogspot.ca/2014/04/teensy-3-development-board-arduino.html
Audio Adapter Board for Teensy 3.0 & 3.1 and OctoWS2811 Adapter for Teensy 3.1 – Control tons of NeoPixels!
http://www.mccauslandcenter.sc.edu/CRNL/tools/oscilloscope
Github: KurtE- Modified version of Trossen Bioloid library to user Serialx objects
https://github.com/KurtE/Teensy3.1-Breakout-Boards
http://zentasrobots.com/
http://www.circuitsathome.com/category/mcu/arduino/usb-shield

http://forum.pjrc.com/threads/26017-Teensy-3-1-and-9DOF-Stick-I2C
https://github.com/ptrbrtz/razor-9dof-ahrs/pull/20
https://www.tindie.com/products/onehorse/lsm9ds0-teensy-31-micro-shield/ 
https://github.com/Poofjunior/RaspPi-Teensy-USB-ServoController 


Development tools:
PCJR.com : Teensyduino IDE extension
http://www.seanet.com/~karllunt/bareteensy31.html 
http://embedxcode.weebly.com/ 
http://www.uTasker.com/freescale/Teensy_Simulator.zip
http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/overview/ 
Teensy 3.0 now supported by the USB Host library
Freescale Hack It Together (H.I.T.) Project Initiative - Get Excited!






Viewing all articles
Browse latest Browse all 47

Trending Articles