Machine Learning With Microcontrollers Hack Chat

Join us on Wednesday, September 11 at noon Pacific for the Machine Learning with Microcontrollers Hack Chat with Limor “Ladyada” Fried and Phillip Torrone from Adafruit!

We’ve gotten to the point where a $35 Raspberry Pi can be a reasonable alternative to a traditional desktop or laptop, and microcontrollers in the Arduino ecosystem are getting powerful enough to handle some remarkably demanding computational jobs. But there’s still one area where microcontrollers seem to be lagging a bit: machine learning. Sure, there are purpose-built edge-computing SBCs, but wouldn’t it be great to be able to run AI models on versatile and ubiquitous MCUs that you can pick up for a couple of bucks?

We’re moving in that direction, and our friends at Adafruit Industries want to stop by the Hack Chat and tell us all about what they’re working on. In addition to Ladyada and PT, we’ll be joined by Meghna NatrajDaniel Situnayake, and Pete Warden, all from the Google TensorFlow team. If you’ve got any interest in edge computing on small form-factor computers, you won’t want to miss this chat. Join us, ask your questions about TensorFlow Lite and TensorFlow Lite for Microcontrollers, and see what’s possible in machine learning way out on the edge.

join-hack-chatOur Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, September 11 at 12:00 PM Pacific time. If time zones have got you down, we have a handy time zone converter.

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io. You don’t have to wait until Wednesday; join whenever you want and you can see what the community is talking about.

Micropython And C Play Together Better

Python is a versatile, powerful language but sometimes it’s not the best choice, especially if you’re doing work in embedded systems with limited memory. Sometimes you can get away with MicroPython for these cases, but the best language is likely C or assembly. If you’re really stubborn, like [amirgon], and really want C and Python to play well together, you can make use of his new tool which can bring any C library to MicroPython.

As an example of how this tool is used, a “Pure MicroPython” display driver for ILI9341 on the ESP32, which means that everything was implemented in MicroPython. [amirgon] wanted to see how the Python driver would compare to one that’s already been written in C, and use it to showcase MicroPython binding. This tool also automatically converts structs, unions, enums and arrays to Python objects, and provides a means to work with pointers which is something that Python doesn’t handle in the same way that C requires.

[amirgon] hopes that this tool will encourage the adoption of Micropython by removing the obstacle of missing APIs and libraries in MicroPython. Since most libraries for systems like these are written in C, a way to implement them in Python is certainly powerful. We featured one use case for this a while back, but this is a much more generic fix for this coding obstacle.

Everything You Want To Know About The Cheapest Processors Available

Those of us who use microprocessors in our work will be familiar with their cost, whether we are buying one or two for a project or ten million on reels for a production run. We’re used to paying tens of cents or maybe even a dollar for a little microcontroller in single quantities, and these are probably the cheapest that we might expect to find.

There is a stratum of cheaper devices though, usually from Chinese manufacturers with scant data in English and difficult to source in Europe or the Americas. These chips cost under ten cents each, a figure which seems barely credible. To shed some light upon this world, [cpldcpu] has produced a run-down of some of the available families that even if you will never work with such an inexpensive option still makes for a fascinating read.

These processors are not the type of component you would use for high intensity tasks so it’s probable that you will not be mining cryptocurrency on a brace of them. Thus their architecture is hardly cutting-edge, with the venerable PIC12 being their inspiration and in some cases their direct copy. These are all write-once devices and some of their toolchains are variable in accessibility, but perhaps they aren’t as terrible as some would have you believe. If you are looking for inspiration, we’ve featured one of them before.

TL;DR: the Padauk PFS173, at just under $0.09, has an open-source toolchain and a decent set of peripherals.

Thanks [WilkoL] for the tip.

Image: A real PIC12 die shot. ZeptoBars [CC BY 3.0]

Parallax Update Hack Chat

Join us on Wednesday, August 28th at noon Pacific for the Parallax Update Hack Chat with Chip and Ken Gracey!

For a lot of us, our first exposure to the world of microcontrollers was through the offerings of Parallax, Inc. Perhaps you were interested in doing something small and light, and hoping to leverage your programming skills from an IBM-PC or an Apple ][, you chanced upon the magic of the BASIC Stamp. Or maybe you had a teacher who built a robotics class around a Boe-Bot, or you joined a FIRST Robotics team that used some Parallax sensors.

Whatever your relationship with Parallax products is, there’s no doubting that they were at the forefront of the hobbyist microcontroller revolution. Nor can you doubt that Parallax is about a lot more than BASIC Stamps these days. Its popular multicore Propeller chip has been gaining a passionate following since its 2006 introduction and has found its way into tons of projects, many of which we’ve featured on Hackaday. And now, its long-awaited successor, the Propeller 2, is almost ready to hit the market.

The Gracey brothers have been the men behind Parallax from the beginning, with Chip designing all the products and Ken running the business. They’ll be joining us on the Hack Chat to catch us up on everything new at Parallax, and to give us the lowdown on the P2. Be sure to stop be with your Parallax questions, or just to say hi.

join-hack-chatOur Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, August 28 at 12:00 PM Pacific time. If time zones have got you down, we have a handy time zone converter.

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io. You don’t have to wait until Wednesday; join whenever you want and you can see what the community is talking about.

Four Years Of Learning ESP8266 Development Went Into This Guide

The ESP8266 is a great processor for a lot of projects needing a small microcontroller and Wi-Fi, all for a reasonable price and in some pretty small form factors. [Simon] used one to build a garage door opener. This project isn’t really about his garage door opener based on a cheap WiFi-enabled chip, though. It’s about the four year process he went through to learn how to develop on these chips, and luckily he wrote a guide that anyone can use so that we don’t make the same mistakes he did.

The guide starts by suggesting which specific products are the easiest to use, and then moves on to some “best practices” for using these devices (with which we can’t argue much), before going through some example code. The most valuable parts of this guide especially for anyone starting out with these chips are the section which details how to get the web server up and running, and the best practices for developing HTML code for the tiny device (hint: develop somewhere else).

[Simon] also makes extensive use of the Chrome developers tools when building the HTML for the ESP. This is a handy trick even outside of ESP8266 development which might be useful for other tasks as well. Even though most of the guide won’t be new to anyone with experience with these boards, there are a few gems within it like this one that might help in other unrelated projects. It’s a good read and goes into a lot of detail about more than just the ESP chips. If you just want to open your garage door, though, you have lots of options.

Hacking The Pocket Operator

The number of easily usable and programmable microcontrollers is small, so when selecting one for a project there are only a handful of very popular, well documented chips that most of us reach for. The same can be said for most small companies selling electronics as well, so if you reach for a consumer device that is powered by a microcontroller it’s likely to have one of these few in it. As a result, a lot of these off-the-shelf devices are easy to hack, reprogram, or otherwise improve, such as the Robot Pocket Operator.

The Pocket Operator is a handheld, fully-featured synthesizer complete with internal speaker. It runs on a Cortex M3, a very popular ARM processor which has been widely used for many different applications, and features everything you would need for a synthesizer in one tiny package, including a built-in speaker. It also supports a robust 24-bit DAC/ADC and all the knobs and buttons you would need. And now, thanks to [Frank Buss] there is a detailed teardown on exactly how this device operates.

Some of the highlights from the teardown include detailed drawings of how the display operates, all of the commands for controlling the device, and even an interesting note about how the system clock operates even when the device has been powered off for a substantial amount of time. For a pocket synthesizer this has a lot to offer, even if you plan on using it as something else entirely thanks to the versatility of the Cortex M3.

Continue reading “Hacking The Pocket Operator”

Brett Smith Makes Your Life Easier With Hidden Microcontroller Features

There was a time when microprocessors were slow and expensive devices that needed piles of support chips to run, so engineers came up with ingenious tricks using extra hardware preprocessing inputs to avoid having to create more code. It would be common to find a few logic gates, a comparator, or even the ubiquitous 555 timer doing a little bit of work to take some load away from the computer, and engineers learned to use these components as a matter of course.

The nice thing is that many of these great hardware hacks have been built into modern microcontrollers through the years. The problem is you know to know about them. Brett Smith’s newly published Hackaday Superconference talk, “Why Do It The Hard Way?”, aims to demystify the helpful hardware lurking in microcontrollers.

Join us below for a deeper dive and the embedded video of this talk. Supercon is the Ultimate Hardware con — don’t miss your chance to attend this year, November 15-17 in Pasadena, CA.

Continue reading “Brett Smith Makes Your Life Easier With Hidden Microcontroller Features”