At this point you’d need to have lived underneath a rock somewhere on the dark side of the Moon to not have heard about these amazing, 3-cent microcontrollers. A number of places have pitched in on them, but comprehensive reviews, let alone a full-blown review of the entire ecosystem surrounding these Padauk MCUs have been scarce. Fortunately, [Jay Carlson] has put in a lot of effort to collect everything you could possibly want to know about anything Padauk.
The most important take-away is that these MCUs do not have any kind of communication peripherals. UARTs, I2C, and SPI all have to be done in software. They’re not very great at low-power or battery-powered applications due to high power usage. Essentially you’ll be using GPIO pins a lot. On the other hand, its multi-CPU context, FPPA feature is rather interesting, with the article covering it in detail.
As for the development tools, [Jay] came away very impressed with the In-Circuit Emulation (ICE) instead of running code on an MCU, as this can reduce development times significantly. This makes even the OTP (one-time programmable) property of most Padauk MCUs less significant than one might at first assume.
Then there’s the actual programming of the MCUs. The Micro C compiler Padauk provides essentially implements a sub-set of the C language, with some macros to replace things like for loops. Initially this may seem like a weird limitation, until you realize that these MCUs have 64 to 256 bytes of SRAM. That’s bytes, without any prefixes.
Finally, [Jay] shows off a couple of test projects, including a NeoPixel SPI adapter and bike light, which are all available on Github. The WS2812b project is something we have seen before, for example this project from [Anders Nielsen] (featured in the article image), which provides another take on this range of MCUs.
Did reading [Jay]’s article change your mind on these Padauk parts? Have you used these MCUs and ICE parts before? Feel free to leave your thoughts in the comments.
Newton’s Cradle was once upon a time, a popular desk toy in offices around the world. For [TecnoProfesor], however, it wasn’t quite flashy enough. Instead, they built a simulated version with flashing LEDs. As you do.
Rather than relying on the basic principles of the cradle to make it work, this relies on two servo motors to move the balls on the ends, with the ones in the middle remaining stationary. Each ball is fitted with an RGB LED, which flashes with the simulated “motion” of the cradle. By using ping pong balls, the light from the LEDs is nicely diffused. The frame is built from wooden dowels, metal rods, and acrylic.
It’s a project that is sure to confuse at first glance, but it’s a great way to learn basic microcontroller skills like interfacing with LEDs and servomotors. We’d love to see a version that works like a real Newton’s Cradle, flashing the LEDs as they are hit by their neighbours. We’ve even seen them automated, for the truly lazy among us. Alternatively, one could go completely ridiculous and have such a device tweet on every hit, though you might run afoul of the API’s spam restrictions. If you give it a go, drop us a line.
Join us Wednesday at noon Pacific time for the All Things Enigma Hack Chat!
This week’s Hack Chat is a bit of a departure for us because our host, Simon Jansen, has tackled so many interesting projects that it’s hard to settle on one topic. Simon is a multidisciplinary hacker whose interests run the gamut from building an ammo-can Apple ][ to a literal steampunk Rickroller. How about a Bender Brewer? Or a MAME in a TARDIS? Or perhaps making an old phone play music to restore a car by? Oh, and remember that awesome ASCII animation of Star Wars: Episode IV? That was Simon.
So, a little hard to choose a topic, but we asked Simon to talk a bit about his recent Enigma watches. He has managed to put an electronic emulation of the Enigma cypher machine from World War II into both a wristwatch and, more recently, a pocket watch. They’re both gorgeous builds that required a raft of skills to complete. We’ll start there and see where the conversation takes us!
Please join us for this Hack Chat, where we’ll discuss:
- Where the fascination with Enigma came from;
- Tools, techniques, and shop setup;
- Melding multiple, disparate skill sets; and
- What sorts of new projects might we see soon?
You are, of course, encouraged to add your own questions to the discussion. You can do that by leaving a comment on the All Things Enigma Hack Chat and we’ll put that in the queue for the Hack Chat discussion.
Our Hack Chats are live community events on the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, February 27, at noon, 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.
Small microcontrollers can pack quite a punch. With the right code optimizations and proper use of the available limited memory, even small microcontrollers can do things they were never intended to. Even within the realm of intended use, however, there are still lots of impressive uses for these tiny cheap processors like [Lukasz]’s audio amplifier which uses one of the smallest ATtiny packages around in the video embedded below.
Since the ATtiny is small, the amplifier is only capable of 8-bit resolution but thanks to internal clock settings and the fast PWM mode he can get a sampling rate of 37.5 kHz. Most commercial amplifiers shoot for 42 kHz or higher, so this is actually quite close for the limited hardware. The fact that it is a class D amplifier also helps, since it relies on switching and filtering to achieve amplification. This allows the amplifier to have a greater efficiency than an analog amplifier, with less need for heat sinks or oversized components.
All of the code that [Lukasz] used is available on the project site if you’ve ever been curious about switching amplifiers. He built this more as a curiosity in order to see what kind of quality he could get out of such a small microcontroller. It sounds pretty good to us too! If you’re more into analog amplifiers, though, we have you covered there as well.
Continue reading “Tiny Amplifier With ATtiny”
Arduinos are a handy tool to have around. They’re versatile, cheap, easy to program, and have a ton of software libraries to build on. They’ve only been around for about a decade and a half though, so if you were living in 1989 and wanted to program a microcontroller you’d probably be stuck with an 8-bit microprocessor with no built-in peripherals to help, reading from a physical book about registers and timing, and probably trying to get a broken ribbon cable to behave so it would actually power up. If you want a less frustrating alternate history to live in, though, check out the latest project from [Marek].
He discovered some 6502 chips (Polish language, Google Translate link) that a Chinese manufacturer was selling, but didn’t really trust that they were legitimate. On a lark he ordered some and upon testing them he found out that they were real 6502s. Building an 8-bit computer is something he’d like to do, but in the meantime he decided to do a project using one of these chips as a general-purpose microcontroller similar to a modern Arduino. The project has similar specs as an Arduino too, including 8kB of RAM memory, 8kB of I/O address space, and various EPROM capabilities. [Marek] went on to build a shield board for it as well, for easy access to some switches and LEDs. It’s a great build that anyone interested in microcontrollers should check out.
Keep in mind that an ATtiny45 has 8 bits like the 6502 but only costs around $1 USD, whereas a 6502 would have cost around $200 in today’s dollars. It’s really only in modern times that we can appreciate the 6502 as a cheap 8-bit microcontroller for that reason alone, but we can also appreciate how it ushered in a computer revolution since competing Intel and Motorola chips cost around six times more before it showed up. They became so popular in fact that people still regularly use them to build retrocomputers of all kinds.
RISC architecture is gonna change everything, and I still can’t tell if we like that movie ironically or not. Nevertheless, RISC-V chips are coming onto the market, chipmakers seem really interested in not paying licensing fees, and new hard drives are shipping with RISC-V cores. The latest development in Open instruction sets chips comes from OpenISA. They’ve developed the VEGAboard, a dev board with two RISC-V chips and Arduino-style pin headers.
The VEGAboard comes loaded with an NXP chip which combines an ARM Cortex-M0 and Cortex-M4. So far, so good, but there are already dozens of boards that combine two ARM microcontrollers on a single development platform. The real trick is the RI5CY and Zero-RI5CY chips on the VEGAboard, a 4-stage RISC-V RV32IMCCXpulp CPU. This comes from the PULP platform, meant to be a small, low-power, but parallel platform for various processing needs. In short, with the VEGAboard, you’re not running a blink() sketch on the RISC-V microcontroller. You run the blink() sketch on the ARM microcontrollers, while using the RISC-V chip to read accelerometers and toggle pins. It’s a coprocessor, but it’s RISC-V.
Other features of the VEGAboard include 4MB of Flash, a light sensor, accelerometer, magnetometer, an RGB LED, OpenSDA serial debug adapter, an on-board BLE radio, and of course those wonky Arduino pin headers.
There are, or were, free VEGAboards available, but those are long gone. It’s still an interesting platform, though, and if you’d like to get your hands on one, production will resume shortly. Of course, if you need RISC-V right now, there are actual RISC-V Arduinos, a RISC-V with built-in neural networks, and SiFive will soon have a Linux-capable RISC-V multicore board. These are exciting times, and every day we’re seeing how RISC architecture is gonna change everything.
The Internet of Things is eating everything alive, and the world wants to know: how do you make a small, battery-powered, WiFi-enabled microcontroller device? This is a surprisingly difficult problem. WiFi is not optimized for low-power operations. It’s power-hungry, and there’s a lot of overhead. That said, there are microcontrollers out there with WiFi capability, but how do they hold up to running off of a battery for days, or weeks? That’s what [TvE] is exploring in a fantastic multi-part series of posts delving into low-power WiFi microcontrollers.
The idea for these experiments is set up in the first post in the series. Basically, the goal is to measure how long the ESP8266 and ESP32 will run on a battery, using various sleep modes. Both the ESP8266 and ESP32 have deep-sleep modes, a ‘sleep’ mode where the state is preserved, a ‘CPU only’ mode that turns the RF off, and various measures for sending and receiving a packet.
The takeaway from these experiments is that a battery-powered ESP8266 can’t be used for more than a week without a seriously beefy battery or a solar panel. Run times are much longer with an open network as compared to a secured network, and that security eats up a ton of power: connecting to a secure network every now and again means your ESP might only run for a day, instead of a week.
There is another option, though: the ESP32. While the ’32 is vastly more powerful and more capable than the ESP8266, it also has a few improved features that help with power consumption. Importantly, there’s a bug in the ESP8266 where it drops into modem sleep instead of light sleep about half the time. This error was fixed in the ESP32, but all that power does come at a cost. On the whole, if you’re concerned about security, the ESP32 is slightly better, simply because it does the ‘security’ part of connecting to a WiFi network faster. This is really a remarkable amount of testing that’s gone into this write-up, so if you’re developing something battery-powered with any ESP, it’s well worth the read.