
Teensy 4.1 Development Board - milo_im
https://www.pjrc.com/store/teensy41.html
======
ohazi
PSA: Networking on microcontrollers is a giant pain in the ass.

Don't get me wrong, boards like this (and ESP/Realtek boards with WiFi) are
great for hacky prototypes. But if you're building an embedded device that
will be deployed in any sort of volume, a small application processor running
Linux will make your life _dramatically_ easier. You can keep it asleep most
of the time if your power budget is tight.

The hard part is not cramming in an Ethernet PHY or a 2.4 GHz radio, it's the
mountain of software that you need to run on top of it to get the kind of
reliable, secure communications channels that we've come to expect. Bare metal
networking stacks like LwIP have a reputation for being buggy, and are nowhere
near as battle-tested as the Linux/BSD networking stacks security-wise. Some
of the more memory constrained devices can barely fit a complete certificate
chain. Are you really prepared to roll out updates on a system like this when
the next Heartbleed comes along?

Also, the layers tend to pile on, so while you might get away with a bare-
bones wire protocol initially, you'll be starting your project close to the
limits of what is practical. Somebody will eventually ask you if you can
connect to a websocket. I know buildroot and yocto look a little scary at
first, but they're better than designing yourself into a corner before you
even get off the ground.

~~~
cactus2093
On a similar note, does anyone know of good resources for beginners for
prototyping all the way through small-scale manufacturing of an embedded
device?

As a web & backend developer who likes to tinker with Arduino/Teensy style
projects, I've always been curious what all would be involved in actually
getting some units manufactured, like for a small kickstarter run or
something. It seems pretty doable these days to get pcb boards printed and
even assembled once you have a final design. What I haven't been able to find
much of, is advice along the lines of going from a prototype board like an
Arduino or Teensy system, to a productionalized system in terms of both the
software and hardware - what platform is easiest to build on (like this advice
to use a Linux-based system if you need any networking), how to hook up a
bootloader, how to build a system that allows users to update firmware for
future bugfixes or features, etc. plus I'm sure there are a million other
unknown unknowns I would never even think of.

~~~
ChrisGammell
I made a video course for getting up and running with KiCad, the open source
electronics CAD program:
[https://www.youtube.com/playlist?list=PLy2022BX6EspFAKBCgRuE...](https://www.youtube.com/playlist?list=PLy2022BX6EspFAKBCgRuEuzapuz_4aJCn)

If you're looking at broader focus on building hardware, Contextual
Electronics helps to fill out some of the other elements you're looking to do.
As luck would have it, I just started a new course today (no joke) where I'm
showing how I'm designing a Raspberry Pi HAT with cellular and Bluetooth
capabilities, which I'll be selling and using as a reference design for my
hardware design consulting business.

~~~
OJFord
How does KiCAD compare to Eagle? I find it being built in to Fusion 360 now
(since Autodesk bought it) pretty compelling, but I haven't actually used any
schematic/PCB CAD software since that I don't think.

~~~
ChrisGammell
I think they have been keeping apace for the most part, but the integration of
F360 is a really nice feature if you do a lot of mechanical/electrical
integration. I think it might be a bit overplayed, since my designs are
usually, "Here's the mechanical space you're allotted, it's probably not going
to change", but that's not the case for everyone.

As for KiCad, the most recent release (5.1.x) have been really stable and
introduced a ton of features over the series 4 release. Like anything, once
you're used to the methods, it's hard to get an objective look on how things
work but I can tell you that I use KiCad for all of my professional design
work and it has served me very well.

One thing I continue to be excited for is the extensibility of KiCad, since
Python scripting is a main feature of KiCad (though the program is written in
C++). This has developed a wide range of user plugins and scripts that have
opened up some awesome new features.

One of my favorites is the Interactive BOM plugin, it's really quite amazing.
Here's a user showcasing it on twitter:
[https://twitter.com/arturo182/status/1254376168322670593](https://twitter.com/arturo182/status/1254376168322670593)

------
angst_ridden
The Teensy line is great for folks like me, who are doing one-off projects and
who know more about software than hardware. There are good libraries, a
helpful developer, and a supportive community. I've used Teensies to make
millisecond-accurate camera controllers, radar-triggered music/light-show
devices, and burning-man style LED hats. If I were doing production, they'd
probably be overkill (and too expensive), but they save me time and effort and
are easy to use.

~~~
wolrah
Yup. I love Teensies for building USB input devices. It's trivial to get
something basic working and not much harder to tweak it if you want to appear
differently to the system or use a higher refresh rate for lower latency
gaming.

They're breadboard friendly, as easy to use as an Arduino, etc. For one-off
builds that need lower power or tighter timing than I can achieve with a Pi I
pretty much default to looking at the Teensy line unless I need some kind of
wireless communications, in which case an ESP variant is usually my choice.

------
Youden
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?

~~~
skybrian
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.

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

~~~
skybrian
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](https://www.pjrc.com/store/teensy3_audio.html)

~~~
Applejinx
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.

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

------
numpad0
Cortex-M7 @ 600MHz, pads for PSRAM(8MB or more), microSD, wait, isn’t this
thing Linux Kernel compatible at that point?

~~~
tyingq
μClinux, since there's no MMU.

~~~
Endlessly
μClinux is a variation of the Linux kernel, previously maintained as a fork,
that targets microcontrollers without a memory management unit (MMU).

SOURCE:
[https://en.m.wikipedia.org/wiki/ΜClinux](https://en.m.wikipedia.org/wiki/ΜClinux)

——————————-

How uClinux provides MMU-less processors with an alternative
[https://www.eetimes.com/how-uclinux-provides-mmu-less-
proces...](https://www.eetimes.com/how-uclinux-provides-mmu-less-processors-
with-an-alternative/)

------
dekhn
I've worked with all the various Arduino and other MCU boards as well as Pis.
My preferred chip is still an Arduino Nano in a screw terminal carrier (just
today I wired up one to make a rotating stepper that rotated in sync with a
camera trigger, to do 3D scanning for Meshroom).

I love the old Uno, it's solid as a rock but of course has very limited CPU
and memory. I would only use an Uno if I had a specific shield that fit the
Uno and needed 100% compatibility. The dupont connectors are too loose for
permanent projets that get shaken around... it's 5V, which makes working with
some hardware easier (although most things "kinda work" with 3.3v MCUs, some
stuff doesn't).

The Nano is like the UNO but smaller, although you can get nice little screw
terminal carriers that make permanent connections more reliable.

The Teensy is a faster arduino with some very good support libraries. It Just
Works, most of the time. But I haven't ended up using it for anything; I've
replaced it with Nanos or ESP8266 or ESP32.

The ESP2866 and ESP32 are great systems, truly amazing what they can do even
if they're just emulating an Arduino. however, there is a fair amount of
compatibility problems with the 32 (for example, I have a sketch for a self-
balancing robot, it works fine on Nano and ESP2866, but hangs on the '32). But
the 32 has a special trick up its sleeve: the arduino functionality is really
just an emulator that runs inside an RTOS. I started to play with FreeRTOS on
ESP32 ([https://docs.espressif.com/projects/esp-
idf/en/latest/esp32/...](https://docs.espressif.com/projects/esp-
idf/en/latest/esp32/api-reference/system/freertos.html)) and was really
impressed. It feels a lot like my days using a 286- no virtual memory, a few
megs of RAM, and basic networking.

------
yjftsjthsd-h
Generally a very nice addition to the lineup. I'm personally fascinated by the
support for soldering on an additional RAM chip; depending on how painful it
is to actually access that memory, the extra 8MB could finally be enough to
run uclinux.

~~~
MrBuddyCasino
The ESP32 can do that too. Note that PSRAM is a lot slower than the embedded
SRAM, so if you need to access that memory a lot, you're going to have a bad
time.

~~~
yjftsjthsd-h
Rest assured, when I'm trying to figure out whether I can coerce Linux into
running on a board that was never meant to support such a thing, "slow" is a
secondary concern:)

~~~
mastax
Well in that case...
[http://dmitry.gr/?r=05.Projects&proj=07.%20Linux%20on%208bit](http://dmitry.gr/?r=05.Projects&proj=07.%20Linux%20on%208bit)

------
subhobroto
With the supercheap sub $5 ESP32/STM32 boards (both have Arduino core support)
and their equally cheap add onboards for camera, ethernet or USB OTG - who
exactly are using the Teensy line today and why?

I'm genuinely curious.

~~~
btashton
These are substantially more powerful than both of those families.

~~~
ATsch
Also substantially more expensive, especially compared to the likes of the
banana pi zero, which gets you four cores at 1.2Ghz, 512MB RAM, Linux and a
GPU for 35% cheaper. Pair that with a Blue Pill STM32 for $3 if you need
realtime and you still have money left over.

~~~
subhobroto
That looks like a great stack!

In the "Pi" family, for a Linux SBC, which pi/clone gives a good bang for the
buck?

banana pi zero has shown up multiple times but since you are in the know, I
wanted to ask what's a good SBC to run OpenWRT on, for example

------
fermienrico
I wish Teensy was open source, it is not. It is amazingly well engineered
including the bootloader, just that it's all closed source.

~~~
detaro
Isn't the bootloader chip the only not-open thing?

~~~
fermienrico
Do I get a license for hardware schematics and board layout and other aspects
besides the bootloader? Where can I find a license in writing? If a license is
not provided, I can't do anything with it besides hobby work.

Here is the schematic page but no mention of a license:
[https://www.pjrc.com/teensy/schematic.html](https://www.pjrc.com/teensy/schematic.html)

This is NOT open-source. It is visible-source.

Please note, I am not _demanding_ an open-source license. Closed source
projects are totally fine, I feel absolutely no entitlement to get stuff for
free. I am just pointing out projects that are closed-source but disguised as
open-source, thereby taking advantage of the hobbyist community. Paul may be a
cool guy, but objectively that doesn't change anything.

~~~
detaro
True, board layouts aren't either, forgot about that. The circuit itself can't
be copyrighted, so you do not need a license to make your own board with the
same components.

I personally quite like the approach of using the bootloader chip as light
DRM: The majority of the value is in software you can freely use, with
licenses provided. Prototyping with a Teensy and then making a product using
the same parts and the libraries, not a problem. Just if you want to provide
the same easy dev-board experience you need the bootloader chip (which you can
buy and use for your own design) or invest your own development of an
alternative.

~~~
fermienrico
Yep, I really like how the bootloader works - upgrades are drag and drop. I'll
write to Paul if he is open for selling the bootloader license to me for
commercial use. I am sure we can come to an agreement.

~~~
detaro
He sells the chip pre-programmed for the older versions:
[https://www.pjrc.com/store/ic_mkl02.html](https://www.pjrc.com/store/ic_mkl02.html)

Support for the chip used in Teensy 4 is apparently coming in the near-ish
future: [https://forum.pjrc.com/threads/57132-Bootloader-Chip-For-
Tee...](https://forum.pjrc.com/threads/57132-Bootloader-Chip-For-Teensy-4-0)

------
The_Double
Does this one have the JTAG/SWD pins available? I know that the teensy
bootloader is one of its USPs, but not being able to connect a debugger is
kind of a dealbreaker for any sort of complex project.

~~~
duskwuff
It does not.

This has been a longstanding issue with all of the ARM-based Teensy boards,
and it's really the main reason I'd hesitate to recommend them.

------
jepler
These are great little boards, and they already have support in the latest
beta of CircuitPython! [https://circuitpython.org](https://circuitpython.org)

------
whiskers
If you're interested in this and based in the UK then we have stock coming
shortly and you can sign up for notification here:
[https://shop.pimoroni.com/products/teensy-4-1](https://shop.pimoroni.com/products/teensy-4-1)

------
ers35
Mirror: [http://archive.is/ewDJq](http://archive.is/ewDJq)

~~~
jhloa2
Archive.is seems to be down at the moment.

~~~
cpach
Works fine here

------
Marazan
To answer the frequent question about Teensy.

Paul. Paul is the reason to buy a Teensy.

His dedication and support is inspiring. Phenomenal.

~~~
subhobroto
Having raised this question [1], I am impressed at how well written the
software is!

[1]
[https://news.ycombinator.com/item?id=23144432](https://news.ycombinator.com/item?id=23144432)

------
postit
If you want to see a cool project done with Teensy check this custom midi
controller/sequencer interface with motorized sliders

[https://www.youtube.com/watch?v=IH-
grgRmClY](https://www.youtube.com/watch?v=IH-grgRmClY)

[https://forum.pjrc.com/threads/54995-Zeus-Commander-
SPS-16-M...](https://forum.pjrc.com/threads/54995-Zeus-Commander-SPS-16-MIDI-
step-amp-pattern-sequencer?p=196699#post196699)

------
FpUser
I remember using Teensy based on AT90USB1286 microcontroller for 4 quadrant
3phase AC motor torque control. Worked like a charm. Glad to hear they're
stilll in business.

~~~
sgt
Sounds cool. What did you need 3 phase 4 quadrant for, if I may ask out of
curiosity?

~~~
FpUser
The product is known enough to reveal my identity unfortunately ;)

~~~
sgt
That's okay, I don't mind. :-)

------
cpach
Just out of curiosity, what could be a use case for this thingy?

~~~
ortusdux
Their blog (when it loads) gives some great examples:
[https://www.pjrc.com/blog/](https://www.pjrc.com/blog/)

------
pugworthy
The Teensy line just keeps getting better and better with each release.

------
jtchang
I've been playing around with boards like this that keep getting smaller and
smaller. Do people generally prototype something using these boards and then
go directly to manufacturing? I imagine you'd want to have a smaller package
than use these types of components as part of you larger product right?

~~~
analog31
I wouldn't hesitate to do so. It all depends on what kind of price / volume
you're trying to target. For very short run, garage-shop types of operations,
not only is handling surface-mount a headache, but there's a learning curve to
getting any kind of circuit boards manufactured.

In addition to these microcontroller boards, you can find "breakout" boards
for a variety of sophisticated components, and combine them on a carrier board
that can be basic 2-layer hand soldered. It's quite a practical way for
getting something simple out the door.

There's a lot of garage shop types of businesses that combine small scale
manufacturing with customer support, and are not looking to get into high
volume consumer market. For instance a friend of mine develops industrial
solutions, where the customer might buy 10 to 1000 modules for their own use,
or to support a product, such as some kind of weird agricultural machinery.
These folks make their money by being local, easy to deal with, and willing to
listen and understand the customer's need.

This is a clear case of "do things that don't scale."

~~~
floatrock
Do these people write about what they do? Make and Hackaday are great for fun
one-off projects, but I don't really know much about the world of small-scale
commercial like this. Make went bankrupt because they couldn't support
operations on a hobby budget... I'd love to know what the next step up looks
like, especially if it's some large esoteric agricultural machine.

~~~
analog31
They rarely blog about it. Many of them are old school engineers, some are
retired from engineering careers.

------
Nican
Taking a look at this. It looks like it only supports ICMP and UDP?
[https://forum.pjrc.com/threads/60532-Teensy-4-1-Beta-
Test?p=...](https://forum.pjrc.com/threads/60532-Teensy-4-1-Beta-
Test?p=237096&viewfull=1#post237096)

~~~
asmithmd1
That was the low-level access. Below that they talk about porting a LWIP:

> I developed test sketches for NTP, DNS, multicast, web server, web client,
> httpd with SD or SdFat-beta lib, tfttp server (SD, SdFat-beta, or SPIFFS),
> ftpd (get/put) with SD lib, and TCP/UDP client/server

------
non-entity
I've been playing around embedded stuff and hardware design recently and
mostly started with arduino's and esp8266/32's, but have wanted to play around
with both FPGA's and ARM boards for designing more complex things.

I'm kinda lost on what ARM board to get though. This thing seems pretty cool,
and others have recommended an STM32 board, but theres dozens of those in
various form factors and chip features and I'm just not sure.

Anyone know a good comparison of ARM based dev boards that gives a good
description of the differences and maybe recommended applications?

~~~
zargon
"The Amazing $1 Microcontroller" is a great place to start. It covers the main
ARM micro families. Essentially you're looking for differences in peripherals,
since the CPU is the same for any given Cortex M0, M3, etc.

[https://jaycarlson.net/microcontrollers/](https://jaycarlson.net/microcontrollers/)

Edit: I guess if you're looking to move to "more complex" things you may be
beyond the $1 chips that this site reviews.

~~~
non-entity
> I guess if you're looking to move to "more complex" things you may be beyond
> the $1 chips that this site reviews.

That's the end goal yeah, but ofc I need to learn the platforms first.

------
detaro
Woah, Ethernet is nice to see on a Teensy!

------
MuffinFlavored
What would it take to make CAN work with this?
[https://en.wikipedia.org/wiki/CAN_bus](https://en.wikipedia.org/wiki/CAN_bus)

~~~
linarism
It is supported in hardware for multiple protocols: CAN1.0, CAN2.0, and CANFD.
I'm pretty sure there are 3 ports that can be used simultaneously and
independently. I only use 2 with CAN1.0.

Edit: By hardware support I mean that a CAN transciever connects to two GPIO
pins with access to CAN chip hardware. No SPI interface needed.

~~~
MuffinFlavored
Do you need a CAN controller and a CAN transceiver or just a transceiver?

------
paddlesteamer
Every time I ran across these boards, I always think of "Apollo Guidance
Computer"[1] which is used on Apollo spacecrafts.

They have 16KB ram 2000MHz cpu freq so I feel like I can build a spaceship
witha couple of teensies :D

[1]
[https://en.m.wikipedia.org/wiki/Apollo_Guidance_Computer](https://en.m.wikipedia.org/wiki/Apollo_Guidance_Computer)

~~~
crgwbr
One note: they had a 2.048 MHz CPU, not a 2000 MHz CPU. 2000 MHz only slightly
below modern clock speeds.

------
AWildC182
No JTAG, not interested. JTAG is essential for being able to properly utilize
chips like these. They need to pin it out.

------
vorpalhex
This is fantastic, especially with functional wired ethernet at such a price
point. This is a lot of customizable horsepower in a small form factor with
great peripheral support!

