Phoniebox: A Family-Friendly Simple Music Box

Ever hear of the Phoniebox project? If not – tune in, that’s a hacker’s project your entire family will appreciate. Phoniebox is a software suite and tutorial for building a jukebox controlled through RFID cards, and it can play audio from a wide variety of sources – music and playlists stored locally, online streams like internet radio stations, Spotify, podcasts of your choice, and so on. It’s super easy to build – get a Raspberry Pi board, connect an NFC reader to it, wire up a pair of speakers, and you’re set. You can assemble a PhonieBox together with your kids over the weekend – and many do.

Want some inspiration, or looking to see what makes Phoniebox so popular? Visit the Phoniebox gallery – it’s endearing to see just how many different versions have been built over the six years of project’s existence. Everyone’s Phoniebox build is different in its own special way – you bring the hardware, Phoniebox brings well-tested software and heaps of inspiration.

You already have a case to house a  Phoniebox setup – if you think you don’t, check the gallery, you’ll find that you do. Experiencing a problem? There’s a wealth of troubleshooting advice and tutorials, and a helpful community. Phoniebox is a mature project and its scale is genuinely impressive – build one for your living room, or your hacker’s lair, or your hackerspace. RFID-controlled jukeboxes are a mainstay on Hackaday, so it’s cool to see a project that gives you all the tools to build one.

This Bluetooth GATT Course Is A Must Watch

Bluetooth is a backbone technology for innumerable off-the-shelf and hacker devices. You should know how to work with it – in particular, nowadays you will certainly be working at the Bluetooth GATT (Generic Attribute) layer. This two-part project by [V. Hunter Adams] of Cornell fame spares no detail in making sure you learn Bluetooth GATT for all your hacking needs – not only will you find everything you could want to know, you also get example GATT server and client application codebases to use in your projects, designed to work with the commonly available Pi Pico W!

What’s better than a visual demonstration? The video below shows the GATT server running on a Pico W – handling six different parameters at once. [Hunter] pokes at the server’s characteristics with a smartphone app – sending string data back and forth, switching an LED, and even changing parameters of audio or video color output by the Pico. Flash the server code into your Pico W, play with it, read through it, and follow the tutorial to learn what makes it tick.
Continue reading “This Bluetooth GATT Course Is A Must Watch”

3D Print A Stenciling Frame For Your PCB

For many a hacker, stenciling a board for the first time is a game-changing experience – the solder joints you get, sure do give your PCB the aura of a mass-manufactured device. Now, you might not get a perfect print – and neither did [Atul R]. Not to worry, because if you have a 3D printer handy, he’s showing you how to design a 3D-printed frame using Blender and TinkerCAD, making your solder paste print well even if you’re trying to rest a giant stencil on top of a tiny board.

[Atul]’s situation was non-characteristic – the project is a 2mm thick PCB designed to plug right into a USB port, so the usual trick of using some scrap PCBs wouldn’t work, and using a 3D-printed frame turned out to be key. To get it done, he exported a .wrl from KiCad, processed it in Blender, and then designed a frame with help of TinkerCAD. These techniques, no doubt, will translate into your CAD of choice – especially if you go with .step export instead of .wrl.

This kind of frame design will get you far, especially for boards where the more common techniques fail – say, if you need to assemble a double-sided board and one side is already populated. Don’t have a stencil? You could surely make a 3D printed stencil, too, both for KiCad boards and for random Gerber files. Oh, and don’t forget this 3D-printable stencil alignment jig, while you’re at it – looks like it ought to save you quite a bit of trouble.

Pi Zero Power Optimization Leaves No Stone Unturned

If you’ve ever designed a battery-powered device with a Pi Zero, you have no doubt looked into decreasing its power consumption. Generic advice, like disabling the HDMI interface and the onboard LED, is omnipresent, but [Manawyrm] from [Kittenlabs] goes beyond the surface-level, and gifts us an extensive write-up where every recommendation is backed with measurements. Armed with the Nordic Power Profiler kit and an SD card mux for quick experimentation, she aimed at two factors, boot time and power consumed while booting, and made sure to get all the debug information we could use.

Thanks to fast experimentation cycles and immediate feedback, we learn plenty of new things about what a Pi Zero does and when, and how we can tame various power-hungry aspects of its behavior. Disabling the GPU or its aspects like HDMI output, tweaking features like HAT and other peripheral probing, and even tactical overclocking during boot – it’s an extensive look at what makes a Pi Zero tick, and no chance for spreading baseless advice or myths.

All in all, this write-up helps you decrease the boot time from twelve seconds to just three seconds, and slash the power budget of the boot process by 80%. Some recommendations are as simple as config.txt entries, while others require you to recompile the kernel. No matter the amount of effort you can put into power optimization, you’ll certainly find things worth learning while following along, and [Manawyrm]’s effort in building her solar-powered Pi setup will help us all build better Pi-Zero-powered solar devices and handhelds.

Switching Regulators: Mistake Fixing For Dummies

Some time ago, while designing the PCB for the Sony Vaio replacement motherboard, I went on a quest to find a perfect 5 V boost regulator. Requirements are simple – output 5 V at about 2A , with input ranging from 3 V to 5 V, and when the input is 5 V, go into “100% duty” (“pass-through”/”bypass”) mode where the output is directly powered from the input, saving me from any conversion inefficiencies for USB port power when a charger is connected. Plus, a single EN pin, no digital configuration, small footprint, no BGA, no unsolicited services or offers – what more could one ask for.

As usual, I go to an online shop, set the parameters: single channel, all topologies that say “boost” in the name, output range, sort by price, download datasheets one by one and see what kind of nice chips I can find. Eventually, I found the holy grail chip for me, the MIC2876, originally from Micrel, now made by Microchip.

MIC2876 is a 5 V regulator with the exact features I describe above – to a T! It also comes with cool features, like a PG “Power good” output, bidirectional load disconnect (voltage applied to output won’t leak into input), EMI reduction and efficiency modes, and it’s decently cheap. I put it on the Sony Vaio board among five other regulators, ordered the board, assembled it, powered it up, and applied a positive logic level onto the regulator’s EN pin.

Immediately, I saw the regulator producing 3 V output accompanied by loud buzzing noise – as opposed to producing 5 V output without any audible noise. Here’s how the regulator ended up failing, how exactly I screwed up the design, and how I’m creating a mod board to fix it – so that the boards I meticulously assembled, don’t go to waste.

Some Background… Noise

Continue reading “Switching Regulators: Mistake Fixing For Dummies”

Where Do You Connect The Shield?

When it comes to polarizing and confusing questions in electronics, wiring up shields is on the top-10 list when sorted by popularity. It’s a question most of us need to figure out at some point – when you place a USB socket symbol on your schematic, where do you wire up the SHIELD and MP pins?

Once you look it up, you will find Eevblog forum threads with dozens of conflicting replies, Stackexchange posts with seven different responses plus a few downvoted ones, none of them accepted, and if you try to consult the literature, the answer will invariably be “it depends”.

I’m not a connector-ground expert, I just do a fair bit of both reading and hacking. Still, I’ve been trying to figure out this debate, for a couple years now, re-reading the forum posts each time I started a new schematic with a yet-unfamiliar connector. Now, of course, coming to this question with my own bias, here’s a summary you can fall back on.

Consumer Ports

Putting HDMI on your board? First of all, good luck. Then, consider – do you have a reason to avoid connecting the shield? If not, certainly connect the shield to ground, use jumpers if that’s what makes you comfortable, though there’s a good argument that you should just connect directly, too. The reason is simple: a fair few HDMI cables omit GND pin connections, fully relying on the shield for return currents. When your HDMI connection misfires, you don’t want to be debugging your HDMI transmitter settings when the actual No Signal problem, as unintuitive as it sounds, will be simply your shield not being grounded – like BeagleBone and Odroid didn’t in the early days. By the way, is a DVI-D to HDMI adapter not working for you? Well, it might just be that it’s built in a cheap way and doesn’t connect the shields of the two sockets together – which is fixable.

Continue reading “Where Do You Connect The Shield?”

PCB data sheet of a custom 4-bit microcontroller

Building A Microcontroller From Scratch: The B4 Thinker Project

[Marius Taciuc’s] latest endeavor, the B4 Thinker, offers a captivating glimpse into microcontroller architecture through a modular approach. This proof-of-concept project is meticulously documented, with a detailed, step-by-step guide to each component and its function.

Launched in 2014, the B4 Thinker project began with the ambitious goal of building a microcontroller from scratch. The resulting design features a modular CPU architecture, including a base motherboard that can be expanded with various functional modules, such as an 8-LED port card. This setup enables practical experimentation, such as writing simple assembly programs to control dynamic light patterns. Each instruction within this system requires four clock pulses to execute, and the modular design allows for ongoing development and troubleshooting.

Continue reading “Building A Microcontroller From Scratch: The B4 Thinker Project”