A breadboard filled with logic chips and wiring

SPAM-1 Is A Well-Documented Discrete CPU With An Impressive Software Library

Here at Hackaday we love projects that are so well-documented that you can spend days reading up on what the designer has achieved. [John Lonergan] didn’t disappoint when he designed the SPAM-1, an 8-bit CPU built from discrete logic gates. His detailed log contains a wealth of information on such things as designing opcodes, optimizing program counter logic, running a digital simulation, as well as his thoughts on microcode design. The sheer volume of it may be a bit off-putting to beginners, so it might be best to start with the video series that describes the architecture and goes into detail on several sub-blocks.

The design has changed a bit since [John] first started on the project, as he decided to add more and more features, but the final result is a well-thought out architecture that keeps the simplicity needed for discrete hardware but still has enough features to keep it interesting for seasoned CPU aficionados. The instruction size is rather large (48 bits) to simplify the instruction decoding at the expense of larger code size. Conditional jump instructions are not present; instead, all instructions have an optional control flag to make them conditional, a feature inspired by the ARM instruction set.

Once the design was mature enough, [John] modelled the entire thing in Verilog and simulated his design to verify correct operation and to check the timings, estimating it to be workable up to 5 MHz or so. A large stack of breadboards and DIP chips from the 74xx series then brought the design to life.

Not content with simply designing, simulating and implementing a custom CPU in hardware, [John] also spent significant effort on the software side of things, writing an assembler and even a C-like compiler for the SPAM-1 platform. And if that wasn’t enough, he also added an emulator for the classic CHIP-8 language, which allows it to run existing programs like Pong and Tetris. Input and output for all this software is mostly through a UART connection to a PC. A VGA interface is still on [John]’s to-do list, but he did build an adapter to connect a classic NES controller to the system.

The SPAM-1 is a worthy addition to the long list of discrete-logic CPUs we’ve seen here, such as this breadboard computer running a UNIX-like OS or this minimalistic one. If you’d like to see one that implements an existing instruction set, try this homebrew RISC-V computer.

Continue reading “SPAM-1 Is A Well-Documented Discrete CPU With An Impressive Software Library”

Solar Cells, Half Off

A company named Leap Photovoltaic claims they have a technology to create solar panels without silicon wafers which would cut production costs in half. According to [FastCompany] the cells are still silicon-based, but do not require creating wafers as a separate step or — as is more common — acquiring them as a raw material.

The process is likened to 3D printing as silicon powder is deposited on a substrate. The design claims to use only a tenth of the silicon in a conventional cell and requires fewer resources to produce, too.

Continue reading “Solar Cells, Half Off”

Cheap DIY Mic Sounds (And Looks) Damn Good

As any musician, podcaster, or youtuber will be quick to tell you, there’s no substitute for a good microphone. They’ll also be quick to tell you all about their favorite microphone, why it’s better than all the others, and how much it cost (oh, and how round it sounds, whatever that means). But what if you could build your own that sounds as good, if not better, and do it for only $30?

That’s what [Matt] from DIY Perks set out to discover when he built his DIY USB-C Microphone. He was able to source the same microphone capsule that can be found in his high-end, $600 CAD E100S, and built a simple pre-amplifier that bumps its quiet output up to line-level. He even connected it to the mic module with some custom cable made from two tiny enameled wires that won’t transmit bumps and vibrations, wrapped inside desoldering braiding which acts as a shield. He fed the output from the pre-amp into a cheap USB audio interface and voilà! — top-notch sound for next to nothing. Make sure you check out the video below to hear a comparison between the mic and its professional counterparts.

Of course, sounding good isn’t quite enough. [Matt] wasn’t satisfied until the piece looked the part as well, which is why he encased the mic module in custom-bent brass mesh shielding and tubing (which also helps to reduce electrical interference). The brass cage sits suspended via rubber o-rings on a beautiful bent brass mount, which sits atop an articulated brass arm of [Matt]’s own design. Finally, the arm is mounted to a wood and brass enclosure that also serves to house the electronics.

And, in true open-source fashion, the video description is full of links to parts, schematics, and templates in case you want to build one of these beauties for yourself. Between this fantastic build and this other, super-overkill scratch-built USB microphone we featured earlier in the year, there has never been a better time to make yourself a mic you won’t have to trade your car for.

Thanks to [RichV] and [BaldPower] for the tip!

Continue reading “Cheap DIY Mic Sounds (And Looks) Damn Good”

‘Tiny Wake-Up Light Is Hugely Bright

Let’s face it — waking up is rough no matter what time of year it is. But the darkness of fall and winter makes it so much worse. In the past, [Maarten] has used music with increasing volume, but depending on the setup, it can be dodgy if you want to hear a different song each day and don’t have all your files volume-leveled.

Wake Up Bright is the latest in a line of wake-up widgets [Maarten] has made to help rouse them in the morning. Their write-up covers all ideas they’ve had on the subject over the years, as well as the electronics, firmware, debugging, and all the upgrades made after using it for awhile.

The inner workings of an AVR-based artificial sunrise.Slowly brightening an LED doesn’t have to be difficult or expensive. [Maarten] originally used an Atmel 90S2313 AVR and later upgraded to an ATtiny 2313, which was easy because the two are pin-compatible. The 2313 outputs PWM, which duty-cycles the LED to create a nice fade-in of white light that is way more gentle than that classic 1980s alarm clock buzz-beep.

Over time, this project went from one IKEA enclosure to another. We really like the newer one, which looks like it was designed for people to hack into a wake-up light.

Our eyes perceive brightness increases logarithmically, but PWM is linear. We can get around this by multiplying the PWM value by some factor every so often, but the problem is that this AVR never learned its multiplication tables. So how, then? [Maarten]’s answer is byte shifting using a 16-bit register — one byte for PWM, and the other as a scratch pad to do logarithmic math. [Maarten] multiplies the 16-bit register by 1/256 every couple of seconds, which results in a logarithmic increase of brightness. It’s calculated for a 15-minute sunrise, which required some experimentation to get right.

Whereas [Maarten] started with a 3 W RGB LED, the current version has three 10 W LEDs and uses a power supply from an old monitor. Daylight Saving Time is coming to an end in the US, and it’s gonna get worse quickly. Lucky for you, this project is completely open source down to the firmware.

You think that 1980s alarm clock buzz-beep is bad? How about some repeated slaps to the face to wake up?

Groovin’ With A Gesture-Controlled MP3 Player

Touchscreens are great, but they’re not always the perfect solution. Trying to operate one with gloves on (even alleged “touchscreen-friendly” ones) can be cumbersome at best, and if the screen is on a publicly-shared device, such as a checkout kiosk it can easily become a home for bacteria, viruses and all sorts of other nasty stuff.

That’s what [Norbert Zare] was thinking when he built his gesture-controlled MP3 player. It uses a PAJ7620U2 gesture sensor to register a few intuitive hand motions including finger twirls to control the volume, hand swipes to skip forward and backwards, and a flat hand to play and pause the song. It even has a motorized knob and cute cutout music notes that move to provide some visual feedback for the gestures, which you can see in-action in the video below. If this seems familiar, it’s because on Tuesday we took a look at the camera-based, glance-to-skip-tracks controller he built.

To actually play some music, he gutted an old MP3 player and hooked the solder pads from the control buttons up to an Arduino, which reads gesture information from the sensor and emulates the MP3 player’s buttons by setting the appropriate pins to HIGH and LOW. Finally, he topped the whole thing off with an LCD screen and a case.

The great thing about [Norbert]’s approach is that it isn’t just limited to an MP3 player — it can be extended to replace the buttons on pretty much any device. Because the Arduino only needs to be connected to the button inputs of the device, it should be relatively easy to adapt most existing tactile interfaces to be touch-free. Paired with this gesture-tracking macro keyboard we saw earlier in the year, the days of actually having to touch our tech may soon be behind us.

Continue reading “Groovin’ With A Gesture-Controlled MP3 Player”

Separating Ideas From Words

We covered Malamud’s General Index this week, and Mike and I were talking about it on the podcast as well. It’s the boldest attempt we’ve seen so far to open up scientific knowledge for everyone, and not just the wealthiest companies and institutions. The trick is how to do that without running afoul of copyright law, because the results of research are locked inside their literary manifestations — the journal articles.

The Index itself is composed of one-to-five-word snippets of 107,233,728 scientific articles. So if you’re looking for everything the world knows about “tincture of iodine”, you can find all the papers that mention it, and then important keywords from the corpus and metadata like the ISBN of the article. It’s like the searchable card catalog of, well, everything. And it’s freely downloadable if you’ve got a couple terabytes of storage to spare. That alone is incredible.

What I think is most remarkable is this makes good on figuring out how to separate scientific ideas from their prison — the words in which they’re written — which are subject to copyright. Indeed, if you look into US copyright law, it’s very explicit about not wanting to harm the free sharing of ideas.

“In no case does copyright protection for an original work of authorship extend to any idea, procedure, process, system, method of operation, concept, principle, or discovery, regardless of the form in which it is described, explained, illustrated, or embodied in such work.”

But this has always been paradoxical. How do you restrict dissemination of the papers without restricting dissemination of the embodied ideas or results? In the olden days, you could tell others about the results, but that just doesn’t scale. Until today, only the richest companies and institutions had access to this bird’s eye view of scientific research — similar datasets gleaned from Google’s book-scanning program have trained their AIs and seeded their search machines, but they only give you a useless and limited peek.

Of course, if you want to read the entirety of particular papers under copyright, you still have to pay for them. And that’s partly the point, because the General Index is not meant to destroy copyrights, but give you access to the underlying knowledge despite the real world constraints on implementing copyright law, and we think that stands to be revolutionary.

A GPU card with a home-made fan assembly

3D-printed Fan Mount Keeps Server GPU Cool In Desktop Case

Most readers of Hackaday will be well aware of the current shortages of semiconductors and especially GPUs. Whether you’re planning to build a state-of-the art gaming PC, a mining rig to convert your kilowatt-hours into cryptocoins, or are simply experimenting with machine-learning AI, you should be prepared to shell out quite a bit more money for a proper GPU than in the good old days.

Bargains are still to be had in the second-hand market though. [Devon Bray] chanced upon a pair of Nvidia Tesla K80 cards, which are not suitable for gaming and no longer cost-effective for mining crypto, but ideal for [Devon]’s machine-learning calculations. However, he had to make a modification to enable proper thermal management, as these cards were not designed to be used in regular desktop PCs.

The reason for this is that many professional-grade GPU accelerators are installed in rack-mounted server cases, and are therefore equipped with heat sinks but no fans: the case is meant to provide a forced air flow to carry away the card’s heat. Simply installing the cards into a desktop PC case would cause them to overheat, as passive cooling will not get rid of the 300 W that each card pumps out on full load.

[Devon] decided to make a proper thermal solution by 3D printing a mount that carries three fans along with an air duct that snaps onto the GPU card. In order to prevent unnecessary fan noise, he added a thermal control system consisting of a Raspberry Pi Pico, a handful of MOSFETs, and a thermistor to sense the GPU’s temperature, so the fans are only driven when the card is getting hot. The Pi Pico is of course way more powerful than needed for such a simple task, but allowed [Devon] to program it in MicroPython, using more advanced programming techniques than would be possible on, say, an Arduino.

We love the elegant design of the fan duct, which enables two of these huge cards to fit onto a motherboard side-by-side. We’ve seen people working on the opposite problem of fitting large fans into small cases, as well as designs that discard the whole idea of using fans for cooling.

Continue reading “3D-printed Fan Mount Keeps Server GPU Cool In Desktop Case”