Live data from Hacker News

Teensy 4.1 Development Board

pjrc.com

151–160 of 211 posts

Re: Teensy 4.1 Development Board

#151

Earlier quoted context omitted.

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:…

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, b…

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

Re: Teensy 4.1 Development Board

#152

Earlier quoted context omitted.

But what to use? The Pi Zero can't be used for mass-production, because you can't get it in quantity. Other options exist, but they are even more expensive, or obscure chinesium for which you can't get documentation or someone to talk to.

If you want an decently peforming SBC that can match the Pi Zero in price, unfortunately you're out of luck. But if you're willing to put in a bit of work, make your own board and suffer most things not working out-of-the-box, you have a wide variety of cheap SoCs and MPUs. E.g. the STM32 MPU line, which has a decent enough ecosystem and plenty of devboards available, and has some chips under $5/unit in bulk.

None of which have wifi, as far as I can see?

Re: Teensy 4.1 Development Board

#153
post #82

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…

Look at the NetBurner products. For the most part they Just Work, and their uCos-derived OS is a pleasure to use. It has a distinctly simplistic old-school vibe, but they have updated it to support WebSockets and numerous other new(ish) features. The end result is a good compromise between LwIP and full-blown Linux/BSD.

No association with the company, just a satisfied user.

Re: Teensy 4.1 Development Board

#154
post #8

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?

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.

Re: Teensy 4.1 Development Board

#155
post #82

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…

That's a matter of opinion.

If you don't know jack about network programming, then of course you can retreat to Linux. But Linux is not an edge / IoT platform by any stretch of the imagination. Micro RTOS is closer, but still overkill for embedded Wi-Fi.

Specifically for Wi-Fi, LWIP is -the- stack to use for embedded TCP/IP. It is under 30K with full TCP/IP and offers everything you need. Then there is COAP or MQTT, which are miniscule compared to HTTP. mbedTLS adds another 80K for full TLS compatibility on 40MHz processors. On top of this every major wifi vendor has an SDK that fits nicely into LWIP (some even ship it), some are small (CC5000) some are larger (like the WF200), but the APIs are pretty straightforward. Now, leaving TCP/IP and 802.11 will add headaches (BLE, ZigBee, Zwave) due to additional learning curves, but only because most people in embedded networking already understand TCP/IP and 802.11 phy.

If you want to play in the embedded space, you gotta learn about it. Running back to linux might work in some cases, but not constrained IoT space.

EDIT: I had my #s reversed, LWIP is under 30K, mbedTLS is around 80K, TLS is most of that (esp. RSA stuff, I could have disabled everything I didn't need [mbed has highly granular config] based on the ciphersuite and shrunk it considerably since ECC is smaller and faster than RSA). Just checked my map file, and I was in -O0 optimization mode.

EDIT2: On second thought: if people want to complain that they need linux to do networking on the edge, please complain! I'll interview after you and demonstrate MQTT with TLS v1.3 running off an MCU with a 2032 coincell for months (eh, I'm weirdflexing a little, but still...)

Re: Teensy 4.1 Development Board

#156

Earlier quoted context omitted.

If you want an decently peforming SBC that can match the Pi Zero in price, unfortunately you're out of luck. But if you're willing to put in a bit of work, make your own board and suffer most things not working out-of-the-box, you have a wide variety of cheap SoCs and MPUs. E.g. the STM32 MPU line, which has a decent enough ecosystem and plenty of devboards available, and has some chips under $5/unit in bulk.

None of which have wifi, as far as I can see?

You need an external module for WiFi, but the standard Linux networking tools and drivers work.

Re: Teensy 4.1 Development Board

#157
post #96

Earlier quoted context omitted.

How are things on the commonly used RTOSes? I'm not really into hardware much, only fairly recently learned basic electronics as a hobby, but I've seen ARM push their "mbed" ( https://os.mbed.com/ ) thing in many places recently (most recently saw their logo printed on a nRF52 BLE dev kit). I've also seen Amazon get more involved with (in charge of?) FreeRTOS ( https://aws.amazon.com/freertos/ ) quite some time ago.…

I wonder what's your use case for RTOS? I don't really know any problems that couldn't be solved with micros communicating with linux. Seems like even SpaceX gets away with it. I mean there seem to be the market so clearly there are some people who need it, I just would like to learn more about where is it really needed.

SpaceX uses FreeRTOS and VxWorks for chips that need hard real time guarantees from what I've heard.

Re: Teensy 4.1 Development Board

#158

Earlier quoted context omitted.

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 g…

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... 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 Ra…

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.

Re: Teensy 4.1 Development Board

#159

Earlier quoted context omitted.

> 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 FP…

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/

Re: Teensy 4.1 Development Board

#160
post #82

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…

That's a matter of opinion. If you don't know jack about network programming, then of course you can retreat to Linux. But Linux is not an edge / IoT platform by any stretch of the imagination. Micro RTOS is closer, but still overkill for embedded Wi-Fi. Specifically for Wi-Fi, LWIP is -the- stack to use for embedded TCP/IP. It is under 30K with full TCP/IP and offers everything you need. Then there is COAP or MQTT,…

I think it's less a matter of opinion and more a question of expectations around the device you're building.

To illustrate, let's say we build the embedded device your way. Six months later, we get a support request from a customer that needs to get the device onto the captive portal at a hotel. The portal is a javascript monstrosity full of CORS failures.

What is your immediate response?

a) Oh, shit, I didn't think of that. I can probably come up with a workaround, but I'll need at least a month, and it'll end up being a huge hack that involves tethering with a phone or laptop (but not via WiFi, since the radio we're using can't do AP and STA modes simultaneously), and the UI will be such a disaster that the customer is immediately going to want to find a better product.

or

b) This is an industrial CNC controller... WTF are you doing on a hotel WiFi network?

If your answer is (a), then your approach is almost certainly the wrong one. If your answer is (b), your approach might be reasonable, but there are still other factors to consider.

It's possible to know everything there is to know about network programming but still not want to debug or re-implement 30 years worth of accumulated cruft around firewalls, MTU sizes, MS-CHAPv2 bugs, malformed packet crashes, anything IPv6, etc. And that's just the table stakes... leaky abstractions mean that sooner or later, everything connected to the internet is going to need to do something higher up the stack that's just barely out of reach for your microcontroller, even one that's beefy enough to run Windows 95. What are you going to do when there's some new web standard where the only implementation is in the Chrome source code as of three months ago?

You'll be able to make it work, but it'll take thousands of person-hours to make it work well. Or you can just "run back to Linux."

Separately, if you're running a company that builds embedded devices, do you want to pay your engineers to fix network stack bugs that were solved in 1999, or do you want to pay them to develop your company's value-add? Weirdflex all you like, it's still (usually) a terrible business decision. I don't think pennypinching on the BOM is a valid justification when things like [1] exist.

[1] https://www.seeedstudio.com/MT7688AN-BIT3-1-Module-p-4011.ht...

Post reply on HN