Pages: 1 [2]   Go Down
Author Topic: Teensy++2.0 with Circuits@Home USB Host Mini  (Read 8586 times)
0 Members and 2 Guests are viewing this topic.
0
Offline Offline
God Member
*****
Karma: 25
Posts: 606
Always making something...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you don't have an extra capacitor, just make sure you have the USB device plugged into the host shield before you upload your sketch to Teensy.  As long as you don't plug a new device in while Teensy is already running, it should work fine without extra capacitance.
Logged

0
Offline Offline
God Member
*****
Karma: 25
Posts: 606
Always making something...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I created a web page to document using this library and shield with Teensy & Teensy++

http://www.pjrc.com/teensy/td_libs_USBHostShield.html
Logged

St. Louis, Missouri
Offline Offline
Sr. Member
****
Karma: 1
Posts: 279
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Excuse me for asking what is probably a stupid question, but I thought the Teensy was able to act as a USB host so why would you need the Host Shield?
Logged

0
Offline Offline
God Member
*****
Karma: 25
Posts: 606
Always making something...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Teensy is USB device only.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, so it works for me now as well, on the Teensy++2.0 at 8MHz (3.3v), using the details on Paul's page.  The method I was trying with 3.3v LDO regulators and a Teensy at 5v were not the way to go. 

The Teensy board now detects both the USB host board, as well as the (bus-powered) USB device I plugged into it.

Sweet! I can move on to actually doing stuff with it now smiley

Thanks all.

Colm
Logged

Dallas, Texas
Offline Offline
Sr. Member
****
Karma: 3
Posts: 267
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Funnily enough, I did the same as you did a few hours ago: I ordered an Arduino Pro Mini 3.3v to plug directly into the USB host board, to check that the USB host mini works in its native form.  It would be great to get the USB host board working with the Teensy though, because of its decent sized program space (130k, IIRC).. I'm already up to about 14k, and I have some other stuff that I still need to do, so the Teensy is about the only device that I'm aware of that can fulfil all my requirements at the same time.

Looking forward to seeing what you come up with, when you get the hardware.  If I find anything out in the meantime, I'll post it here.

Colm

Here's a possible alternative. Not technically an arduino but it is AVR powered. I've been looking at something called a Minimus AVR USB Dev. There are two models. One is based on the AT90USB162 (Minimus) and the other based on the ATmega32U2 (Minimus 32). The later has 32KB flash, 1KB SRAM, and 1KB EEPROM. Being a dev board, it has everything broken out, ready for solder. And because these are wildly popular in the game console hak/mod circles, they (and a plastic case, in two colors) can be had for cheap; usually cheaper than the teensy alone. So if you don't need the full 130K flash, and like the USB stick form factor, it may be worth a look.

I'm basically torn between one of these or a teensy for my project.

I'm not trying to hijack the thread, but if anyone has any experience with these, I'd love to hear about it.
Logged


0
Offline Offline
God Member
*****
Karma: 25
Posts: 606
Always making something...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The Minimus AVR boards are also USB device only, so they're no alternative for the USB Host Shield.

Since I'm the guy who designed Teensy and wrote Teensyduino, my opinion is obviously biased, so take this with a grain of salt....

Minimus AVR will probably only be useful if you're already pretty knowledgeable with AVR development in C and you can use Dean Camera's LUFA library.  Or in other words, you're the type who tends to feel like the Arduino IDE is a toy and you want a "real" programming environment like Eclipse or direct control of the Makefiles.

As a quick sanity check (which doesn't cost anything... do this before you buy), I'd suggest you download the LED and button test program for Minimus AVR, and try to compile it yourself.  It's at the bottom of this page:

http://www.modtraders.co.uk/minimus-avr-usb-development-board.html

Just move the .hex file somewhere safe, and delete the .elf, .o and .d files.  Then try to compile it and see if you can get a new .hex file that is the same.  Don't worry if the new .elf and .o files are not perfectly identical, it's the .hex that matters.

You won't find any help in the Minimus instruction manual, as it only documents how to get the .hex file onto the board.  In fact, if you look at the .c file, you'll notice in the comments that it was written for the Olimex AVR-USB-162 board, not Minimus AVR.  That should give you some indication of the level of documentation, example code and support you'll find for actually using Minimus for any real development.

If you're able to easily figure out how to compile the example and get the same .hex file, then maybe Minimus might work for you?  Well, you might also download and peek at Dean Camera's LUFA library before buying, since that is the only code which supports Minimus.  But if you get stuck and/or frustrated just compiling the blink hex file, at least you can do so without paying for a Minimus board.  Even at the fire sale price, if you can't compile a .hex file, the board will be worthless (other than running .hex files made by other people... which is all Minimus was ever really made for anyway).  But if you have the skill to make Minimus work, it's very cheap.

There doesn't seem to be any support for using Minimus with the Arduino IDE.  Dean Camera's LUFA library is your only reasonable choice on Minimus.  I'm not sure how you'd get the USB Host Shield to work... the library is built on the Arduino platform and makes good use of C++ features.  Porting it to a C-based LUFA project sans Arduino stuff seems like a huge task, but at least version 2 has a very nice self-contained abstraction layer built in.  If I were to try, I'd definitely focus on version 2.

I'm going to refrain from making a sales pitch for Teensy 2.0 or Teensy++ 2.0.  In fact, if you're planning to use the USB Host Shield, the Arduino Uno or Arduino Mini might be a more attractive alternative, since those shields are designed to directly line up.  There aren't a lot of wires to connect, as you can see in the photos of how I connected Teensy 2.0 and Teensy++ 2.0, but if you're not handy with a soldering iron and small wire, shields that just plug in or only need headers soldered are a pretty nice way to go.  One bad solder joint can make all the difference between a fun project and a terribly frustrating disappointment.

Likewise, what good will that Minimus plastic box do for your project if you're going to add the USB Host Shield, or just about any other electronics?
« Last Edit: July 01, 2011, 03:36:06 pm by Paul Stoffregen » Logged

Dallas, Texas
Offline Offline
Sr. Member
****
Karma: 3
Posts: 267
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

For my project, I won't be using a usb host shield so its a perfect fit. Admittedly, I didn't click to the need for usb host support until after I had already posted. So for that, I apologize for any confusion I may have ignorantly injected.

I completely agree with you that the device is not an "arduino" class device. I believe I pointed that out right off when I said, "Not technically an arduino but it is AVR powered." You are correct, a person considering that device should be proficient at embedded development in C. Some here are. Some are not. I am, but not with AVRs. I also don't use the arduino IDE. I have already looked at the sample source and didn't see any real surprises (makefiles and all, which I found to be encouraging). But as you point out, I haven't tried to compile it either, but was already planned given the sparse support and unfamiliarity of the device.

Based on what I've read, I believe your teensy products to be of high quality and well supported in the vein of what people expect for "arduino type" devices. My comment was not meant to tarnish the value of such a device and associated support.

Sometimes there is value to had from "fire sales", as you put it. Not to mention, a lot of resellers for all sorts of products, purchase from those types of "fire sales." So a cheap price doesn't always translate into a burned and smoked item of inferior quality. Though in this case, from a documentation/support/IDE perspective, they are not comparable. Though have I found unsupported and unconfirmed information to add IDE support for them. From a raw hardware perspective, I believe them to be in the same class, or at least close enough.

For me, the form factor of the device is especially appealing. The cost plus case makes it doubly so. As I said before, I haven't made up my mind but the device remains very attractive for my project. Should I decide to look elsewhere, the teensy will likely be my fallback.
Logged


Pages: 1 [2]   Go Up
Jump to: