Cheap stuff gets our creative juices flowing. Case in point? [Andy Grove] built an eight-sensor HC-SR04 breakout board, because the ultrasonic distance sensors in question are so affordable that a hacker can hardly avoid ordering them by the dozen. He originally built it for robotics, but then it’s just a few lines of code to turn it into a gesture-controllable musical instrument. Check out the video, embedded below, for an overview of the features.
His Octasonic breakout board is just an AVR in disguise — it reads from eight ultrasonic sensors and delivers a single SPI result to whatever other controller is serving as the brains. In the “piano” demo, that’s a Raspberry Pi, so he needed the usual 5 V to 3.3 V level shifting in between.
The rest is code on the Pi that enables gestures to play notes, change musical instruments, and even shut the Pi down. The Pi code is written in Rust, and up on GitHub. An Instructable has more detail on the hookups.
One of the best smart home hacks is implementing an energy monitor of some kind. It’s easy enough to say that you’re trying to save energy, but without the cold hard data, it’s just talk. Plus, it’s easy and a great way to build up something DIY that the whole family can use.
[Bogdan] built up a simple whole-apartment power monitor from scratch over the weekend, and he’s been nice enough to walk us through the whole procedure, starting with picking up a split-core CT sensor and ending up with a finished project.
The brains of his project are an ESP8266 module, which means that he needed to adapt the CT sensor to put out a voltage that lies within the chip’s ADC range of 0 V to 3.3 V. If you’re undertaking an energy monitor project, it’s as easy as picking the right burden resistor value and then shifting the ground-centered voltage up by 1.6 V or so. We say it’s easy, but it’s nice to have a worked example and some scope shots. The microcontroller reads the ADC frequently, does a little math, and you’re done. Continue reading “How Many Watts Are You Using?”→
You’d be forgiven for thinking this was going to be an anti-IoT rant: who the heck needs an IoT rice cooker anyway? [Microentropie], that’s who. His rice cooker, like many of the cheapo models, terminates heating by detecting a temperature around 104° C, when all the water has boiled off. But that means the bottom of the rice is already dried out and starting to get crispy. (We love the crust! But this hack is not for us. This hack is for [Microentropie].)
So [Microentropie] added some relays, a temperature sensor, and an ESP8266 to his rice cooker, creating the Rice Cooker 2.0, or something. He tried a few complicated schemes but was unwilling to modify any of the essential safety features of the cooker. In the end [Microentropie] went with a simple time-controlled cooking cycle, combined with a keep-warm mode and of course, notification of all of this through WiFi.
There’s a lot of code making this simple device work. For instance, [Microentropie] often forgets to press the safety reset button, so the ESP polls for it, and the web interface has a big red field to notify him of this. [Microentropie] added a password-protected login to the rice cooker as well. Still, it probably shouldn’t be put on the big wide Internet. The cooker also randomizes URLs for firmware updates, presumably to prevent guests in his house from flashing new firmware to his rice cooker. There are even custom time and date classes, because you know you don’t want your rice cooker using inferior code infrastructure.
In short, this is an exercise in scratching a ton of personal itches, and we applaud that. Next up is replacing the relays with SSRs so that the power can be controlled with more finesse, adding a water pump for further automation, and onboard data logging. Overkill, you say? What part of “WiFi-enabled rice cooker” did you not understand?
Although we have strong suspicions that the model’s designer failed entomology, this spider robot is very cool. [Hari Wiguna] made one, and is justifiably thrilled with the results. (Watch his summary on YouTube embedded below.)
Thanks to [Regis Hsu]’s nice design, all [Hari] had to do was order a hexapod’s dozen 9g servos for around $20, print out the parts, attach an Arduino clone, and he was done. We really like the cutouts in the printed parts that nicely fit the servo horns. [Hari] says the calibration procedure is a snap; you run a sketch that sets all the servos to a known position and then tighten the legs in place. Very slick.
E-ink displays are awesome. Humans spent centuries reading non-backlit devices, and frankly it’s a lot easier on the eyes. But have you looked into driving one of these critters yourself? It’s a nightmare. So chapeau! to [Julien] for his FPGA-based implementation that not only uses our favorite open-source FPGA toolchain, and serves as an open reference implementation for anyone else who’s interested.
Getting just black and white on an E-ink display is relatively easy — just hit the ink pixels with the same signal over and over until they give up. Greyscale is made by applying much more nuanced voltages because the pixels are somewhat state-dependent. If the desired endpoint is a 50% grey, for instance, you’d hit it with a different pulse train if the pixel were now white versus if it were now black. (Ever notice that your e-book screen periodically does a white-black flash? It’s resetting all the pixels to a known state.) And that’s not even taking into account the hassles with the various crazy voltages that E-ink displays require, which [Julien] wisely handed off to a dedicated chip.
In the end, the device has to make 20-50 passes through the screen for one user-visible refresh. [Julien] found that the usual microcontrollers just weren’t capable of the speed that he wanted, hence the FPGA and custom waveform tables. We’ve seen E-ink hacks before, and [Julien] is standing on the shoulders of giants, most notably those of [Petteri Aimonen] and [Sprite_tm]. [Julien]’s hack has the fastest updates we’ve ever seen.
We still can’t wait for the day that there is a general-purpose E-ink driver chip out there for pennies, because nearly every project we make with a backlit display would look better, and chew through the batteries slower, with E-ink. In the meantime, [Julien]’s FPGA implementation is pretty close, and it’s fully open.
In the last episode, I advocated a little bit for Forth on microcontrollers being a still-viable development platform, not just for industry where it’s usually seen these days, but also for hackers. I maybe even tricked you into buying a couple pieces of cheap hardware. This time around, we’re going to get the Forth system set up on that hardware, and run the compulsory “hello world” and LED blinky. But then we’ll also take a dip into one of the features that make Forth very neat on microcontrollers: easy multitasking.
Mecrisp-Stellaris Forth runs on a great number of ARM microcontrollers, but I’ll focus here on the STM32F103 chips that are available for incredibly little money in the form of a generic copy of the Maple Mini, often called a “STM32F103 Minimum System Board” or “Blue Pill” because of the form-factor, and the fact that there used to be red ones for sale. The microcontroller on board can run at 72 MHz, has 20 kB of RAM and either 64 or 128 kB of flash. It has plenty of pins, the digital-only ones are 5 V tolerant, and it has all the usual microcontroller peripherals. It’s not the most power-efficient, and it doesn’t have a floating-point unit or a DAC, but it’s a rugged old design that’s available for much less money than it should be.
Similar wonders of mass production work for the programmer that you’ll need to initially flash the chip. Any of the clones of the ST-Link v2 will work just fine. (Ironically enough, the hardware inside the programmer is almost identical to the target.) Finally, since Forth runs as in interactive shell, you’re going to need a serial connection to the STM32 board. That probably means a USB/serial adapter.
This whole setup isn’t going to cost much more than a fast food meal, and the programmer and USB/serial adapter are things that you’ll want to have in your kit anyway, if you don’t already.
You can power the board directly through the various 3.3 and GND pins scattered around the board, or through the micro USB port or the 5V pins on the target board. The latter two options pass through a 3.3 V regulator before joining up with the 3.3 pins. All of the pins are interconnected, so it’s best if you only use one power supply at a time.
Following the time-honored YouTube tradition of ordering cheap stuff online and playing with it while the camera runs, [Monta Elkins] bought a Stirling engine that drives a DC motor used as a generator. How much electrical juice can this thing provide, running on just denatured alcohol? (Will it blend?)
The answer is probably not really a spoiler: it generates enough to run “Blink.ino” on a stock Arduino, at least when powered directly through the 5 V rail. [Monta] recorded an open-circuit voltage of around 5 V, and a short-circuit current of around 100 mA at a measured few hundred millivolts. While he didn’t log enough of the points in-between to make a real power curve, we’re guessing the generator might be a better match for 3.3 V electronics. The real question is whether or not it can handle the peaky demands of an ESP8266. Serious questions, indeed!