A black motion system with two stepper motors. A green circuit board is fixed in a rotating cage in the center, and the entire assembly is on a white base atop a green cutting mat. Wires wind through the assembly.

Pi-lomar Puts An Observatory In Your Hands

Humans have loved looking up at the night sky for time immemorial, and that hasn’t stopped today. [MattHh] has taken this love to the next level with the Pi-lomar Miniature Observatory.

Built with a Raspberry Pi 4, a RPi Hi Quality camera, and a Pimoroni Tiny2040, this tiny observatory does a solid job of letting you observe the night sky from the comfort of your sofa (some assembly required). The current version of Pi-lomar uses a 16mm ‘telephoto’ lens and the built-in camera libraries from Raspbian Buster. This gives a field of view of approximately 21 degrees of the sky.

While small for an observatory, there are still 4 spools of 3D printing filament in the five different assemblies: the Foundation, the Platform, the Tower, the Gearboxes and the Dome. Two NEMA 17 motors are directed by the Tiny2040 to keep the motion smoother than if the RPi 4 was running them directly. The observatory isn’t waterproof, so if you make your own, don’t leave it out in the rain.

If you’re curious how we might combat the growing spectre of light pollution to better our nighttime observations, check out how blinking can help. And if you want to build a (much) larger telescope, how about using the Sun as a gravitational lens?

Continue reading “Pi-lomar Puts An Observatory In Your Hands”

The Birdy44 Keyboard Is Something To Crow About

The funny thing about keyboard end game is that it usually involves more than one keyboard. Rare is the board that is great for both home and away. Having finished their dactyl build, [RalphCoder13] was looking to build something slimmer and more portable, and the Birdy44 was born.

This hand-wired beauty uses a pair of Waveshare RP2040 Zeros and features a pair of 40mm Cirque track pads that were salvaged from a Steam controller.

As you may have guessed, there are 44 Kailh Chocs that sit underneath a combination of MBK and 3D-printed keycaps. Our favorite part might be the tenting legs, which are optional and connect magnetically.

Part of portability is how you decide to carry the thing. You probably don’t want it naked and loose in your backpack if you can avoid it, right? To that end, he designed a nice little case for the halves. The original plan was to use magnets to hold them in place inside the topless case, but that didn’t work out so well, so he added wide elastic bands to stretch around the case.

Is this still not portable enough for you? Check out this folding split keyboard.

Via KBD

2023 Halloween Hackfest: Candy Basket Sees You Coming

On Halloween, some people can’t or don’t want to open the door for various reasons. Maybe they have a cat that likes to escape every chance it gets, or maybe their favorite TV show is on during prime trick-or-treating time. Whatever the case, we think it’s perfectly acceptable to leave a bowl of candy outside the door, especially if there are electronics involved.

In this case, the bowl detects trick-or-treaters and candy eaters using an LD2410 60 GHz radar sensor and an RP2040. A light pipe shows orange when a person is detected, and switches over to green as they come closer, as if to say you may have candy now.

Nothing happens after that, but now that we think about it, it would be cool to add an MP3 decoder and a speaker to play a little witch cackle or something once they’ve had a chance to stick their hand in the bucket.

[Mike Kushnerik] actually designed the PCB a few months ago for non-Halloween purposes: some home automation projects. But then they were trying to think of something for Halloween, and this delightful light-up bucket came to mind. In addition to the RP2040 chip, there’s a 128 MB flash chip, a WS2812 LED, and a header for communicating with the radar sensor over UART. Be sure to check out the brief demo video after the break.

If you’d like to stand outside and give out candy, at least send it down a light-up slide or something.

Continue reading “2023 Halloween Hackfest: Candy Basket Sees You Coming”

Close To The Metal

Firmware is caught between hardware and software. What do I mean? Microcontroller designers compete on how many interesting and useful hardware peripherals they can add to the chips, and they are all different on purpose. Meanwhile, software designers want to abstract away from the intricacies and idiosyncrasies of the hardware peripherals, because code wants to be generic and portable. Software and hardware designers are Montagues and Capulets, and we’re caught in the crossfire.

I’m in the middle of a design that takes advantage of perhaps one of the most idiosyncratic microcontroller peripherals out there – the RP2040’s PIOs. Combining these with the chip’s direct memory access (DMA) controllers allows some fairly high-bandwidth processing, without bogging down the CPUs. But because I want this code to be usable and extensible by a wide audience, I’m also trying to write it in MicroPython. And configuring DMA controllers is just too idiosyncratic for MicroPython.

But there’s an escape hatch. In my case, it’s courtesy of the machine.mem32 function, which lets you read and write directly into the chip’s memory, including all of the memory-mapped configuration registers. Sure, it’s absurdly low-level, but it means that anything you read about in the chip’s datasheet, you can do right away, and from within the relative comfort of a Micropython program. Other languages have their PEEK and POKE equivalents as well, or allow inline assembler, or otherwise furnish you the tools to get closer to the metal without having to write all the rest of your code low level.

I’m honestly usually a straight-C or even Forth programmer, but this experience of using a higher-level language and simultaneously being able to dive down to the lowest levels of bit-twiddling at the same time has been a revelation. If you’re just using Micropython, open up your chip’s datasheet and see what it can offer you. Or if you’re programming at the configure-this-register level, check out the extra benefits you can get from a higher-level language. You can have your cake and eat it too!

How Not To Build An RP2040 Board

We love that these days you can buy ready-made microcontroller boards that are very capable. But sometimes you need to — or just want to — do it yourself. Unfortunately, you really should design everything twice: once to figure out where all the problems are, and the second time to do it better. If you want to create your own board for the RP2040 then you are in luck. [Jeremy] has made the first (and second) iteration or an RP2040 board and shares with us what he would not do again.

In all fairness, he also has a blog post talking about what he did, so you might want to start there. However, we think his most valuable advice was his final word: Don’t fail to get started on your design. The longest journey, after all, begins with the first step.

His other advice is good, too. For example, don’t plug your new board into a computer because an error in the power supply could take the whole computer out. He also warns you not to do like he did and forget to order the $10 solder stencil with the PCBs.

Some of it is just good advice in general. For example — buy more small components than you think you need. There’s nothing worse than needing three resistors, having three resistors, and then watching one of the three fly across the room or stick to your soldering iron and melt into a pool of slag. Buy ten and you’ll save money in the long run.

In the end, the board did work and what he learned might help you if you decide to tackle a similar project yourself. [Jeremy’s] board is fairly large, but if you have an appetite for something smaller, check out the RPDot or the RP2040 Stamp.

RP2040 picture on left by Phiarc, CC BY-SA 4.0, via Wikimedia

Kaluma Puts JavaScript On The RP2040

With a simple firmware update, Kaluma puts a lightweight JavaScript runtime on the Raspberry Pi Pico (which uses the RP2040 microcontroller), providing handy modules for file systems, graphics, networking, and more. Code for a simple LED blink can then look like:

// index.js
const led = 25;
pinMode(led, OUTPUT);
setInterval(() => {
digitalToggle(led);
}, 1000);

Development can then be done using tools that are very familiar to JavaScript developers, such as npm and flashing new code to a USB-connected Pico with the (Node.js-based) Kaluma command-line interface. Take a look at the GitHub repository for the project, or browse some of the projects made with Kaluma.

Much like with MicroPython, there’s value to be had in putting implementations of high-level languages on microcontrollers. Each new language opens embedded programming to a whole new group of coders. But it’s not just languages making their way to the RP2040. Wonderful projects such as emulating the ZX Spectrum on an RP2040 also happen.

Thanks to [Shri Hari Ram] for the tip!

Dead E. Ruxpin Appears Alive And Well

What are you doing to scare trick-or-treaters this Halloween? Surely something, right? Well, Hackaday alum [CameronCoward] certainly has his holiday under control with Dead E. Ruxpin, a murderous, cassette tape-controlled animatronic bear.

Readers of a certain vintage will no doubt see the correlation to Teddy Ruxpin, an animatronic bear from the 1980s whose mouth moved as it read stories from cassette tapes. Cleverly, the engineers used one stereo channel for the story’s audio, and the other channel to control the bear’s mouth.

Dead E. Ruxpin takes this idea and expands it, using the same two channels to send audio and control three servo motors that move both arms and the mouth. How is this possible? By sending tones built from one or more frequencies.

Essentially, [Cameron] assigned a frequency to each movement: mouth open/closed, and left and/or right arm up or down. These are all, of course, synced up with specific points in the audio so Dead E. doesn’t just move randomly, he dances along with the music.

The bear is actually a hand puppet, which leaves room for a 3D-printed skeleton that holds the RP2040 and the servos and of course, moves the puppet’s parts. We can’t decide if we prefer the bulging bloodshot eyes, or think the cutesy original eyes would have made a scarier bear. Anyway, check out the build/demo video after the break to see it in action.

Are you now into Teddy Ruxpin? Here’s a bit more about those scare bears. And don’t forget, Halloween Hackfest runs now until October 31st.

Continue reading “Dead E. Ruxpin Appears Alive And Well”