which Teensy?

Status
Not open for further replies.

ieee488

Member
I am thinking about using a Teensy to learn about HID USB.

Should I just buy the cheapest one?

I may eventually want to build a device that can control LEDs and maybe write a program for the PC that someone can use to change the LEDs.
But this is far in the future and may not come to fruition.

The most important is to learn about HID and data exchange.
 
It sort of depends on exactly what you want to do.

If you want to have the Teensy act as a USB HID device, the Teensy LC and 3.x should work right out of the box. The Teensy 4.0 just got support in 1.49 teensyduino beta3, so the code is coming along, but there may be a glitch or two until everything is finished.

If you want the fastest speed where the Teensy acts as a USB HID device, then you want the Teensy 4.0. The Teensy LC and 3.x boards are limited to 12MB/second, while the Teensy 4.0 board goes up to 480MB/second. In general for human type devices, you don't need a great deal of speed.

If on the other hand, you want the Teensy to act as USB host and control USB devices (which it doesn't sound like you do), you only have two choices: Teensy 3.6 or Teensy 4.0. Right now, the Teensy 3.6 is the easiest to use, since it has the necessary support directly on the board, and you just have to solder in a 5 pin header to connect to a USB cable that has a USB-A plug that you can plug into. For Teensy 4.0, you have to bring out two wires from underneath the Teensy, and add the necessary other components. There are breakout boards being designed right now to bring out the USB host for the Teensy 4.0. All require soldering expertise and most require surface mount soldering in addition to through hole soldering.

In order to connect to LEDs, if you use WS2812B (or Neopixel) LEDs the simplest one use is the Teensy LC, since it has one pin that converts the voltage level for driving the lights. The others may need a special voltage converter to do the conversion (the converter is pretty cheap, but note the simple voltage converters made for i2c/spi/uart conversions are often times too slow). Either of the prop shields (LC or with motion sensor) provide two voltage converters to use for either WS2812B (Neopixel) or APA102 (Dotstar) LEDs.

If you want to add audio processing (such as to play songs from a micro SD card), you want to skip the Teensy LC, as it doesn't support some of the instructions used by the audio library. For mono sounds, you may want to get the LC prop shield, as it has a 8MB flash memory drive to hold things like songs, and it provides an amplifier that you can hook up a simple speaker to. You can use the prop shield on the Teensy 3.5 or 3.6, but you will need an additional wire to hook up the audio pin. The Teensy 4.0 generally can't be used with the prop shield to play sounds.

For stereo sounds, and for doing audio processing, the simplest approach is to get the audio shield, and a speaker that can plug into a heaphone jack to listen to the songs. Note, there are two versions of the audio shield, one for the Teensy 3.2/3.5/3.6, and the other for the 4.0.

If you want to record things and/or have storage to play songs from, the Teensy 3.5 and 3.6 have built-in micro SD drives. The Teensy 4.0 has pins that can bring out a fast micro SD card reader, but you do have to do some soldering to get to those pins. The audio shield does have a slower micro SD card reader/writer, and you can use that with any Teensy.

One suggestion if you write Teensy HID devices: Add a pin or a switch that is checked when booting up, and disable the processing. Otherwise if you write something that does mouse or keyboard controls, and it goes haywire, it can be hard to recover. The Teensy 3.5/3.6/4.0 do have an option that if you hold down the program button for 15 seconds, it will load code that just blinks the built-in LED. This makes it easier to reprogram the Teensy.
 
Michael,

Thank you for that detailed response.

In my mind, I was thinking about a USB HID client using a Teensy.
Have the Teensy do something and report back to the PC or have the Teensy do something in response to a command from the PC.

You mentioned the Tennsy LC for use with WS21812B.
Can it be used with the Teensy 3.2 OctoWS2811 Adaptor ?
Would adapter need to be modified?
 
Michael,

Thank you for that detailed response.

In my mind, I was thinking about a USB HID client using a Teensy.
Have the Teensy do something and report back to the PC or have the Teensy do something in response to a command from the PC.

You mentioned the Tennsy LC for use with WS21812B.
Can it be used with the Teensy 3.2 OctoWS2811 Adaptor ?
Would adapter need to be modified?

I dunno. Note, we are talking about much different scales. Using the propshield or the LC alone, you can drive 100 lights or so. Using the octows2811 adapter is much heavier duty, when you have hundreds and hundreds of LEDs, and you need to issue the LEDs in parallel. Also when you get up to that level, the cost of the lights far outweighs the cost of the Teensy (or Teensys). But that is not for a beginner. I would say learn how to control a small number of LEDs first, and then you can go into the advanced techniques (FastLed, OctoWS2811, etc.). I don't believe the LC can run the Octows2811 library. At the moment, the Teensy 4.0 also can't run it, but I would expect sooner or later it might (though perhaps like the audio shield, it may be Paul will have to come out with a shield that targets the Teensy 4.0 directly).

The LC has a lot less memory than the 3.2. It should be able to handle at least 100 LEDs. I tend to use it for things like my steampunk wooden bowtie where I have a single 32 LED ring, and the Teensy does the processing, and I don't need any extra space for voltage conversion. But there some things it can't do. At the moment, the 3.2 is perhaps the best for an all around Teensy. The Teensy 4.0 is roughly the same price, but it was just rolled out, and there are still things being worked on, but the 3.2 has been around for several years now, and it supports most things in the infrastructure. The 3.5/3.6 have things that the 3.2 can't do, but they are also a little bit more expensive.

One thing I forgot to mention is if your code does a lot of floating point (likely not for USB HID stuff, other than some calculations to adjust things), the Teensy 4.0 has hardware double and single precision floating point. The Teensy 3.5 and 3.6 have only single precision hardware support (and double is done via emulation). The LC and 3.2 have no hardware FP support, and need to do everything via an emulator. It really depends on what you ultimately want to do.

Or as you grow, be flexible and as you need the additional features, you will then upgrade at that time. But you might not need those features, or you might change your mind.

Or course as you can see by my answer:
  • “Ask not the elves for advice, because they will tell you both 'yes' and 'no'.”
 
Status
Not open for further replies.
Back
Top