Bridging The PC And Embedded Worlds With Pico And Python

Although protocols like I2C and SPI are great for communicating between embedded devices and their peripherals, it can be a pain to interface these low-level digital interfaces to a PC. [Alexandre] typically used an Arduino to bridge between the PC and embedded worlds, but he got tired of defining a custom serial protocol for each project. Inspired by MicroPython’s machine module, [Alexandre] has developed u2if—an implementation of some of MicroPython’s machine module for PC—using a USB-connected Raspberry Pi Pico to bridge between a PC and low-level digital interfaces.

u2if consists of two parts: the PC portion is a Python implementation of a portion of the MicroPython machine module, and the Raspberry Pi Pico receives some custom C++ firmware. Thus far, [Alexandre] has implemented functionality for the onboard ADCs, I2C, SPI, UART, and GPIO lines as well as additional support for I2S sound and the WS2812B addressable LED.

Development board for Raspberry Pi Pico.

In addition to the u2if package, [Alexandre] has designed a PCB to break out all of the Raspberry Pi Pico’s interfaces in a handy 3×3.9″ board. We especially like that multiple headers are supplied for I2C, including one with enough space to mount an SSD1306 OLED display.

We think this could be an incredibly useful tool, and what makes it even more impressive is that it uses a board many of us already have laying around. If you want a dedicated device for interfacing with low-level digital buses, you may want to check out the GreatFET.

Tightly Packed Raspberry Pi Tricorder Impresses

We’ll say upfront that we don’t have nearly as much information about this 3D printed Star Trek: The Next Generation tricorder as we’d like. But from the image galleries [Himmelen] has posted we know it’s running on the Raspberry Pi Zero W, has a color LCD in addition to a monochrome OLED, and that it’s absolutely packed with gear.

So far, [Himmelen] has fit an NESDR RTL-SDR dongle, a GPS receiver, an accelerometer, and the battery charging circuitry in the top half of the case. Calling it a tight fit would be something of an understatement, especially when you take into account all the wires snaking around in there. But as mentioned in the Reddit thread about the device, a custom PCB backplane of sorts is in the works so all these modules will have something a little neater to plug into.

There are a lot of fantastic little details in this build that have us very excited to see it cross the finish line. The female USB port that’s been embedded into the top of the device is a nice touch, as it will make it easy to add storage or additional hardware in the field. We also love the keyboard, made up of 30 individual tact switches with 3D printed caps. It’s hard to imagine what actually typing on such an input device would be like, but even if each button just fired off its own program or function, we’d be happy.

Judging by the fact that the LCD shows the Pi sitting at a login prompt in all the images, we’re going to go out on a limb and assume [Himmelen] hasn’t gotten to writing much software for this little gadget yet. Once the hardware is done and it’s time to start pushing pixels though, something like Pygame could be used to make short work of a LCARS-style user interface that would fit the visual style of The Next Generation. In fact, off the top of our heads we can think of a few turn-key projects out there designed for creating Trek UIs, though the relatively limited computational power of the Pi Zero might be a problem.

We’ve seen several projects that tried to turn the iconic tricorder into a functional device. Some have focused on the arguably more recognizable Next Generation style such as this one, and others have targeted the more forgiving brick-shaped unit from Kirk and Spock’s era. The Wand Company is even working on a officially licensed tricorder that will supposedly be as close to we can get to the real thing with modern tech and a $250 USD price tag, though we’d wager COVID has slowed progress down on that one. In any event, whether you build it or buy it, the tricorder seems destined to become reality before too long.

A Lot Of Effort For A Pi Laptop

Building a Raspberry Pi laptop is not that uncommon. In fact, just a few clicks from any of the major electronics suppliers will have the parts needed for such a project speeding on their way to your house in no time at all. But [joekutz] holds the uncontroversial belief that the value in these parts has somewhat diminishing returns, so he struck out to build his own Pi laptop with a €4 DVD player screen and a whole lot of circuit wizardry to make his parts bin laptop work.

The major hurdle that he needed to overcome was how to power both the display and the Pi with the two small battery banks he had on hand. Getting 5V for the Pi was easy enough, but the display requires 8V so he added one lithium ion battery in series (with its own fuse) in order to reach the required voltage. This does make charging slightly difficult but he also has a unique four-pole break-before-make switch on hand which doesn’t exactly simplify things, but it does make the project function without the risk of short-circuiting any of the batteries he used.

The project also makes use of an interesting custom circuit which provides low voltage protection for that one lonely lithium battery as well. All in all it’s a master course in using some quality circuit-building skills and electrical theory to make do with on-hand parts (and some 3D printing) rather than simply buying one’s way out of a problem. And the end result is something that’s great for anything from watching movies to playing some retro games.

Continue reading “A Lot Of Effort For A Pi Laptop”

An RP2040 Board Designed For Machine Learning

Machine learning (ML) typically conjures up ideas of fancy code requiring oodles of storage and tons of processing power. However, there are some ML models that, once trained, can readily be run on much more spartan hardware – even a microcontroller! The RP2040, star of the Raspberry Pi Pico, is one such chip up to the task, and [Arducam] have announced a board aiming to employ it to those ends – the Pico4ML.

The board goes heavy on the hardware, equipping the RP2040 with plenty of tools useful for machine learning tasks. There’s a QVGA camera on board, as well as a tiny 0.96″ TFT display. The camera feed can even be streamed live to the screen if so desired. There’s also a microphone to capture audio and an IMU, already baked into the board. This puts object, speech, and gesture recognition well within the purview of the Pico4ML.

Running ML models on a board like the Pico4ML isn’t about robust high performance situations. Instead, it’s intended for applications where low power and portability are key. If you’ve got some ideas on what the Pico4ML could do and do well, sound off in the comments. We’d probably hook it up to a network so we could have it automatically place an order when we yell out for pizza. We’ve covered machine learning on microcontrollers before, too – with a great Remoticon talk on how to get started!

Camera Zero Looks Cool, Runs Cool

Security cameras are a commodity item these days, but that doesn’t mean [edgett’s] design using a Pi Zero, an Arducam, an LED ring, and active cooling isn’t worth a look. This is a great example of how integrating some off-the-shelf modules and 3D printing can create very professional-looking results. There’s also a trackball interface so you can control the camera. The software, written in Python, is available on GitHub.

The trackball doesn’t move the camera, but it does manage a menu system that lets you capture a photo or video, set the optical parameters like exposure, shutter, and ISO, and launch Camera Remote to offer a Web-based interface instead of the trackball.

If you add infrared illumination, you can swap out the camera for an IR version and have a nice-looking night vision camera, too. The camera is reasonably compact. Not including the lens and the tripod, the camera measures 100 by 44 by 44 mm. So under two inches square and about 4 inches long.

We worried a little about gluing the LED ring down, but then again our phones are all glued together these days, so maybe we should stop fretting. One thing we didn’t see on either site, though, was a picture taken with the camera itself. However, the 12-megapixel camera and quality lens should do a great job. We’ve even seen that particular camera module work with a much smaller computer recently.

Is It A Lawnmower? Is It An RPi IRC Server? It’s Both!

Although first presented to the world as an April 1st joke, [Jotun]’s IRC-enabled lawnmower began life as the result of casual bantering among folk on the Undernet IRC network. When the project worked out better than probably anyone could have expected, it was presented as the Green Future of Undernet on April 1st. Joking aside, the project actually is pretty interesting and well-executed.

At the core is a Remington RM110, a fairly basic gas-powered push lawnmower. After years of use it wasn’t running so well any more, so [Jotun] took it apart and cleaned the engine, despite never having done so before. With that grimy task completed, a subsequent remark in an Undernet channel about linking the lawnmower to Undernet led to a Raspberry Pi 4 and various other components being ordered.

The view from the driver’s seat with the server box installed.

The write-up by [Jotun] provides a pretty good overview of the project’s history: from getting the Raspberry Pi 4 working with a UPS add-on, to getting the IRC server software working and serving clients, and putting a weather- and dust-proof box together with enough filtered ventilation to ensure that the freshly mowed grass doesn’t clog up the Raspberry Pi while keeping everything cool.

As a bonus, the system tracks the wheel revolutions so that [Jotun] can keep track of the square kilometers of grass he has cut, and reports this with an IRC bot to anyone interested on Undernet, in the channel #lawnmower. The only thing that isn’t working well yet so far is the live camera feed from the lawnmower, due to the obvious vibration issues, but [Jotun] reckons that can be solved in time.

 

Compute Module 4 NAS With Custom Carrier Board

At this point, we’ve seen more Raspberry Pi Network Attached Storage (NAS) builds than we can possibly count. The platform was never a particularly ideal choice for this task due to the fact it could only connect to drives over USB, but it was cheap and easy to work with, so folks made the best of it. But that all changed once the Compute Module 4 introduced PCIe support to the Raspberry Pi ecosystem.

If this impressive NAS built by [mebs] represents the shape of things to come, we’re more than a little excited. On the outside, with its 3D printed case and integrated OLED display to show system status, it might look like plenty of builds that came before it. But pop the top of this cyberpunk-styled server, and you realize just how much work went into it.

At the heart of this NAS is a purpose-built carrier board that [mebs] designed based on the KiCad files the Raspberry Pi Foundation released for their official CM4 IO Board. While not much larger than the CM4 itself, the NAS board breaks out the board’s PCIe, Ethernet, HDMI, and USB. There’s also a header for I2C, used primarily for the OLED display but naturally expandable to additional sensors or devices, and nine GPIO pins for good measure.

Of course, that alone doesn’t make a NAS. Into that PCIe port goes a four channel SATA controller card, which in turn is connected to the hard disk drives that are nestled into their respective nodes of the printed case. A central fan blows over the electronics at the core, and thanks to clever design and a few cardboard seals, pulls air over the drives by way of intake vents printed into the sides.

As impressive as this build is, not everyone will need this level of performance. If you don’t mind being limited to USB speeds, you can 3D print a NAS enclosure for the standard Raspberry Pi. Or you could always repurpose an old PC case if you’d like something a bit more substantial.