Make Your ESP32 Talk Like It’s The 80s Again

80s-era electronic speech certainly has a certain retro appeal to it, but it can sometimes be a useful data output method since it can be implemented on very little hardware. [luc] demonstrates this with a talking thermometer project that requires no display and no special hardware to communicate temperatures to a user.

Back in the day, there were chips like the Votrax SC-01A that could play phonemes (distinct sounds that make up a language) on demand. These would be mixed and matched to create identifiable words, in that distinctly synthesized Speak & Spell manner that is so charming-slash-uncanny.

Software-only speech synthesis isn’t new, but it’s better now than it was in Atari’s day.

Nowadays, even hobbyist microcontrollers have more than enough processing power and memory to do a similar job entirely in software, which is exactly what [luc]’s talking thermometer project does. All this is done with the Talkie library, originally written for the Arduino and updated for the ESP32 and other microcontrollers. With it, one only needs headphones or a simple audio amplifier and speaker to output canned voice data from a project.

[luc] uses it to demonstrate how to communicate to a user in a hands-free manner without needing a display, and we also saw this output method in an electric unicycle which had a talking speedometer (judged to better allow the user to keep their eyes on the road, as well as minimizing the parts count.)

Would you like to listen to an authentic, somewhat-understandable 80s-era text-to-speech synthesizer? You’re in luck, because we can show you an authentic vintage MicroVox unit in action. Give it a listen, and compare it to a demo of the Talkie library in the video below.

Continue reading “Make Your ESP32 Talk Like It’s The 80s Again”

A Survey Of Long-Term Waterproofing Options

When it comes to placing a project underwater, the easy way out is to just stick it in some sort of waterproof container, cover it with hot glue, and call it a day. But when you need to keep water out for several years, things get significantly harder. Luckily, [Patricia Beddows] and [Edward Mallon] from the Cave Pearl Project have written up their years of experience waterproofing data loggers for long-term deployment, making the process easier for the rest of us.

Cleaning cheap eBay boards in alcohol.

It starts with the actual board itself. Many SMD boards have at least some flux left over from the assembly process, which the duo notes has a tendency to pull water in under components. So the first step is to clean them thoroughly with an ultrasonic cleaner or toothbrush, though some parts such as RTCs, MEMs, or pressure sensors need to be handled with significant care.

Actual waterproofing starts with a coating like 422-B or nail polish which each have pros and cons. [Patricia] and [Edward] often apply coatings to PCBs even if they plan to otherwise seal it as it offers a final line of defense. The cut edges of PCBs need to be protected so that water can’t seep between layers, though care needs to be made for connectors like SD cards.

Encapsulation with a variety of materials such as hot glue, heat shrink tubing, superglue and baking soda, silicone rubber, liquid epoxy, paste epoxy (like J-B Weld), or even wax are all commented on. The biggest problem is that a material can be waterproof but not water vapor proof. This means that condensation can build up inside a housing. Temperature swings also can play havoc with sealings, causing gaps to appear as it expands or contracts.

Overall, it’s an incredible guide with helpful tips and tricks for anyone logging data underwater for science or even just trying to waterproof their favorite watch.

Continue reading “A Survey Of Long-Term Waterproofing Options”

A freshly reballed BGA chip next to a clean PCB footprint

Working With BGAs: Soldering, Reballing, And Rework

In our previous article on Ball Grid Arrays (BGAs), we explored how to design circuit boards and how to route the signals coming out of a BGA package. But designing a board is one thing – soldering those chips onto the board is quite another. If you’ve got some experience with SMD soldering, you’ll find that any SOIC, TQFP or even QFN package can be soldered with a fine-tipped iron and a bit of practice. Not so for BGAs: we’ll need to bring out some specialized tools to solder them correctly. Today, we’ll explore how to get those chips on our board, and how to take them off again, without spending a fortune on equipment.

Tools of the Trade

For large-scale production, whether for BGA-based designs or any other kind of SMD work, reflow ovens are the tool of choice. While you can buy reflow ovens small enough to place in your workshop (or even build them yourself), they will always take up quite a bit of space. Reflow ovens are great for small-scale series production, but not so much for repairs or rework. Continue reading “Working With BGAs: Soldering, Reballing, And Rework”

A Hacker’s Introduction To DIY Light Guide Plates

Last year, I found myself compelled to make a scaled-down replica of the iconic test chamber signs from the video game Portal. If you’ve played the game, you’ll remember these signs as the illuminated monoliths that postmarked the start of every test chamber. In hyperstylized video game fashion, they were also extremely thin.

Stay tuned for cake at the end of this article.

True to the original, my replica would need to be both slimmed down and backlit with a uniform, natural white glow. As fate would have it, the crux of this project was finding a way to do just that: to diffuse light coming in from the edges so that it would emit evenly from the front.

What I thought would be quick project ended up being a dive down the rabbit hole that yielded some satisfying results. Today, I’d like to share my findings and introduce you to light guide plates, one of the key building blocks inside of much of today’s backlit screen technology. I’ll dig into the some of the working principles, introduce you to my homebrew approach, and leave you with some inspirational source code to go forth and build your own. Continue reading “A Hacker’s Introduction To DIY Light Guide Plates”

Building The Sanni Cartridge Reader To Back Up And Restore Games And Saves

Game cartridges are generally seen as a read-only medium with the contents as immutable as text chiseled into a granite slab, and with accompanying save files on the cartridge surviving for generations. The unfortunate truth is that as with any media storage, cartridges can and do fail, and save files are often just ethereal bits in battery-backed SRAM. This makes being able to copy not only the game data but also the save files off these cartridges essential. Projects like the Open Source Cartridge Reader by [sanni] make this something that everyone can do.

Intended to be a kind of Swiss Army knife of game cartridges, many game systems are supported directly, and many others via (user-created) adapters. A how-to-build tutorial is provided on the project wiki, though anyone interested in building such a system would do well to look at the expected price tag on the BOM page, which comes in at $134. A recent video by [Kytor Industries] (also included below) demonstrates how to assemble one of these systems, including some modding of the preassembled components.

The main components are the Arduino Mega 2560 Pro MCU module, a Makerbase assembly with LCD, control knob, and SD card slot, an SI5351-based clock generator, a PIC12F629 MCU (for snesCIC and handling SNES DRM) and a lot of pin headers and card edge connectors for specific cartridge types. The assembly is rounded off with a surface-mounted GBA card reader and an enclosure.

One important gotcha is that some of these cartridges run on 5V, while others use 3.3V.  N64 cartridges require the dedicated voltage switch to be set to 3.3V, lest 5V gets sent into the unsuspecting cartridge. Once everything is configured properly, the firmware is flashed onto the Mega 2560 Pro module. The Sanni reader is then ready to run. You can use it to dump ROMs onto SD cards, along with dumping and restoring save files and loading ROMs onto new cartridges.

(Thanks to [Roman] for the tip)

Continue reading “Building The Sanni Cartridge Reader To Back Up And Restore Games And Saves”

All About USB-C: Replying Low-Level PD

Last time, we configured the FUSB302 to receive USB PD messages, and successfully received a “capability advertisement” message from a USB-C PSU. Now we crack the PD specification open, parse the message, and then craft a reply that makes the PSU give us the highest voltage available.

How did the buffer contents look, again?

>>> b
b'\xe0\xa1a,\x91\x01\x08,\xd1\x02\x00\x13\xc1\x03\x00\xdc\xb0\x04\x00\xa5@\x06\x00<!\xdc\xc0H\xc6\xe7\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

The zeroes at the end might look non-significant, and they indeed are not with 99.99% certainty – that said, don’t just discard the entire tail end; one of the bytes in the beginning encodes the length of the message. We’ll read those bytes first, and then read only exactly as much as we need, making sure we aren’t reading two messages and interpreting it as one, and that we’re not discarding zeroes that are part of the message.

Today, we will write code that parses messages right after reading them from the FIFO buffer – however, keep this message handy for reference, still; and if you don’t have the hardware, you can use it to try your hand at decoding nevertheless. If you wanna jump in, you can find today’s full code here!

Continue reading “All About USB-C: Replying Low-Level PD”

How To Roll Your Own Custom Object Detection Neural Network

Real-time object detection, which uses neural networks and deep learning to rapidly identify and tag objects of interest in a video feed, is a handy feature with great hacker potential. Happily, it’s also possible to make customized CNNs (convolutional neural networks) tailored for one’s own needs, and that process just got easier thanks to some new documentation for the Vizy “AI camera” by Charmed Labs.

Raspberry Pi-based Vizy camera

Charmed Labs has been making hacker-friendly machine vision devices for a long time, and the Vizy camera impressed us mightily when we checked it out last year. Out of the box, Vizy has a perfectly functional object detector application that runs locally on the device, and can detect and tag many common everyday objects in real time. But what if that default application doesn’t quite meet one’s project needs? Good news, because it’s possible to create a custom-trained CNN, and that process got a lot more accessible thanks to step-by-step examples of training a model to recognize hands doing rock-paper-scissors.

Person and cat with machine-generated tags identifying them
Default object detection works well, but sometimes one needs custom results.

The basic process is this: Start with a variety of images that show the item of interest. Then identify and label the item of interest in each photo. These photos (a “training set”) are then sent to Google Colab, which will be used to generate a neural network. The resulting CNN model can then be downloaded and used, to see how well it performs.

Of course things rarely work perfectly the first time around, so at this point it’s pretty common for some refinement to be needed to increase accuracy. Luckily there are a number of tools to help do this without creating a new model from scratch, so it’s just a matter of tweaking until things perform acceptably.

Google Colab is free and the resulting CNNs are implemented in the TensorFlow Lite framework, meaning it’s possible to use them elsewhere. So if custom object detection has been holding up a project idea of yours, this might be what gets you over that hump.