$1 POV Display Goes Round And Round

You don’t need much to do a persistence of vision display. A few LEDs and a processor is all it really takes. [B45i] made a simple PC board with five LEDs and an ATtiny CPU. There’s a battery and it connects to a fan to spin around.

While the project is pretty simple, we liked two aspects of it. First, he provides very detailed explanations about how to use an Arduino to program the Tiny using the Arduino IDE.

Continue reading “$1 POV Display Goes Round And Round”

ESP8266 Web Server Saves 60% Power With A 1 Ms Delay

Arduino has a library for quickly and easily setting up a simple web server on an ESP8622-based board, and [Tomaž] found that power consumption on an ESP-01 can be reduced a considerable amount by simply inserting a 1 ms delay in the right place. The reason this works isn’t because of some strange bug or oddball feature — it’s really just a side effect of how the hardware operates under the hood.

[Tomaž] uses the “hello world” example from ESP8266WebServer to explain. In it, the main loop essentially consists of calling server.handleClient() forever. That process checks for incoming HTTP connections, handles them, sends responses, exits — and then does it all over again. A simple web server like this one spends most of its time waiting.

A far more efficient way to handle things would be to launch server.handleClient() only when an incoming network connection calls for it, and put the hardware to sleep whenever that is not happening. However, that level of control just isn’t possible in the context of the Arduino’s ESP8266WebServer library.

So what’s to be done? The next best thing turns out to be a simple delay(1) statement right after each server.handleClient() call in the main loop.

Why does this work? Adding delay(1) actually causes the CPU to spend the vast majority of its time in that one millisecond loop. And counting microseconds turns out to be a far less demanding task, power-wise, than checking for incoming network requests about a hundred thousand times per second. In [Tomaž]’s tests, that one millisecond delay reduced idle power consumption at 3.3 V from roughly 230 mW to around 70 mW — about 60% — while only delaying the web server’s response times by 6-8 milliseconds.

For simple web server applications, this is is for sure a good trick to keep in mind. There are also much more advanced techniques for saving power on ESP8266-based boards; from boards that barely sip a single microamp while sleeping, to coin-cell powered boards that go so far as to modify the TCP/IP stack to help squeeze every bit of power savings possible.

A baguette sits diagonally across a wooden cutting board. Above it sits an Arduino and an electronics breadboard.

Theremin Baguette Brings New Meaning To Breadboarding

Theremins are a bit of an odd instrument to begin with, but [AphexHenry] decided to put one where no theremin has gone before: into a baguette.

The “baguetophone” is a theremin and piezo-percussion instrument inside a hollowed-out baguette. Starting with a DIY theremin tutorial from Academy of Media Arts Cologne, [AphexHenry] added some spice with a piezo pickup inside the baguette to function as a percussion instrument. One noted downside of squeezing the instrument into such an unusual enclosure is that the antenna doesn’t respond as well as it might with a more conventional arrangement. Outputs from the piezo and antenna are run through Max/MSP on a computer to turn the bread into a MIDI controller. Like many DIY theremins, it appears that this build neglects the volume antenna, but there’s no reason you couldn’t add one. Maybe disguised as a piece of cheese?

Outside smuggling an instrument into a French café for a flash mob performance, this could also prove handy if you’re someone who gets hungry while playing music. We don’t recommend snacking on the Arduino even if it is ROHS compliant though.

If you want to learn more about how theremins work, check out Theremin in Detail. After that, you might want to browse all of our theremin articles or look at this project where they used a 555 instead.

Continue reading “Theremin Baguette Brings New Meaning To Breadboarding”

Less Is More When It Comes To Sensor Power

It used to be the cost of a microcontroller was a big inhibitor to putting brains in everything, but those days are long gone. Even 32-bit CPUs are now cheap enough that you can throw them into anything. The biggest factor now is probably power. Do you really want to charge your electric toilet seat or change batteries every few weeks? A company called Everactive wants you to ditch your battery using their sensor platform they claim harvests energy from a variety of sources and they are about to deliver their first developer’s kit.

The sensor can measure temperature, humidity, pressure, magnetic field, and acceleration on three axes. The device claims to harvest energy from radio frequencies, vibrations, small temperature differentials or light, even indoors. Our guess is that the sensor package runs on very little and when you poll the device wirelessly, the incoming radio signal supplies power for communication. The company claims its device uses 1000 times less power than competing solutions.

Continue reading “Less Is More When It Comes To Sensor Power”

A diagram showing an LED on the left, a lever-style plumbing valve in the center, and an Arduino Uno on the right.

Plumbing Valves As Heavy Duty Analog Inputs

Input devices that can handle rough and tumble environments aren’t nearly as varied as their more fragile siblings. [Alastair Aitchison] has devised a brilliant way of detecting inputs from plumbing valves that opens up another option. (YouTube) [via Arduino Blog]

While [Aitchison] could’ve run the plumbing valves with water inside and detected flow, he decided the more elegant solution would be to use photosensors and an LED to simplify the system. This avoids the added cost of a pump and flow sensors as well as the questionable proposition of mixing electronics and water. By analyzing the change in light intensity as the valve closes or opens, you can take input for a range of values or set a threshold for an on/off condition.

[Aitchison] designed these for an escape room, but we can see them being great for museums, amusement parks, or even for (train) simulators. He says one of the main reasons he picked plumbing valves was for their aesthetics. Industrial switches and arcade buttons have their place, but certainly aren’t the best fit in some situations, especially if you’re going for a period feel. Plus, since the sensor itself doesn’t have any moving parts, these analog inputs will be easy to repair should anything happen to the valve itself.

If you’re looking for more unusual inputs, check out the winners of our Odd Inputs and Peculiar Peripherals contest or this typewriter that runs Linux.

Continue reading “Plumbing Valves As Heavy Duty Analog Inputs”

Bare-Metal STM32: Setting Up And Using SPI

The Serial Peripheral Interface (SPI) interface was initially standardized by Motorola in 1979 for short-distance communication in embedded systems. In its most common four-wire configuration, full-duplex data transfer is possible on the two data (MOSI, MISO) lines with data rates well exceeding 10 Mb/s. This makes SPI suitable for high-bandwidth, full-duplex applications like SD storage cards and large resolution, high-refresh displays.

STM32 devices come with a variable number of SPI peripherals, two in the F042 at 18 Mb/s and five in the F411. Across the STM32 families, the SPI peripheral is relatively similar, with fairly minor differences in the register layout. In this article we’ll look at configuring an SPI peripheral in master mode.

Continue reading “Bare-Metal STM32: Setting Up And Using SPI”

This Snappy 8-Bit Microcomputer Brings The Speed To Retrocomputing

When the need for speed overcomes you, thoughts generally don’t turn to 8-bit computers. Sure, an 8-bit machine is fun for retro gameplay and reliving the glory days, and there certainly were some old machines that were notably faster than the others. But raw computing power isn’t really the point of retrocomputing.

Or is it? [Bernardo Kastrup] over at The Byte Attic has introduced an interesting machine called the Agon Light, an 8-bit SBC that’s also a bit like a microcontroller. The machine has a single PCB that looks about half as big as an Arduino Uno, and sports some of the same connectors and terminals around its periphery. The heart of the Agon Light is an eZ80 8-bit, 18.432 MHz 3-stage pipelined CPU, which is binary compatible with the Z80. It also has an audio-video coprocessor, in the form of an ESP32-Pico-D4, which supports a 640×480 64-color display and two mono audio channels. There’s no word we could find of whether the ESP32’s RF systems are accessible; it would be nice, but perhaps unnecessary since there are both USB ports and a PS/2 keyboard jack. There’s also a pin header for 20 GPIOs as well as I2C, SPI, and UART for serial communication.

The lengthy video below goes into all the details on the Agon Light, including the results of benchmark testing, all of which soundly thrash the usual 8-bit suspects. The project is open source and all the design files are available, or you can get a PCB populated with all the SMD components and just put the through-hole parts on. [Bernardo] is also encouraging people to build and sell their own Agon Lights, which seems pretty cool too. It honestly looks like a lot of fun, and we’re looking forward to seeing what people do with this.

Continue reading “This Snappy 8-Bit Microcomputer Brings The Speed To Retrocomputing”