Building An Army Of ESP32 Air Quality Sensors

The ESP8266 and its heavyweight sibling the ESP32 are fantastic boards to develop with as they allow you to quickly and easily get a project online. Just tack a few sensors and some LEDs on them, and you’re well on the way to producing your own “Internet of Things”. The real challenge is utilizing the incredible capabilities these boards offer us to do something meaningful.

Judging by what he’s got so far, we think [Samuel Klit] is well on his way. He’s using the ESP32 and some off-the-shelf modular components to create an Internet-connected air quality monitoring station. But he’s not just building one or two of them, he’s building enough so they can be distributed and collect data over a wide area. Who knows, perhaps you’ll be building one next.

[Samuel] is using the CCS811 sensor which can pick up potentially harmful Volatile Organic Compounds (VOCs) and determine carbon dioxide concentrations, as well as a BMP280 sensor to read ambient temperature and atmospheric pressure. There’s also an SD card reader for local data storage, a 1602 LCD display that provides a basic user interface, and the electronics required to support the 18650 Li-Ion batteries which power the unit for up to 12 hours on a charge. Everything’s held in a professional looking enclosure that we’ll be sure to add to our next AliExpress order.

Collecting data is one thing, but what do you do with it once you’ve got it? To that end, each node runs a web interface that not only allows you to view current hardware status and download the locally stored data, but also provides an easy to understand visual representation of the environmental conditions. To get around the limited storage space for web assets on the chip, [Samuel] is calling out to Chart.js to inject some slick graphics into the web interface on-demand. The web interface is a particularly nice touch, and an excellent use of the power and capabilities offered by the ESP32.

We’ve previously seen air quality sensors added to Taxi cabs in Peru, the homes surrounding Barcelona’s Plaza del Sol, and of course [Radu Motisan] has done incredible work towards the goal of creating city-wide environmental monitoring networks. With increasingly capable technologies, it looks like citizens are studying the world around them in greater numbers than ever before.

Continue reading “Building An Army Of ESP32 Air Quality Sensors”

Mains Power Supply For ATtiny Project Is Probably A Bad Idea

When designing a mains power supply for a small load DC circuit, there are plenty of considerations. Small size, efficiency, and cost of materials all spring to mind. Potential lethality seems like it would be a bad thing to design in, but that didn’t stop [Great Scott!] from exploring capacitive drop power supplies. You know, for science.

The backstory here is that [Great Scott!] is working on a super-secret ATtiny project that needs to be powered off mains. Switching power supplies are practically de rigueur for such applications, but compared to the intended microcontroller circuit they are actually quite large, and they’ve just been so done before. So in order to learn a thing or two, [Scott!] designed a capacitive dropper supply, where the reactance of the cap acts like a dropping resistor to limit the current. His first try was just a capacitor in series with an LED; this didn’t end well for the LED.

To understand why, he reverse-engineered a few low-current mains devices and found that practical capacitive droppers need a few more components, chiefly a series resistance to prevent inrush current from getting out of hand, but also a bridge rectifier and a zener to clamp things down. Wiring up all that resulted in a working capacitive dropper supply, but a the cost of as much real estate as a small switcher, and with the extra bonus of being potentially lethal if the power supply is plugged in the wrong way. Side note: we thought German line cords were polarized to prevent this, but apparently not? (Ed Note: Nope!)

As always, even when [Great Scott!]’s projects don’t exactly work out, like a suboptimal 3D-printed BLDC or why not to bother building your own DC-AC inverter, we enjoy the learning that results.

Continue reading “Mains Power Supply For ATtiny Project Is Probably A Bad Idea”

Schrödinger Quantum Percolator Makes Half Decent Coffee

I couldn’t decide between normal and decaffeinated coffee. So to eliminate delays in my morning routine, and decision fatigue,  I’ve designed the Schrödinger Quantum Percolator — making the state of my coffee formally undecidable until I drink it.

At its core, the Quantum Percolator contains a novel quantum event detector that uses electron tunneling to determine whether to use caffeinated or decaffeinated coffee. The mechanical components are enclosed in an opaque box, so I can’t tell which type of coffee is being used.

The result is coffee that simultaneously contains and does not contain caffeine – at least until you collapse the caffeination probability waveform by drinking it. As the expression goes, you can’t have your quantum superposition of states and drink it too!

Continue reading “Schrödinger Quantum Percolator Makes Half Decent Coffee”

Arduino Converts Serial To Parallel: The Paralleloslam

After a youth spent playing with Amigas and getting into all sorts of trouble on the school computer network, I’ve always had a soft spot in my heart for hardware from the 80s and 90s. This extends beyond computers themselves, and goes so far as to include modems, photocopiers, and even the much-maligned dot matrix printer.

My partner in hacking [Cosmos2000] recently found himself with a wonderful Commodore MPS 1230 printer. Its parallel interface was very appropriate in its day, however parallel ports are as scarce as SID chips. Thankfully, these two interfaces are easy to work with and simple in function. Work on a device to marry these two disparate worlds began.

Enter: The Paralleloslam

While I was gallivanting around the Eastern coast of Australia, [Cosmos2000] was hard at work. After some research, it was determined that it would be relatively simple to have an Arduino convert incoming serial data into a parallel output to the printer. After some testing was performed on an Arduino Uno, a bespoke device was built – in a gloriously plastic project box, no less.

An ATMEGA328 acts as the brains of the operation, with a MAX232 attached for level conversion from TTL to RS232 voltage levels. Serial data are received on the hardware TX/RX lines. Eight digital outputs act as the parallel interface. When a byte is received over serial, the individual bits are set on the individual digital lines connected to the printer’s parallel port. At this point, the strobe line is pulled low, indicating to the attached device that it may read the port. After two microseconds, it returns high, ready for the next byte to be set on the output lines. This is how parallel interfaces operate without a clock signal, using the strobe to indicate when data may be read.

At this point, [Cosmos2000] reached out – asking if I had a name for the new build.

“Hm. Paralleloslam?”

“Done. Cheers!”

Continue reading “Arduino Converts Serial To Parallel: The Paralleloslam”

Tucoplexing: A New Charliplex For Buttons And Switches

Figuring out the maximum number of peripherals which can be sensed or controlled with a minimum number of IOs is a classic optimization trap with a lot of viable solutions. The easiest might be something like an i2c IO expander, which would give you N outputs for 4 wires (SDA, SCL, Power, Ground). IO expanders are easy to interface with and not too expensive, but that ruins the fun. This is Hackaday, not optimal-cost-saving-engineer-aday! Accordingly there are myriad schemes for using high impedance modes, the directionality of diodes, analog RCs, and more to accomplish the same thing with maximum cleverness and minimum part cost. Tucoplexing is the newest variant we’ve seen, proven out by the the prolific [Micah Elizabeth Scott] (AKA [scanlime]) and not the first thing to be named after her cat Tuco.

[Micah’s] original problem was that she had a great 4 port USB switch with a crummy one button interface. Forget replacement; the hacker’s solution was to reverse and reprogram the micro to build a new interface that was easier to relocate on the workbench. Given limited IO the Tucoplex delivers 4 individually controllable LEDs and 4 buttons by mixing together a couple different concepts in a new way.

Up top we have 4 LEDs from a standard 3 wire Charlieplex setup. Instead of the remaining 2 LEDs from the 3 wire ‘plex at the bottom we have a two button Charlieplex pair plus two bonus buttons on an RC circuit. Given the scary analog circuit the scan method is pleasingly simple. By driving the R and T lines quickly the micro can check if there is a short, indicating a pressed switch. Once that’s established it can run the same scan again, this time pausing to let the cap charge before sensing. After releasing the line if there is no charge then the cap must have been shorted, meaning that switch was pressed. Else it must be the other non-cap switch. Check out the repo for hardware and firmware sources.

Last time we talked about a similar topic a bunch of readers jumped in to tell us about their favorite ways to add more devices to limited IOs. If you have more clever solutions to this problem, leave them below! If you want to see the Twitter thread with older schematics and naming of Tucoplexing look after the break.

Continue reading “Tucoplexing: A New Charliplex For Buttons And Switches”

An ESP8266 Sundial For Your Wall

Hackers absolutely love building clocks. Seriously, there are few other devices for which we’ve seen such an incredible number of variations. But while the clocks that hackers build might blink out the time in binary, or write it out in words, they generally don’t feature hands. Apparently in 2019 it’s more reasonable to read binary than know which way the “little hand” is supposed to be pointing.

This ESP8266 powered “shadow clock” from [Dheera Venkatraman] technically keeps that tradition intact, but only just. His clock doesn’t feature physical hands, but it does use a strip of RGB LEDs to cast multi-colored shadows which serve the same function. With his clock, you don’t even have to try and figure out which hand is the big one, since they’re all the same length. Now that’s what we call progress.

Probably the biggest surprise about this clock, beyond how legitimately good it looks hanging on the wall, is how little work it takes to build your own version. That’s because [Dheera] specifically set out to design something that was cheaper and easier to build than what he’d seen previously, and we think he delivered on that goal in a big way. All you need are the 3D printed components, an ESP8266 board, and a strip of 144 WS2812B LEDs.

The software side of the project is similarly simplistic, and all you need to do is plug in your WiFi network credentials to have the ESP pull the current time from NTP. If you were so inclined, his source code would be an excellent base on which to implement additional features such as animations at the top of the hour.

Compared to something like the Bulbdial clock from 2009, it’s incredible how simple some of these projects have become in the last decade. With the tools and components available to hackers and makers today, there’s truly never been a better time to build something amazing.

New Part Day: Pyboard D Is Smaller, Wireless, And Has Expansion Modules

Historically, microcontrollers’ limited computing power and storage space meant software had to be written in low-level languages out of necessity. In recent years small affordable chips grew powerful enough that they could theoretically run higher level languages, sparking numerous efforts to turn that theory into reality. MicroPython delivered on this promise in a big way when their Kickstarter-funded pyboard was delivered along with its open source software. Several years have since passed, and now it is time for an upgraded pyboard: the D-series.

We’ve talked with [Damien George] back when the original Kickstarter was still underway. Since the launch of pyboard and release of MicroPython source code, we’ve played with ports running on an ESP8266 and on a BBC micro:bit. The software ecosystem has continued to grow, most recently we looked at LittlevGL graphics library. But just because all the flashy action has been happening on the software side doesn’t mean the hardware side has been sitting stagnant.

Pyboard-D upgraded from original pyboard’s STM32F4 to more capable STM32F7 chips. Witnessing the popularity of MicroPython on networked darlings ESP8266 and ESP32, there will be a pyboard D variant with a Murata 1DX on board for WiFi and Bluetooth connectivity. The new pyboard will be extremely compact with limited edge connections so a fine-pitched connector is required to bring out all the pins. To bring the new pyboard back to its educational and tinkerer roots, a breakout board will take those pins and spread them out in a breadboard friendly form factor. These breakout boards can also host small (12 mm x 12 mm) “tiles” to add individual features.

The wireless pyboard D will obviously invite comparison tests with an ESP32 running MicroPython, and its hardware expansion tiles invites comparison with Adafruit’s Wings. It’ll be interesting to see how they fare once widely available and we can get our hands on them. If you’ve picked up an earlier release at FOSDEM 2019, we invite you to share your experience in comments.

[via Adafruit blog]