Track Those Leftovers With This Little Timer

We’ve all at some point in our lives opened the fridge door and immediately wished we hadn’t. A miasma of stench envelops us as we discover that last Saturday’s leftovers have been forgotten, and have gone off. If only we had some way to keep track of such things, to avoid such a stench-laden moment. Step forward [ThinkLearnDo], with a little timer designed for exactly that purpose.

The operation is simple enough, press the button and place the unit on top of the container with the leftovers in it. If you haven’t eaten the leftovers within a week, the LED will start blinking. The blink is a subtle reminder to deal with the old food before it becomes a problem.

Onboard is a Holtek HT68F001 microcontroller with a coin cell for power, not much else is needed. The Holtek is an unusual choice, one of several brands of super-inexpensive Chinese microcontrollers we see less commonly than ATmegas and STM32s. This is exactly the place where such a minimal computer fits perfectly:  a way to add a little bit of smarts to a very cheap item with minimal strain on the BoM.

If these chips interest you, a while back we covered a run-down of the different families including the Holtek and the famous 3-cent Padauk chips.

All-In-One Automated Plant Care

Caring for a few plants, or even an entire farm, can be quite a rewarding experience. Watching something grow under and then (optionally) produce food is a great hobby or career, but it can end up being complicated. Thanks to modern technology we can get a considerable amount of help growing plants, even if it’s just one plant in a single pot.

Plant Bot from [YJ] takes what would normally be a wide array of sensors and controllers and combines them all into a single device. To start, there is a moisture sensor integrated into the housing so that when the entire device is placed in soil it’s instantly ready to gather moisture data. Plant Bot also has the capability to control LED lighting if the plant is indoors.  It can control the water supply to the plant, and it can also communicate information over WiFi or Bluetooth.

The entire build is based around an ESP32 which is integrated into the PCB along with all of the other sensors and components needed to monitor a single plant. Plant Bot is an excellent all-in-one solution for caring for a plant automatically. If you need to take care of more than one at a time take a look at this fully automated hydroponic mini-farm.

Automatic Turntable Makes Photogrammetry A Cinch

Photogrammetry is a great way to produce accurate 3D models of real objects. A turntable is often a common tool used in this work as it helps image an object from all angles. [Peter Lin] wanted a way to run the photogrammetry process with minimal human intervention, and set about building an automated turntable setup.

The build relies on a smartphone to take images of the physical object. The phone is triggered to take photos by an ESP8266, which fires the shutter via the phone’s audio socket. The microcontroller then turns the turntable on for a short period of time after each shot, rotating it by a set angle.

The build still requires objects to be repositioned in various orientations on the turntable now and then, in order to capture the top and bottom areas that would otherwise be obscured. However, the grunt work of taking the photos and rotating the objects is now entirely automated.

It’s a useful build for anyone that finds themselves regularly imaging objects to create 3D models. The results of [Peter]’s rig look great, and as a bonus come with life-like textures ready to go. We’ve seen some other great photogrammetry builds before, too. Video after the break.

Continue reading “Automatic Turntable Makes Photogrammetry A Cinch”

A Rotary Encoder: How Hard Can It Be?

As you may have noticed, I’ve been working with an STM32 ARM CPU using Mbed. There was a time when Mbed was pretty simple, but a lot has changed since it has morphed into Mbed OS. Unfortunately, that means that a lot of libraries and examples you can find don’t work with the newer system.

I needed a rotary encoder — I pulled a cheap one out of one of those “49 boards for Arduino” kits you see around. Not the finest encoder in the land, I’m sure, but it should do the job. Unfortunately, Mbed OS doesn’t have a driver for an encoder and the first few third-party libraries I found either worked via polling or wouldn’t compile with the latest Mbed. Of course, reading an encoder isn’t a mysterious process. How hard can it be to write the code yourself? How hard, indeed. I thought I’d share my code and the process of how I got there.

There are many ways you can read a rotary encoder. Some are probably better than my method. Also, these cheap mechanical encoders are terrible. If you were trying to do precision work, you should probably be looking at a different technology like an optical encoder. I mention this because it is nearly impossible to read one of these flawlessly.

So my goal was simple: I wanted something interrupt driven. Most of what I found required you to periodically call some function or set up a timer interrupt. Then they built a state machine to track the encoder. That’s fine, but it means you eat up a lot of processor just to check in on the encoder even if it isn’t moving. The STM32 CPU can easily interrupt with a pin changes, so that’s what I wanted.

The Catch

The problem is, of course, that mechanical switches bounce. So you have to filter that bounce either in hardware or software. I really didn’t want to put in any extra hardware more than a capacitor, so the software would have to handle it.

I also didn’t want to use any more interrupts than absolutely necessary. The Mbed system makes it easy to handle interrupts, but there is a bit of latency. Actually, after it was all over, I measured the latency and it isn’t that bad — I’ll talk about that a little later. Regardless, I had decided to try to use only a pair of interrupts.

Continue reading “A Rotary Encoder: How Hard Can It Be?”

OLED Display Kicks Knob Up Several Accurate Notches

As far as input devices go, the potentiometer is pretty straightforward: turn it left, turn it right, and you’ve pretty much seen all there is to see. For many applications that’s all you need, but we can certainly improve on the experience with modern technology. Enter this promising project from [upir] that pairs a common potentiometer with a cheap OLED display to make for a considerably more engaging user experience.

To save time, the code is fine tuned in a simulator.

The basic idea is to mount the display over the potentiometer knob so you can show useful information such a label that shows what it does, and a readout of the currently detected value. But you’ll likely want to show where the knob is currently set within the range of possible values as well, and that’s where things get interesting.

In the video after the break, [upir] spends a considerable amount of time explaining the math behind details like the scrolling tick marks. The nearly 45 minute long video wraps up with some optimization, as getting the display to move along with the knob in real-time on an Arduino UNO took a bit of extra effort. The final result looks great, and promises to be a relatively cheap way to add an elegant and functional bit of flair to an otherwise basic knob.

With the code and this extensive demonstration of how it all works, adding a similar capability to your next knob-equipped gadget shouldn’t be too much of a challenge. Perhaps it could even be combined with the OLED VU meters we’ve covered previously. Be sure to let us know if you end up using this technique, as we’d love to see it in action.

Continue reading “OLED Display Kicks Knob Up Several Accurate Notches”

Processing Audio With The RP2040

The Raspberry Pi, although first intended as an inexpensive single-board computer for use in education, is now ubiquitous in electronics communities. Its low price as well as Linux platform and accessible GPIO make it useful in many places outside the classroom. But, if you want to abandon the ease-of-use in favor of an even lower price, the Raspberry Pi foundation makes that possible as well with the RP2040 chip, commonly found on the Pico. [Jason] shows us one way to make use of this powerful chip by putting one in an audio digital signal processing board.

While development boards are available for this chip, [Jason] has opted instead for a custom PCB which he designed himself and includes an integrated headphone amplifier and 3.5 mm audio jacks. To do the actual DSP work, the RP2040 chip uses three 12-bit ADC channels and 16 controllable PWM channels. The platform is also equipped with the TLV320AIC3254 codec from Texas Instruments. With all of this put together, he has a functioning open-source platform he calls the DS-Pi.

[Jason] has built this as a platform for guitar effects and as a customizable guitar amp modeler, but with a platform that is Arduino-compatible and fairly easy to program it could be put to use for anything involving other types of music or audio processing, like this specialized MIDI-compatible guitar effects platform which is built around the same processor.

RSS Printer Gives You The Hard Copy News You Desire

The days of yore saw telex machines and dot-matrix printers with continuous feed paper churning out data in hardcopy form in offices around the world. [Jan Derogee] wanted a bit of that old-school charm, and set about building a RSS news printer using a venerable old printer in his possession. 

The build relies on an ESP8266, with the WiFi-enabled microcontroller readily capable of jumping online and querying RSS feeds for content. It scrapes the XML files for title, description, and publication date information, and formats this for output to the printer. The microcontroller then spits out the data over a Commodore serial interface to a Brother HR-5C printer. Unlike dot-matrix printers of its contemporary era, the HR-5C is a thermal printer. Once loaded up with a roll of the appropriate paper, it can print continuously without requiring any hard-to-source ink ribbons.

Armed with a continuous supply of wireless internet and 210 mm rolls of thermal printer paper, [Jan]’s system should provide news summaries to him for years to come. We’ve seen similar retro news ticker projects before, too. Video after the break.

Continue reading “RSS Printer Gives You The Hard Copy News You Desire”