A Printed Case For Your ESP Environmental Sensors

We’ve said it before but it’s worth repeating: rolling your own hardware solution is ridiculously easy these days. If you want to make a network attached environmental sensor, you wire a DHT11 up to an ESP8266 and you’re done. Time to move onto the software. In fact, it can take longer to come up with some kind of suitable enclosure for your hardware project than it does to assemble the thing.

Which is why [Pixel Hawk] has come up with this elegant 3D printed enclosure for the ESP8266 and ESP32. It’s designed to hold the microcontroller in the bottom compartment, while the environmental sensor (either the DHT11 or DHT22) is mounted to the top so it’s exposed to the outside. The case snap fits together so you don’t have to worry about gluing it, and there’s even an opening so you can keep the USB cable plugged in.

In the notes for the design, he mentions that in testing it was determined that the heat of the ESP itself can skew the temperature readings. So he recommends putting the microcontroller to sleep whenever possible, and keeping reads short so the enclosure doesn’t have time to heat up. He’s also created an alternate version of the case with more openings which should help combat this issue if you need to keep the chip awake.

If you’re looking for a complete solution, [Pixel Hawk] has included the source code he personally used to get his ESP32 sensor talking to Blynk, but you certainly don’t have to go that route if you don’t want to. There’s no shortage of existing projects out there that will help you get started with whole-house environmental monitoring. Our very own [Elliot Williams] happens to be partial to MQTT when he wants to get all his gadgets to play nice.

The ESP32, Laid Bare

Most readers will be familiar with the ESP32, Espressif’s dual-core processor with integrated WiFi and Bluetooth. Few of us though will have explored all of its features, including its built-in encryption facilities and secure booting capability. With these, a developer can protect and secure their code, and keep their devices secure.

That sense of security may now be illusory though, thanks to [LimitedResults] who has developed a series of attacks on the chip that compromise its crypto core, secure boot, and flash encryption. This enables both the chance of arbitrary code execution and firmware extraction on locked-down ESP32 devices.

To achieve all this he used a glitching technique on the device’s power supply, inserting a carefully timed glitch in the rail to coincide with a particular instruction being executed. For those of us who are not experts in this technique, he provides a basic primer with a description of his home-made glitcher made using a CMOS switch chip.

It appears that there is no solution to this attack short of new silicon, however, it should be borne in mind that it’s something that depends upon a specialist hacker with a well-equipped bench, and is thus only likely to be a significant headache to manufacturers. But it undermines a key feature of a major line of microcontrollers, and as such it remains a significant piece of work.

A Self-Expanding PWM Driver

For smaller microcontrollers, having enough outputs for the job is sometimes a challenge. A common solution is to do some sort of multiplexing with the available outputs or perhaps something more advanced such as Charlieplexing, but another good option is to use a specialized driver board. What’s even better is if you can daisy chain driver boards to get even more outputs.

[Eric] has been working on a 16 channel LED project but first wanted to build a driver board with 8 channels. Before building a full 16 channel version he realized that he could take the same 8 channel board, make a mirror image of it, and attach it underneath the first board with headers in order to double the number of channels available. Without having to build a separate 16-channel board, this shortcut saved [Eric] some time and a great deal of effort.

This is a great example of working smarter, not harder. Each of the 8 or 16 channels has full PWM support as well to support PWM dimming, and a similar board could be built for motor control as well. It’s a good illustration of how good design can end up working for you as well. And if you need even more outputs, Charlieplexing is one way to get them.

Continue reading “A Self-Expanding PWM Driver”

Improbably Cheap Pocket Welder Gets An ESP32 Makeover

If you move in certain shady circles, you may have noticed the crop of improbably cheap “pocket welders” popping up on the market these days. They’re all variations on a theme, most with wildly optimistic specs minimal accessories of the lowest possible quality. But their tiny size and matching price make them irresistible to the would-be welder, as well as attractive to hardware hackers.

With a 220-V outlet in the garage waiting to be filled and well-knowing the risks, [Mr. RC-Cam] purchased one of these diminutive welding machines. Its shortcomings were immediately apparent, and a complete rework of the welder was undertaken. After addressing safety issues like the lack of a ground connection, [Mr. RC-Cam] added a color-matched 3D-printed hood to house a fancy new LCD touchscreen display. Backing that up is an ESP32 with Bluetooth, which supports remote control via a key fob. He also added a current sense board that uses the welder’s current shunt to measure welding current. Expediently calibrated using a waffle iron and a milli-ohmmeter, the sensor showed that the 200A max advertised for the welder was more like 100A. He tried adding some big electrolytics to fix the current issues, but no dice. With a decent stinger and ground clamp, the modified welder is good enough for his needs, and much was learned in the process. We call that a hacking win.

As an aside, [This Old Tony] recently did a review on a similar welder if you want more details on the internals. We also covered the conversion of a buzz-box to a TIG welder recently, should that be more your style.

Continue reading “Improbably Cheap Pocket Welder Gets An ESP32 Makeover”

ESP32 Makes Great MPPT Controller In Low-Cost Solar Installation

Solar power projects have become, in general, a matter of selecting components like panels and batteries, hooking them together with industry-standard connectors, and sitting back to watch the free electricity flow. As such, solar projects have become a bit boring, so it’s not often we see one that attracts our attention the way this dirt-cheap open-source solar project does.

The backstory on [Tim O’Brien]’s DIY off-grid PV system starts with his desire to charge his eWheel, which amounts to a battery-powered standing unicycle. They look like a fun option for getting around an urban environment if you have the requisite degree of coordination, which we clearly lack. But charging something like that or an eBike is a great use case for solar, especially since [Tim] happened upon a 450W PV panel on the cheap. Sadly, the panel was a commercial unit, and compatible off-the-shelf MPPT, or maximum power-point tracking, controllers are expensive.

His solution was to build his own controller using a cheap DC-DC converter that just so happens to have serial remote control. An ESP32 monitors the panel voltage and controls the buck converter to run whatever he wants. When he’s not charging his eWheel, the system runs his laptop and router. As a bonus, the ESP32 talks to IoT services like Adafruit.io and Thingspeak, allowing him to track MPPT data without shipping it off to parts unknown.

While we appreciate a DIY MPPT controller and like [Tim]’s build, we feel like the documentation needs a bit of fleshing out. With solar installations, the devil is in the details, and not addressing seemingly mundane issues like cable routing and connector installation can lead to disaster.

An ESP32 Clock With A Transforming LED Matrix

Over the years we’ve seen countless ways of displaying the current time, and judging by how many new clock projects that hit the tip line, it seems as though there’s no end in sight. Not that we’re complaining, of course. The latest entry into the pantheon of unusual timepieces is this ESP32-powered desk clock from [Alejandro Wurts] that features a folding LED matrix display.

The clock uses eight individual 8 x 8 LED arrays contained in a 3D printed enclosure that hinges in the middle. When opened up the clock has a usable resolution of 8 x 64, and when its folded onto itself the resolution becomes 16 x 32.

This variable physical resolution allows for alternate display modes. When the hardware detects that its been folded into the double-height arrangement, it goes into a so-called “Big Clock” mode that makes it easier to see the time from a distance. But while in single-height mode, there’s more horizontal real estate for adding the current temperature or other custom data. Eventually [Alejandro] wants to use MQTT to push messages to the display, but for now it just shows his name as a placeholder.

The key to the whole project is the hinged enclosure and the reed switch used to detect what position it’s currently in. Beyond that, there’s just an ESP32 an some clever code developed with the help of the MD_Parola library written for MAX7219 and MAX7221 LED matrix controllers. [Alejandro] has published the code for his clock, which should be helpful for anyone who’s suddenly decided that they also need a folding LED matrix in their life.

Now if the ESP32 LED matrix project you have in mind requires full color and high refresh rates, don’t worry, we’ve got a solution for that.
Continue reading “An ESP32 Clock With A Transforming LED Matrix”

Retro Hardware Plots Again Thanks To Grbl And ESP32

When it comes to building a new CNC machine, you’ve got a wide world of controller boards to choose from. Whether you’re building a 3D-printer or a CNC plasma cutter, chances are good you’ll find a controller that fits your needs and your budget. Not so much, though, when you want to add CNC to a pen plotter from the early days of the PC revolution.

[Barton Dring] just posted the last installment of a five-part series in which he documented putting an Atari 1020 plotter under CNC control. The plotter was a peripheral for the Atari line of 6502 machines from the late 1970s; the guts of the little roll-fed, ballpoint-pen plotter appeared in Commodore, Tandy, and TI versions as well. [Bart]’s goal was to not add or modify anything to the mechanically simple device apart from the controller. That was easier said than done, given the unipolar stepper motors controlling the pen position and paper roll, and the fact that the pen lift mechanism uses a solenoid. Support for those had to be added to his Grbl_ESP32 firmware, as did dealing with the lack of homing switches in the plotter, and adapting the Grbl tool change command to the pen color change mechanism, which rotates the pen holder by bumping it into the right-hand carriage stop. The stock controller was replaced by a custom PCB that fits perfectly within the case, with plenty of room to spare. The video below shows it plotting out a vexillogically relevant sample.

From custom coasters to wooden nickels to complex string art, [Bart] has really put Grbl through the wringer. We really like this retro-redo, though, and fully support his stated desire to convert more old hardware to Grbl_ESP32.

Continue reading “Retro Hardware Plots Again Thanks To Grbl And ESP32”