GrblHAL CNC Controller Based On RP2040 Pico

[Phil Barrett] designed a new CNC controller breakout board called the PicoCNC which uses the Raspberry Pi Pico RP2040 module and grblHAL. It packs a bunch of features typical of these controllers, and if you use the Pico W, you get WiFi connectivity along with USB. And if you don’t want connectivity, you can execute G-code directly from a micro SD card. The board is available in kit form, and schematics are posted on the GitHub repository above. Some of the features include four axes of motion, spindle control, limit switches, relay drivers, expansion headers, and opto-isolation.

This isn’t [Phil]’s first controller board. He also designed the grblHAL-based Teensy CNC controller breakout board, a step up from the usual Arduino-based modules at the time and boasting Ethernet support as well. According to the grblHAL site, nine different processors are now supported. There are well over a dozen CNC controller breakout boards listed as well. And don’t forget [bdring]’s 6-Pack grbl-ESP32 controller, a modular breakout board we covered a few years back. So pick your favorite board or roll your own and get moving.

Running DOOM In A Keycap Takes Careful Work

Shoehorning DOOM into different hardware is a classic hacker’s exercise, and [TheKeebProject] managed to squeeze the 1993 classic into a custom keycap with the help of a Raspberry Pi RP2040, a custom PCB, and a clear resin enclosure. It even has a speaker for sound!

All processing is done inside the keycap, which is a clever feat. There is a USB connection, but it’s only for power and keyboard controls, so it’s completely playable without needing a whole lot of external support. The custom PCB and code are based off an earlier RP2040 DOOM project, and [TheKeebProject] has certainly made it their own by managing to get everything so tightly integrated. There’s a quick video mashup embedded below. There’s still a bit of work to do, but the code and design files are all on GitHub should you wish for a closer look.

Making DOOM physically smaller is a good challenge, but we’d like to remind fans that we’ve also seen DOOM shrink in terms of power consumption, all the way down to 1 mW.

Continue reading “Running DOOM In A Keycap Takes Careful Work”

A Game Boy Camera, Without The Game Boy

We all know the Nintendo Game Boy camera peripheral, and we’ve seen plenty of hacks for it on these pages over the years. We like [Raphael Boichot]’s camera then, as instead of including a Game Boy or emulating one, it talks directly to the sensor from an RP2040. The result is a standalone camera with slightly better quality than the original, and with near-limitless storage and easy retrieval of pictures.

For us the interesting revelation from this project comes in the light it sheds on the sensor module, the Mitsubishi M64282FP, but it’s no slouch as a camera beside that. There are motion sensor and timelapse modes, as well the ability to take high dynamic range pictures, and as if that’s not enough it also has all the tweakable things you’d expect from a “proper” camera. The oldest adage in photography is that the best camera in the world is the one in your hand, and we’d say that this one’s better than a real Game Boy Camera should the once-in-a-lifetime picture come while you’re holding it.

Of course, a better Game Boy camera needs a better lens, right?

A PCB with an OLED display, a screw terminal block and a Raspberry Pi Zero board

Hackaday Prize 2023: Pi Pico Measures Volts, Amps And Watts

Measuring a voltage is pretty easy: just place your multimeter’s probes across the relevant pins and read the value. Probing currents is a bit trickier, since you need to open up the circuit and place your probes in series. Checking a circuit’s power consumption is the hardest, since you need to measure both voltage and current as well as multiply them at each moment in time. Fed up with having to hook up two multimeters and running a bunch of synchronized measurements, [Per-Simon Saal] built himself an automatic digital power meter.

The heart of this instrument is an INA219 chip, which can measure and digitize voltage and current simultaneously. It outputs the results through an I2C bus, which [Per-Simon] hooked up to a miniaturized version of the Raspberry Pi Pico called an RP2040-Zero. A screw terminal block is provided to connect the system to the device under test, while a 0.96″ OLED display shows the measured voltage, current and power.

A small OLED display showing voltage, current and power measurementsThe maximum voltage that can be measured is 26 V, while the current range is determined by the shunt resistor mounted on the board. The default shunt is 0.1 Ω, resulting in a 3.2 A maximum current range, but you can get pretty much any range you want by simply mounting a different resistor and changing the software configuration. In addition to displaying the instantaneous values, the power meter can also keep a log of its measurements – very useful for debugging circuits that use more energy than expected or for measuring things like the capacity of a battery.

There are lots of ways to measure electric power, but they all boil down to multiplying current and voltage in some way. The multiplication was done magnetically in the old days, but modern meters like [Per-Simon]’s of course use digital systems. Some can even plug directly into a USB port. If you want to measure mains power, transformers are an essential component for safety reasons.

PicoDebugger Makes Development Easier

Debugging a Raspberry Pi Pico is straightforward enough; it simply involves hooking up something up to the USB and SWD pins. [Mark Stevens] whipped up the PicoDebugger to make this job easier than ever before.

The Raspberry Pi Foundation developed the Picoprobe system to allow a RP2040 to act as a USB to SWD and UART bridge for debugging another Pico or RP2040. The problem is that hooking it up time and time again can be fussy and frustrating.

To get around this, [Mark] whipped up the PicoDebugger board, which directly connects most of the important pins for you. Drop a Pico into the “Target” slot, and you can hook up the PicoDebugger to its UART lines with the flick of a DIP switch. The SWD pins can then also be connected via jumpers if so desired.  It also features a 2×20-pin header to allow the target to be wired into other hardware as necessary.

It’s a neat project, and it certainly beats running a bird’s nest of jumper wires every time you want to debug a Pico project. Simply dropping a board in is much more desirable.

We’ve seen some other neat debug tools over the years, too. If you’ve got your own development productivity hacks in the works, don’t hesitate to let us know!

A Pico-Based ZX Spectrum Emulator

The ZX Spectrum was a popular computer of the 8-bit era. Now, it’s possible to emulate this machine on a microcontroller so cheap that it’s literally been given away on the front cover of magazines. Yes, we’re talking about the Pico ZX Spectrum project.

The project consists of all the necessary code to emulate a ZX Spectrum upon the hardware of the RP2040 microcontroller that makes up the Raspberry Pi Pico. The community has then taken this code and run with it, using it as the basis for all manner of different ZX Spectrum builds. If so desired, you can go barebones and use the Pico to run a ZX Spectrum off a breadboard with HDMI video output. Alternatively, you can build something like the PicoZX from [Bobricius]. The handheld computer features a PCB-based housing, along with an LCD and an integrated keyboard. Other configurations support features like USB keyboards, VGA outputs, and working sound output.

It’s great to see a classic 8-bit computer reimagined in all kinds of new tribute form factors. The Spectrum was always beloved for its neat all-in-one design, and there are several modern remixes that riff on that theme. The fact that they can all be powered by a cheap single-board microcontroller is all the more astounding. Video after the break.

Continue reading “A Pico-Based ZX Spectrum Emulator”

A black work mat holds a circular badge with 64 addressable LEDs in a spiraling shape akin to the center of a sunflower. The LEDs have a rotating rainbow spiraling around the circle with red touching violet on one end. The colors extend in bands from the center to the rim of the circle.

Math You Can Wear: Fibonacci Spiral LED Badge

Fibonacci numbers are seen in the natural structures of various plants, such as the florets in sunflower heads, areoles on cacti stems, and scales in pine cones. [HackerBox] has developed a Fibonacci Spiral LED Badge to bring this natural phenomenon to your electronics.

To position each of the 64 addressable LEDs within the PCB layout, [HackerBox] computed the polar (r,θ) coordinates in a spreadsheet according to the Vogel model and then converted them to rectangular (x,y) coordinates. A little more math translates the points “off origin” into the center of the PCB space and scale them out to keep the first two 5 mm LEDs from overlapping. Finally, the LED coordinates were pasted into the KiCad PCB design file.

An RP2040 microcontroller controls the show, and a switch on the badge selects power between USB and three AA batteries and a DC/DC boost converter. The PCB also features two capacitive touch pads. [HackerBox] has published the KiCad files for the badge, and the CircuitPython firmware is shared with the project. If C/C++ is more your preference, the RP2040 MCU can also be programmed using the Arduino IDE.

For more details on beautiful RGB lights, we’ve previously presented Everything You Might Have Missed About Addressable LEDs, and for more details on why they can be so fun to wear, check out our Hackaday Badgelife Documentary.

(Editor’s note: HackerBox makes and sells kits, is run by Hackaday Contributor [Joseph Long] IRL.)

Continue reading “Math You Can Wear: Fibonacci Spiral LED Badge”