Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Genuinely curious, what kinds of projects are better suited to a Teensy than an Arduino, ESP32 or some form of Raspberry Pi?

Is the main advantage the pin count?




I've used both extensively as "daughterboards" to big control circuits. The main advantage of the Teensy to me is that the hardware is better than Arduino was at the time. It is also, well, Teensy compared to most Arduinos so it takes up less real estate.

Now that Arduino is running an ESP32 or ARM chip or has FPGA acceleration and such I'd say the difference is mostly just size. I do think some of the core libraries for the Teensy are better written though, the Arduino authors don't seem to focus as much as Paul does on optimizations. Paul also frequently posts in the forums to respond to questions, which is unusual in my experience.

Edit: In response to the Raspberry Pi, it's just a totally different beast. The Teensy is probably not well suited to run much of an OS (nor is the Arduino). Both are better suited to things that require more pins available; embedded controllers rather than computer substitutes.


> Now that Arduino is running an ESP32 or ARM chip or has FPGA acceleration

I recently used a Teensy for exactly the reasons you gave, but I'm not familiar with Arduino's with ARM or FPGA. That sounds very interesting, do you have some links where we can learn more?


Arduino has had ARM-based boards for years, starting with the Arduino Due in 2012; most of their newer boards use ATSAMD MCUs rather than the AVR8 parts they started out with. There's also a pretty active community supporting STM32 ARM hardware at https://www.stm32duino.com/.

The "FPGA acceleration", on the other hand, is pretty limited. Arduino has one board -- the MKR Vidor 4000 [1] -- with an onboard FPGA. The FPGA can be configured with one of a couple prepackaged bitstreams to add I/Os or perform some specific video processing tasks; it does not accelerate processing on the Arduino MCU. The documentation for the board is minimal, and support for generating your own bitstreams is basically nonexistent. The whole thing has a half-baked feel to it; I'd avoid it.

[1]: https://store.arduino.cc/usa/mkr-vidor-4000


Thanks for the link to the Vidor, unfortunate it wasn't more functional. It'll happen someday and when it does I'll be very excited, I know that there are already hybrid FPGA/microcontroller chips as an alternative to putting a softcore microcontroller on the FPGA itself (and wasting a lot more space and speed than needed).

I await the day when I can be like "nah, pin 2 will be a 16-bit 10MHz PWM output controlled by this register and pin 7 will be a frequency counter" and then access that with code on the microcontroller as if it was a built in peripheral.

I'm kind of skeptical I'll ever really get into FPGAs otherwise, my use case for them is always so simple, at the level of... well... PWM outputs and PID loops. But a microcontroller is fast enough for most PID loops so really to me the advantage is customizable function-pin mappings. I can't imagine trying to implement something like an ethernet stack on an FPGA though, although I guess you can run DOOM on one so maybe there will be a compiler from C++ to FPGA somehow that's not comically bad. ;-)


> I await the day when I can be like "nah, pin 2 will be a 16-bit 10MHz PWM output controlled by this register and pin 7 will be a frequency counter" and then access that with code on the microcontroller as if it was a built in peripheral.

Are you familiar with the Cypress PSoC line? They have that.

https://www.cypress.com/products/32-bit-arm-cortex-m3-psoc-5...

It's an older part, so the performance isn't incredible, but there are some very interesting things you can do with it.


I do remember them coming out, I believe at the time ARM was unfamiliar to me so that half was too much to learn simultaneously and I was worried about being unable to meaningfully use it. They look more interesting now, thanks for the reminder.


There was the papilio duo too which had the Spartan 6 LX9 FPGA with an ATmega32U4 on the bottom. Not sure if they are for sale anymore though. I backed the kickstarter (and work with a company which made some of the wings for them) but I never really got into using them. I still have mine around and plan on using it for some project in the future though.

http://papilio.cc/index.php?n=Papilio.PapilioDUOHardwareGuid...

edit: yep...still for sale http://store.gadgetfactory.net/fpga/


I hate to just direct you to arduino.cc, but there's so many boards I can't really answer this in a more reasonable way.

The Arduino Due has been around for probably seven years and runs on ARM. There are many other versions now that are all ARM. The FPGA coprocessor one... hmm, I don't see it so maybe I just read it in the news or got confused by the Portenta that is supposed to be released about now.

The ESP32 one... I thought Arduino was moving to that for the RF capabilities but might be wrong, I can't find one for that either anymore. I know for sure you can get a ESP32 dev board and program it with the Arduino IDE and their Arduino-IDF libraries compile nearly Arduino-identical code with a few limitations (relative to the Teensy, which I think is basically perfect library API duplication).


I've used the Teensy 3.1 and it's more or less an Arduino (including uses the Arduino IDE) but lower cost and more powerful processor. There is also a way to build C/C++ code and run it on the Teensy. ESP is similar but has WiFi built in and Raspberry Pi is closer to a full blown general-purpose computer than an embedded platform. Software on the Teensy runs on bare metal, software on the Raspberry Pi usually runs on an operating system (Linux) and is not real-time.


To be fair you can also build C/C++ code on an arduino. Although if you want to move away from the Arduino IDE/language, probably an Arduino is not the best platform for you anyway!


The standard Arduino "language" is really C/C++, is it not? (as well as all the C/C++ libraries that extend it) I suppose the "Arduino language" itself could be described as a library as well, or at least a C/C++ helper/wrapper abstraction for common tasks.


You are correct, the "Arduino language" is just C++ with some special libraries, macros, added types, and an IDE that enforces some limitations on the programmer (though you can use the Arduino library without the IDE).

In practice using this library/ecosystem/whatever is different enough from "normal" embedded C/C++ libraries that to me at least to me it does feel like a different language.

I think most people call it a language out of ignorance or laziness though.


I thought they insisted on calling it "Processing"?

I just write standard C++ or C code and it compiles fine. Hard to complain about that too much if I don't care to use the extra features. You can just access registers directly even if you use the Arduino IDE and configure things yourself if you want.

But yeah, I'd personally use visual studio code if I wasn't going to want to use the arduino libraries anyway. It's not a great editor. VS Code probably isn't that great either, but it's good enough for the little coding I do (I mostly design circuit boards that frequently use these little boards as brains).


The Arduino IDE is certainly a fork of the Processing IDE. The language is different: Arduino is C/C++, Processing is Java. But Arduino did take a bunch of UX (or call it "DX") from the Processing lang.


Just use platform io... it works inside VS Code and lets you use arduino and other frameworks if you want to do so.


I think the main selling point of Arduino is the "batteries included" approach if you're not familiar with embedded programing. Personally I never use Arduino because of the weird header spacing (I get it's sort of a trademark at this point but it's just annoying to work with).

If you don't care about premade environments then yeah, it's mainly about which pins and embedded peripheral the board supports. Pin count is not everything, nobody wants to bitbang USB or even high-speed SPI. For instance I see that this teensy board supports up to 18 analog inputs when Arduino supports between 6 and 15 according to this: https://www.arduino.cc/reference/en/language/functions/analo...

Basically the choice of controller should be the last step in your design: first thing about your inputs and outputs, then find a controller with suitable I/O and processing power (and preferably with standard header spacing).

RPi is more like a mini-computer than a controller, it's a lot more powerful and comes with massively more overhead. You program something like a teensy on "bare metal" with only a very minimal runtime. On an RPi you'd typically run a full blown OS. That opens up many possibilities but it's also generally more expensive and more power hungry. If you just want to drive 5 GPIOs it's completely overkill.


Teensy has a great library ecosystem too, so it can be a serious contender regarding "batteries included"


Agreed, plus a very responsive and helpful developer.


Teensy has a nice audio library if you're interested in real-time sound synthesis and stuff like that, as well as MIDI-over-USB support. Along with a fast processor and a tiny footprint, it's pretty useful for making musical instruments.


There is even a hearing aid using teensy board and the modified version of teensy audio library[1]!

[1] https://shop.tympan.org/


Wouldn't you also need an ADC/DAC to interface with analog signals (e.g. for a custom Eurorack module)?


I don't know about Eurorack stuff, but yes, for analog audio output, Teensy sells an audio adapter board with line-level output and a headphone jack [1] and that's what I'm using. The audio data is sent digitally using I2S. The audio library also supports cruder ways to do DAC yourself if you don't need it to be as high quality.

It would be nice if there was a Teensy board with analog audio output, though.

[1] https://www.pjrc.com/store/teensy3_audio.html


Depends on how you mean. My modular synth has many Chord Organ and Radio Music modules, by Tom Whitwell of Music Thing Modular. They're all Teensy 3.1 and the audio's taken off an extra pin (not in the DIP configuration, and I've forgotten to include it before) and buffered with simple TL07* op amps. It's mono, I think it's 44.1k and effectively 12-bit, and I suspect it needs the op-amps for buffering and boosting, but it's absolutely there and that's the 'cruder ways' and though it's primitive and mono it absolutely works, and works surprisingly well with filtering/reverb/etc.

What I'd like is a Teensy board with SERIOUS analog output that still works with my Chord Organ firmware. Like 192k (or indeed 96k) and 24 bit… but I could get a lot of use out of even low-bit at elevated sample rates, because one of my options for coding stuff on the firmware and Tom's eurorack module hardware is using the Teensy's library to produce multiple square waves.

If I'm outputting square waves I can use almost arbitrarily low-bit word length, but high sample rate will greatly reduce aliasing, and not just for high frequencies. The Teensy raw audio stuff has a characteristic grunginess on squares and saws that is mostly or entirely about aliasing.


I’d be interested to discuss this: tom@musicthing.co.uk


Teensy audio adapter has SGTL5000[1] running on the board and in my opinion it is highly customizable. It provides up to 96KHz sample rate (44.1 KHz with teensy's clock I guess) with 16bit sample size for ADC and DAC so I don't think it's low quality.

[1] https://www.nxp.com/products/audio/audio-converters/ultra-lo...


Yep. I have a teensy+codec for the express purpose of experimenting with audio DSP filters.


As an anecdotal example, Teensy is often found in custom built mechanical keyboards and mechanical keyboard kits. Form factor and library support are two primary reasons as far as I've understood in my occasional bouts with hobbyists.


And their official software to flash the firmware is excellent. I've had severe issues with cheaper controller boards where the pain isn't worth the price difference in my opinion.


I pick teensy for mine. Is null-issues and so easy to flash.

Also exist a neat workflow where you design your keyb on http://www.keyboard-layout-editor.com and then import it on https://kbfirmware.com and you get your keyb up and running very fast.


Well, there was that short lived issue where the Teensy 3.5 or 3.6 wouldn't boot right without an extra capacitor soldered on the reset line.

But it's also very encouraging that on the Teensy the issue was identified and a solution provided so quickly.

On the responsiveness note, I found a typo in the ESP32 datasheet and reported it to them through the forum. They responded very quickly and noted that it was indeed a typo (their chip as described didn't have a ground pin) and promised to fix it.

So on speed that's great. But their most recent datasheet had the same typo so...


As a hobbyist embedded developer, I personally view the Arduino and Teensy as being suited for the same class of applications: doing one or two low-level things reliably and predictably, while serving as an abstraction layer to a general purpose computing platform, like a Raspberry Pi or other computer.

IMO, the Teensy boards have historically not only completely duplicated the functionality of most Arduino boards (including supporting the Arduino IDE), they've also provided additional features/peripherals not present on most Arduino boards. (Increased RAM, flash, CPU, peripherals like onboard CAN controllers, ability to enumerate as a variety of USB devices, and yes, more available pins)

I've also felt that that the Arduino boards are engineered (physically and feature-wise) to sell their branded daughtercards (Arduino "shields"). This is not necessarily a bad thing for beginner-level classroom environments. However, if you're looking to do something practical, it's a lot easier to throw a Teensy into a breadboard.


I wouldn't see it as an Arduino competitor as they're different beasts mostly aimed at different use cases.

The Teensy also has a DSP on board which can be useful in many applications, from music to signal processing. Here's a SDR radio built around a Teensy some years back. http://theradioboard.com/rb/viewtopic.php?f=4&t=6641 Does anyone know of any kits like that around?


Ah - we asked the same question: https://news.ycombinator.com/item?id=23144432

I can see why the Raspberry might not be a good replacement for Teensy - power hungry (ESP32/STM32 have fantastic ULP/Deep sleep) and/or form factor.

> pin count?

maybe but there are ultra cheap analog and digital multiplexers available.


multiplexers are fine if you're either doing slow signals or uniform outputs. They're not worth the hassle if you want multiple high-speed connections.


Not only that, also a full bloated OS wasting CPU cycles.


RPI straddles the gap between regular computers and embedded systems. It can perform some of the duties of each, but the drawbacks become clearer the further away from the middle ground your use case gets.


Exactly. When you want a powerful processor that is going to basically do one thing very well, use a Teensy. When you don't need the power, use Arduino.


About 7 years ago it was the most affordable USB controller that identify them self as a HID device that I could find to brute force the EFI lock on a MacBook Pro https://orvtech.com/atacar-efi-pin-macbook-pro-en.html

It was really easy to setup and start pushing code to it


The main advantage for the Teensy 4.x is the performance. 600Mhz Arm M7 with LOTS of RAM and Flash. So anywhere where a microcontroller is better suited than an RPi (hard real time, etc), but performance matters.


Running large scale LED matrices with good animation frame rates was at least at one time WAY more performant on a teensy. Not sure if that's still true today.


Teensies range from 16 MHz AVR chips to this 600 MHz Cortex M7. Arduinos cover a variety of platforms as well. ESP32 is if you want WiFi integrated. Raspberry Pi is a full blown computer. This is a full gamut of capability. What you choose for a project depends on your requirements.

Automatic window blind opener? Teensy 2.0 if you like AVR, Teensy LC if you like ARM.

Camera watching your 3d printer using computer vision to detect if it catches on fire? Raspberry Pi.


The Raspberry Pi Zero W is great for tasks that need wifi too (window blinds, etc). At $10 it's cheap and it's really nice to write your programs in python. I've got plenty of experience with microcontrollers and C++ but I find python just so much nicer to use when I can. You can even host a web page from it for a quick and easy GUI control (use Flask for a pure python implementation).


As skybrian says, Teensy has a lot to offer for audio/DSP work. The Teensy 4 generation runs like a bat out of hell compared to an Arduino or ESP32, but it's a much lighter-weight development platform than a RPi or BeagleBone.

Basically, if you want an Arduino that's roughly a thousand times faster, you want a Teensy 4.


> better suited to a Teensy than an Arduino

In my experience, all projects I would do with an Arduino. Thus far, it's just been LED stuff. On Arduino I very quickly ran out of resources, then had to redo my entire project wiring to switch over to a Teensy.


Example project: https://luftdaten.info/laermsensor-bauen/ (only German and French translation ATM)


Years ago, in 2013 or so, I recall the Teensy was better suited for my application due to the higher clock speed.


Teensy became popular for a few reasons: it's small, cheap, has lots of IO and dead-simple USB HID support.


No, it would be performance - for example regarding clock speed and RAM size.


Arduino you write bare metal firmware, raspPi you write software on a host OS

firmware does not have the overhead of a host OS. super low power modes, instant sleep/wake, exact control of instructions/clock, far fewer security issues.

Teensy and ESP32 are just souped up Arduinos.


> Teensy and ESP32 are just souped up Arduinos.

Cheaper, more powerful, more feature-rich Arduinos, if you squint. I'm not sure why you would actually use an Arduino™ unless they've really improved their lineup since I last looked.


I use Arduino Nanos as modules in larger systems. I can buy them for $2.50 each, which is far less than it would cost me to build them.


If you can get them for $2.50, then yeah that's competitive, but the official site lists the Arduino Nano at $20.70 and it appears to be weaker than the Teensy-LC at $11.65, or ESP 8266 series at <$5 for a 5-pack (why Amazon only seems to sell them in bundles is beyond me). And the Teensy has a better chip and can do USB mouse/kb emulation, and ESPs all do wifi. If you can get them for $2.50 and don't need more power or features then yeah that's a good pick, but I maintain that official Arduino™ boards are not an obvious first pick.


Oh, I definitely agree with you on that. Unless you're a school or similar institution that needs to go with the safe choice, I really don't understand how Arduino™ makes any sales.

The clones are so much less expensive than the official Arduinos that there's no comparison. Even the versions that Adafruit makes that IMHO, improve the design cost less than the official arduinos. So it's not a surprise that the Chinese clones will be dirt cheap. I'm not complaining though. I have a board where the Nano (clone) itself is by far the cheapest "chip" in the BOM. Precision analog devices are expensive and my 50 or so boards sold each year can't compete with the Shenzen manufacturers' economies of scale.


The Adafruit “Arduinos” are pretty great.


Hand wiring a mechanical keyboard.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: