Audio Playback Toy For DSP Adventures

The declining costs of single-board computers has made serious computing power available for even the most trivial of tasks. It’s easy enough to slap a Raspberry Pi onto almost anything for nearly the same cost as a powerful 32-bit microcontroller platform, but this takes some of the fun out of projects for a few of us. Looking to get into the weeds can be a challenge as well, as [Michal Zalewski] demonstrates in this audio playback device he built from a simple 8-bit microcontroller.

The small toy takes audio input from a microphone through an op-amp and feeds this signal to an ADC within the AVR128DA28 microcontroller. The data is then stored on a separate memory chip ready to be played back through another op-amp paired with a speaker. This is where being familiar with the inner workings of the microcontroller comes in handy. By manipulating the interrupt routines in specific ways, the audio stored in memory can be played back at various speeds.

[Michal] intended this build to be a toy for one of his younger relatives, and for the price of a few ICs and buttons it does a pretty good job of turning a regular voice into a chipmunk voice like some commercial children’s toys some of us might remember. If the design aesthetics of this gadget look familiar, you may be thinking of his minimalist gaming device which we recently featured.

Now ChatGPT Can Make Breakfast For Me

The world is abuzz with tales of the ChatGPT AI chatbot, and how it can do everything, except perhaps make the tea. It seems it can write code, which is pretty cool, so if it can’t make the tea as such, can it make the things I need to make some tea? I woke up this morning, and after lying in bed checking Hackaday I wandered downstairs to find some breakfast. But disaster! Some burglars had broken in and stolen all my kitchen utensils! All I have is my 3D printer and laptop, which curiously have little value to thieves compared to a set of slightly chipped crockery. What am I to do!

Never Come Between A Hackaday Writer And Her Breakfast!

OK Jenny, think rationally. They’ve taken the kettle, but I’ve got OpenSCAD and ChatGPT. Those dastardly miscreants won’t come between me and my breakfast, I’m made of sterner stuff! Into the prompt goes the following query:

"Can you write me OpenSCAD code to create a model of a kettle?" Continue reading “Now ChatGPT Can Make Breakfast For Me”

Screenshot of a terminal showing the HELP command in action - outputting descriptions of other commands

Let’s Make SCPI More Helpful

The SCPI (Standards Command for Programmable Instruments) protocol is exceptionally popular in lab and workspace tools, letting you configure and fetch data from oscilloscopes and lab scales alike in a standardized way. However, when interfacing with a SCPI device, you need to use a programming guide document if you want to know the commands for any of the inevitably extended features; essentially, SCPI isn’t as human-friendly as you might want. [MisterHW] argues that SCPI could use more discoverability by proposing a HELP? command.

This proposal is so intuitive, it makes you wonder why it isn’t in the base spec. It adds a built-in command that provides information on other commands. Internally, the description is just an extra string parameter that you add to your command definition code, and you can use it to describe the parameter types and ranges it takes. The output is both human-readable and machine-parseable, and as it’s stored within your code, it’s way quicker to update the description string than it is to re-release programming guides. Which are themselves prone to being outdated as-is, so decreasing reliance on them is a win-win.

The proposal makes a lot of sense, and [MisterHW] is willing to back it up with a pull request to the most popular SCPI library, libscpi. Whenever the pull request finally goes through, you will have the option to easily add the HELP? command support to whatever SCPI-connected device you might have brewing.

While the old devices will eventually fade, SCPI is not about to die out – hackers keep building devices with SCPI as the communication protocol, as the spec is quite powerful. For instance, here’s this fancy temperature logger, or this Source Measurement Unit – both of them use SCPI for hacker-to-device data transfer, and it’s likely to be libscpi under the hood. Ever wondered what SCPI is all about? Check out our overview!

China’s New 100 MPH Train Runs On Hydrogen And Supercaps

Electric cars are very much en vogue right now, as the world tries to clean up on emissions and transition to a more sustainable future. However, these vehicles require huge batteries as it is. For heavier-duty applications like trucks and trains, batteries simply won’t cut the mustard.

Normally, the solution for electrifying railways is to simply string up some wires and call it a day. China is trying an alternative solution, though, in the form of a hydrogen-powered train full of supercapacitors.

Continue reading “China’s New 100 MPH Train Runs On Hydrogen And Supercaps”

Cheap Kitchen Scale Learns To Speak JSON With ESP32

Smart kitchen appliances are expensive, and more often than not, your usage data goes to whichever company operates the inevitable cloud service. Meanwhile the cheap ones contain substantially the same components without the smarts, so surely a hardware hacker can add a microcontroller to a cheap appliance for a bit of smart home technology without the privacy issues? It’s something [Liore] has done with an Amazon Basics kitchen scale, removing the electronics and wiring up an ESP32 to the load cell instead.

The Wheatstone bridge load cell circuit generates a tiny voltage difference that’s far too small for an ESP32 to measure, so in between the pair is an Avia Semiconductor HX711 strain gauge amplifier module. In addition, there’s a small OLED screen and the two buttons used in the Amazon scale are wired in too, providing the the kitchen scale functionality you’d expect.

Naturally the ESP32 brings along with it WiFi networking capabilities, which [Liore] has taken full advantage of here. By navigating a web browser to its IP address, you’ll receive the scale’s current reading in JSON format. This should make it easy to integrate with other systems, from Home Assistant to OctoPrint. We can see that there is plenty of scope for further enhancements for those prepared to write a little code.

Of course, this isn’t the first enhanced scale we’ve brought you, here’s one with Bluetooth. We’ve also seen hackers dispense with the kitchen-safe trappings and build the load cell directly into their own contraptions.

Copy And Paste Lithium Battery Protection

Lithium batteries have, nearly single-handedly, ushered in the era of the electric car, as well as battery energy storage of grid power and plenty of other technological advances not possible with older battery chemistries. There’s just one major downside: these lithium cells can be extremely finicky. If you’re adding one to your own project you’ll have to be extremely careful to treat them exactly how they are designed to be treated using something like this boilerplate battery protection circuit created by [DIY GUY Chris].

The circuit is based around the TP4056 integrated circuit, which handles the charging of a single lithium cell — in this design using supplied power from a USB port. The circuit is able to charge a cell based on the cell’s current charge state, temperature, and a model of the cell. It’s also paired with a DW01A chip which protects the cell from various undesirable conditions such as over-current, overcharge, and over-voltage.

The best thing about this design isn’t the design itself, but that [DIY GUY Chris] built the circuit schematic specifically to be easily copied into PCB designs for other projects, which means that lithium batteries can more easily be integrated directly into his other builds. Be sure to check out our primer on how to deal with lithium batteries before trying one of your own designs, though.

Continue reading “Copy And Paste Lithium Battery Protection”

The Chipwhisperer adapter plugged into a ChipWhisperer, with the STM chip mentiuoned soldered on

ChipWhisperer Adapter Helps Reverse-Engineer A Controversial Game Cartridge

The ChipWhisperer has been a breakthrough in hobbyist use of power analysis and glitching attacks on embedded hardware. If you own one, you surely have seen the IDC and SMA sockets on it – usable for connecting custom breakouts housing a chip you’re currently probing. Today, [MAVProxyUser] brings us a ChipWhisperer adapter for STM32F446ZEJx, which comes in a UFBGA144 package – and the adapter has quite a backstory to it.

In retro gaming world, a crowdfunding campaign for a game called PAPRIUM has seen a huge success getting funded in 2017. However, the campaign has grossly underdelivered throughout the last five years, and out of those rare cartridges delivered to backers, quite a few have faulty hardware. Getting replacements isn’t realistic at this point, so the repair attempts and game preservation efforts have been ongoing. Trouble is – there are protection mechanisms against dumping the cartridges, and one of the protection mechanisms is the built-in flash read protection of the aforementioned STM32 found on the cartridge. This board adapts the chip to a ChipWhisperer interface for protection bypass exploration, and has quite a few configuration jumpers anyone facing a similar chip is able to use – Eagle files are out there as well, in case your chip needs a slightly different approach.

With reverse-engineering underway, are we likely to see this cartridge’s defenses fall? Our assessment is ‘yes’ – it’s not like there’s a shortage of mechanisms for bypassing security ; from modchips to EMP attacks to blasting the die with a laser, hardware-reliant security is, still, quite bypassable. All in all, despite the drama around the project, this is one more reference design for the ChipWhisperer, and a fun journey to look forward to.