An LM386 Oscillator Thanks To Tungsten Under Glass

Once ubiquitous, the incandescent light bulb has become something of a lucerna non grata lately. Banned from home lighting, long gone from flashlights, and laughed out of existence by automotive engineers, you have to go a long way these days to find something that still uses a tungsten filament.

Strangely enough, this lamp-stabilized LM386 Wien bridge oscillator is one place where an incandescent bulb makes an appearance. The Wien bridge itself goes back to the 1890s when it was developed for impedance measurements, and its use in the feedback circuits of vacuum tube oscillators dates back to the 1930s. The incandescent bulb is used in the negative feedback path as an automatic gain control; the tungsten filament’s initial low resistance makes for high gain to kick off oscillation, after which it heats up and lowers the resistance to stabilize the oscillation.

For [Grug Huler], this was one of those “just for funsies” projects stemming from a data sheet example circuit showing a bulb-stabilized LM386 audio oscillator. He actually found it difficult to source the specified lamp — there’s that anti-tungsten bias again — but still managed to cobble together a working audio oscillator. The first pass actually came in pretty close to spec — 1.18 kHz compared to the predicted 1.07 kHz — and the scope showed a very nice-looking sine wave. We were honestly a bit surprised that the FFT analysis showed as many harmonics as it did, but all things considered, the oscillator performed pretty well, especially after a little more tweaking. And no, the light bulb never actually lights up.

Thanks to [Grug] for going down this particular rabbit hole and sharing what he learned. We love builds like this that unearth seemingly obsolete circuits and bring them back to life with modern components. OK, calling the LM386 a modern component might be stretching things a bit, but it is [Elliot]’s favorite chip for a reason.

Continue reading “An LM386 Oscillator Thanks To Tungsten Under Glass”

PentaBlinky – When One LED Is Not Blinky Enough

[michimartini] over on Hackaday.io loves playing with multivibrator circuits, and has come across a simple example of a ring oscillator. This is a discrete transistor RC-delay design utilizing five identical stages, each of which has a transistor that deals with charging and discharging the timing capacitor, passing along the inverted signal to its nearest neighbor. The second transistor isn’t strictly needed and is only there to invert the signal in order to drive the LED. When the low pulse passes by the LED lights, without it you’d see all the LEDs lit bar one, which doesn’t look as good.

Compare this with an astable multivibrator to understand how it works

Essentially this circuit is just the classic astable multivibrator circuit that has been split in half and replicated so that the low pulse propagates through more stages than just the two, but thinking about it as a single stage doesn’t work so well until you draw in a couple of neighbors to help visualize the behavior better.

[michimartini] does lament that the circuit starts up in a chaotic fashion and needs a quick short applying to one transistor element in order to get it to settle into a steady rhythm. Actually, that initial behaviour could be interesting in itself, especially as the timing changes with voltage and temperature.

Anyway, we like the visual effect and the curvy organic traces. It would make a neat pin badge. Since we’re thinking about blinkies, here are couple of somewhat minimalist attempts, the world’s smallest blinky, and an even smaller one. Now, who doesn’t love this stuff?

Continue reading “PentaBlinky – When One LED Is Not Blinky Enough”

A ZX Spectrum with a Microdrive emulator plugged into its expansion port

A Modern Replacement For The ZX Spectrum’s Odd Tape Storage System

Unless you were lucky enough to be able to afford a floppy disk drive, you probably used cassette tapes to store programs and data if you used pretty much any home computer in the 1980s. ZX Spectrum users, however, had another option in the form of the Microdrive. This was a rather unusual continuous-loop mini-tape cartridge that could store around 100 kB and load it at lightning speed, all at a much lower price point than a floppy drive. The low price came at the cost of poor durability however, and after four decades it’s becoming harder and harder to find cartridges that work reliably. [Derek Fountain] therefore set out to make a modern Microdrive emulator that stores data on SD cards.

Several projects already exist to replace Microdrives, but they typically also need the ZX Interface 1, a serial/network expansion module that’s becoming equally hard to find. Hence [Derek]’s choice to make his emulator a completely standalone system that directly plugs into the Spectrum’s expansion port.

A 3D-printed box with a PCB inside holding three Raspberry Pi Picos and an SD cardThe system is housed in a 3D-printed enclosure that holds two PCBs. Three Raspberry Pi Picos run the show inside: one to hold the ZX Interface 1’s ROM image and interface with the Spectrum’s bus, another to simulate the Microdrive, and a third to run the user interface and communicate with the SD card. The user can choose between eight tape images stored in .MDR format by using two pushbuttons and a rotary encoder, with a small OLED display showing the machine’s configuration.

While you might think that three dual-core 133 MHz ARM CPUs would run circles around the Spectrum’s Z80, it actually took quite a bit of work to get everyting running properly in real time. The 3.5 MHz bus clock rate gave the second Pico precious little time to fetch the required bytes out of its flash memory. Its RAM was fast enough for that, but too small to hold all eight tape images at the same time. In the end, [Derek] settled on using a separate 8 MB SPI DRAM chip that could easily keep up the data rate, with the Pi just using its GPIO ports to shuttle the data around.

All source code and extensive documentation are available on Derek’s excellent blog post and GitHub page. Be sure to also check out [Jenny]’s detailed review and teardown if you’d like to know more about the weird and wonderful Microdrive system.

Thanks for the tip, [Andrew]! Continue reading “A Modern Replacement For The ZX Spectrum’s Odd Tape Storage System”

The Right Equipment Makes A Difference For Digital Oscilloscope Music

We all love our cheap digital oscilloscopes, and with good reason. But if there’s one place where analog scopes still shine, it’s anywhere you need X-Y mode. Digitally sampling the inputs and mapping them on the screen as discrete points just isn’t the same as steering an electron beam around a CRT, making X-Y mode work on digital scopes — at least the affordable ones — somewhat lacking.

Thankfully, nobody told [Mark Hughes] that his digital scope would make a lousy X-Y display, so he just plunged ahead and figured out how to make it work anyway. The results are actually pretty good, but it took some doing. His setup begins with OsciStudio, an application built to take 3D shapes and animations and turn them into oscilloscope music. The output from that is piped to a USB sound card; [Mark] used a PreSonus Studio 26c, an adapter with DC-coupled inputs, which he found to be critical to getting good images. Also important was a USB isolator and good-quality cables, which greatly reduced jitter and made the image much more stable.

Displaying the image was as easy as connecting the left and right outputs from the sound card to the two scope inputs — [Mark] used a Keysight EDUX1052G — and setting it to X-Y mode. It took a fair amount of fiddling to get as far as he did, but we think the results speak for themselves. As for the sounds made by these images, he says it’s a bit like a hung sound card when a computer blue-screens. So, yeah — not exactly musical, but still an interesting way to have some fun with your digital scope.

2023 Hackaday Prize: A Smart Powermeter That You Actually Want

[Jon] wanted to keep track of his home power use, but didn’t want to have to push his data up to some cloud service that’s just going to leave him high and dry in the future. So he went completely DIY.

This simple and sweet build is now in its third revision, and the refinements show. A first prototype was nothing more than an ESP32 with a screen and some current transformer (CT) sensors to read the current flowing in the wires in his breaker box. The next version added a PCB and a color screen, and the most recent version swapped up to eInk and a nice local power supply, all sized to fit a nice clear power box.

What’s really cute about this design is the use of standard phono headphone jacks to plug the CT sensors into, and the overall sweet combination of a local display and interactivity with [Jon]’s ESPHome-based home automation setup. This design isn’t super complicated, but it doesn’t need to be. It has one job, and it does it nicely. What more do you want?

If you’re interested in getting into ESPHome and/or home automation, check out this great ESPHome resource. It’s probably a lot easier than you think, and you can build your system out one module at a time. If you’re like us, once you get started, you’ll find it hard to stop until everything falls under your watchful eyes, if not your control.

Sniffing Passwords, Rickrolling Toothbrushes

If you could dump the flash from your smart toothbrush and reverse engineer it, enabling you to play whatever you wanted on the vibrating motor, what would you do? Of course there’s no question: you’d never give up, or let down. Or at least that’s what [Aaron Christophel] did. (Videos, embedded below.)

But that’s just the victory lap. The race began with previous work by [Cyrill Künzi], who figured out that the NFC chip inside was used for a run-time counter, and managed to reset it by sniffing the password with an SDR as it was being transmitted. A great hack to be sure, but it only works for people with their own SDR setup.

With the goal of popularizing toothbrush-head-NFC-hacking, [Aaron] busted open the toothbrush itself, found the debug pins, dumped the flash, and got to reverse engineering. A pass through Ghidra got him to where the toothbrush reads the NFC tag ID from the toothbrush head. But how does it get from the ID to the password? It turns out that it runs a CRC on a device UID from the NFC tag itself and also a manufacturer’s string found in the NFC memory, and scramble-combines the two CRC values.

Sounds complicated, but the NFC UID can be read with a cellphone app, and the manufacturer’s string is also printed right on the toothbrush head itself for your convenience. Armed with these two numbers, you can calculate the password, and convince your toothbrush head that it’s brand new, all from the comfort of your smartphone! Isn’t technology grand?

We’re left guessing a little bit about the Rickroll hack, but we’d guess that once [Aaron] had the debug pins on the toothbrush’s microcontroller, he just couldn’t resist writing and flashing in a custom firmware. Talk about dedication.

[Aaron] has been doing extensive work on e-paper displays, but his recent work on the Sumup payment terminal is a sweet look at hacking into higher security devices with acupuncture needles.

Continue reading “Sniffing Passwords, Rickrolling Toothbrushes”

Recreating The Golden Era Of Cable TV

Fewer and fewer people have cable TV subscriptions these days, due to a combination of poor business practices by cable companies and the availability of alternatives to cable such as various streaming platforms. But before the rise of the Internet that enabled these alternatives, there was a short period of time where there were higher-quality channels, not too many commercials, a possibly rose-tinted sense of wonder, and where MTV actually played music. [Irish Craic Party] created this vintage cable TV network to capture this era of television history.

The hardware for this build is a Raspberry Pi driving an LCD display recovered from an old iPad. There’s a custom TV tuner which handles changing the channels and interfaces with an Apple Remote. Audio is sent through old computer speakers, and the case is built from 3D printed parts and some leftover walnut plywood to give it an era-appropriate 80s or early 90s feel. We’ve seen other builds like this before, but where this one really sets itself apart is in the software that handles the (television) programming.

[Irish Craic Party] has gone to great lengths here to recreate the feel of cable TV from decades ago. It has recreations of real channels like HBO, Nickelodeon, and FX including station-appropriate bumpers and commercials. It’s also synchronized to the clock so shows start on the half- or quarter-hour. Cartoons play on Saturday morning, and Nickelodeon switches to Nick-at-Nite in the evenings. There are even channels that switch to playing Christmas movies at the appropriate times, complete with Christmas-themed commercials.

The build even hosts a preview channel, one of the more challenging parts of the build. It continually scrolls through the channels and shows what’s currently playing and what will be showing shortly, complete with a commercial block at the top. For those who were around in the 90s it’s almost a perfect recreation of the experience of watching TV back then. It can even switch to a video game input when tuned to channel 3. There’s almost too much to go into in a short write-up so be sure to check the video after the break.

Thanks to [PCrozier] for the tip!

Continue reading “Recreating The Golden Era Of Cable TV”