Interfacing A Z80 CPU With The Raspberry Pi

The Z80 was a big deal in the 1970s and 1980s, and while its no longer a dominant architecture today, its legacy lives on. [James Andrew Fitzjohn] is a fan of the Z, and decided to interface the real silicon with the Raspberry Pi, by and large for the fun of it!

The Z80’s address and data lines, as well as the clock, are hooked up to the Raspberry Pi through several MCP23017 GPIO expanders. The Pi’s GPIO lines aren’t known for their speed, of course, and using expanders through I2C isn’t exactly quick either. However, speed isn’t necessary, as the clock only goes as fast as the Raspberry Pi desires, since it’s controlling the clock along with everything else. There’s also an LCD for viewing the Z80s status, along with some era-appropriate blinkenlights.

This setup allows the Pi to run code directly on the Z80 itself, while managing the CPU’s RAM in its own memory, all through a Python script. It’s a fun hack that lets you run retro code on retro silicon without using an emulator. Techniques like these are useful for finding undocumented or edge case performance of a processor. If this hack isn’t enough Zilog for your liking, consider throwing one in your pocket as well!

Raspberry Pi Takes Over Volvo’s Integrated LCD

As [Luuk Esselbrugge] explains in a recent blog post, his 2002 Volvo S60 had an optional GPS navigation system and backup camera that used a motorized display that would rise out of the dashboard when needed. His particular car didn’t come with the hardware installed, but after getting his hands on a display module and doing some research, he figured out how he could drive it with the Raspberry Pi and a couple of microcontrollers.

Given the age of the display, you probably won’t be surprised to hear that it uses composite video. Not exactly high resolution, but in the demonstration after the break, we have to admit it looks more than up to the task. [Luuk] is running Android Auto on the Raspberry Pi 3 through the openauto project, which gives him a nice big display and access to all the navigation and media applications you’d expect. The display doesn’t support touch, but thanks to an ESP32 plugged into the CAN bus, he’s able to control the software by reading the buttons built into the Volvo’s steering wheel.

Composite video sources are switched with a simple relay.

To actually raise and lower the display, [Luuk] found you just need to fire a few bytes down the 1,200 baud serial bus that’s built into the display’s wiring harness. The ESP32 handles this duty as well, at least partly because it’s already plugged into the CAN bus and can tell when the vehicle is in reverse. This lets it bring up the screen to show the video feed from the newly installed backup camera in the event that the Pi hadn’t already asked to raise the display. Incidentally plugging in the phone normally triggers the system to wake up and raise the screen, and disconnecting it will command the screen to lower back into the stowed position.

The attentive reader or Volvo aficionado may be wondering how [Luuk] got the audio working. Since his car’s sound system doesn’t feature an auxiliary input, he’s using an Arduino to spoof the existence of a CD changer, which allows him to inject an audio signal into one of the pins on the back of the radio. Eventually he wants to move this task over to the ESP32, but he says a big change like that will have to wait until warmer weather.

This isn’t the first time we’ve seen the Raspberry Pi used to add enhanced features to a somewhat older vehicle. While some bemoan the increased complexity of modern vehicles, it seems some hackers can’t get enough of it.

Continue reading “Raspberry Pi Takes Over Volvo’s Integrated LCD”

A Look At The Interesting RP2040 Peripheral, Those PIOs

The Raspberry Pi Pico is the latest product in the Raspberry Pi range, and it marks a departure from their previous small Linux-capable boards. The little microcontroller board will surely do well in the Pi Foundation’s core markets, but its RP2040 chip must have something special as a commercial component to avoid being simply another take on an ARM microcontroller that happens to be a bit more expensive and from an unproven manufacturer in the world of chips. Perhaps that special something comes in its on-board Programable IO perhipherals, or PIOs. [CNX Software] have taken an in-depth look at them, which makes for interesting reading.

Continue reading “A Look At The Interesting RP2040 Peripheral, Those PIOs”

Raspberry Pi Zero Powers Spotify Streaming IPod

Even those critical of Apple as a company have to admit that they were really onto something with the iPod. The click wheel was a brilliant input device, and the simplicity of the gadget’s user interface made it easy to get to the music you wanted with a minimum of hoop jumping. Unfortunately it was a harbinger of proprietary software and DRM, but eventually there were a few open source libraries that let you put songs on the thing without selling your soul to Cupertino.

Of course, modern users expect a bit more than what the old hardware can deliver. Which is why [Guy Dupont] swapped the internals of his iPod Classic with a Raspberry Pi Zero W. This new Linux-powered digital audio player is not only capable of playing essentially any audio format you throw at it, but can also tap into streaming services such as Spotify. But such greatness doesn’t come easy; to pull this off, he had to replace nearly every component inside the player with the notable exception of the click wheel itself. Good thing the Classics were pretty chunky to begin with.

In addition to the Pi Zero running the show, he also had to fit a 1000 mAh battery, its associated charging and boost modules, a vibration motor for force feedback, and a 2″ LCD from Adafruit. The display ended up being almost the perfect size to replace the iPod’s original screen, and since it uses composite video, only took two wires to drive from the Pi. To interface with the original click wheel, [Guy] credits the information he pulled from a decade-old Hackaday post.

Of course with a project like this, the hardware is only half the story. It’s one thing to cram all the necessary components inside the original iPod enclosure, but by creating such an accurate clone of its iconic UI in Python, [Guy] really took things to the next level. Especially since he was able to so seamlessly integrate support for Spotify, a feature the Apple devs could scarcely have imagined back at the turn of the millennium. We’re very interested in seeing the source code when he pushes it to the currently empty GitHub repository, and wouldn’t be surprised if it set off a resurgence of DIY iPod clones.

We’ve seen modern hardware grafted onto the original iPod mainboard, and over the years a few hackers have tried to spin up their own Pi-based portable music players. But this project that so skillfully combines both concepts really raises the bar.

Continue reading “Raspberry Pi Zero Powers Spotify Streaming IPod”

Repairing 200+ Raspberry Pis For A Good Cause

If somebody told you they recently purchased over 200 Raspberry Pis, you might think they were working on some kind of large-scale clustering project. But in this case, [James Dawson] purchased the collection of broken single-board computers with the intention of repairing them so they could be sent to developing countries for use in schools. It sounds like the logistics of that are proving to be a bit tricky, but we’re happy to report he’s at least made good progress on getting the Pis back up and running.

He secured this trove of what he believes to be customer returned Raspberries or the princely sum of £61 ($83 USD). At that price, even if only a fraction ended up being repairable, you’d still come out ahead. Granted all of these appear to be the original Model B, but that’s still a phenomenal deal in our book. Assuming of course you can find some reasonable way to triage them to sort out what’s worth keeping.

To that end, [James] came up with a Bash script that allowed him to check several hardware components including the USB, Ethernet, I2C, and GPIO. With the script on an SD card and a 3.5″ TFT plugged into the Pi’s header for output, he was able to quickly go through the box to get an idea of what sort of trouble he’d gotten himself into. He was only about half way through the process when he wrote this particular blog post, but by that point, he’d found just 40 Pis which wouldn’t start at all. He suspects these might be victims of some common issue in the power circuitry that he’ll investigate at a later date.

The majority of Pis he checked were suffering from nothing worse than some bent GPIO pins or broken SD card slots. Some of the more abused examples had their USB ports ripped off entirely, but were otherwise fine. Another 10 had dead Ethernet, and 4 appear to have damaged traces leading to their HDMI ports. While we’re interested in hearing if [James] can get those 40 dark Pis to fire back up, so far the results are quite promising.

Donating hardware is always a tricky thing, so for now [James] says he’ll be selling the repaired Pis on eBay and donating the proceeds to the Raspberry Pi Foundation so they can continue to develop hardware that will (potentially) accomplish their goal of giving students all over the world a functional computer.

Third Time’s The Charm For This Capable Cyberdeck

For those who decide to build their own personal cyberdeck, it’s often as much about the journey as it is the final product. The recent write-up that [Sophie Wheeler] put together about the process that lead her to build her own bespoke mobile computer is a perfect example. She went through three distinct design phases to create something that had what she describes as a “retro-futuristic, hand-built, utilitarian aesthetic”, and we think you’ll agree the final product is right on target.

At Hackaday, we’re strong believers that you can learn just as much from a failed attempt as you will from a rousing success, which is why we especially appreciate the way [Sophie] has documented this project. The basic layout and general bill of materials for his hypothetical cyberdeck had been sorted out in her head for about a year, but it took a few attempts until everything came together in a way she was happy with. Rather than pretend those early missteps never happened, she’s decided to present each one and explain why it didn’t quite work out.

This laser-cut acrylic design was difficult to assemble.

Frankly both earlier attempts look pretty slick to us, but of course the only person who’s opinion really counts when it comes to a good cyberdeck is the one who’s building it. The original acrylic design was a bit too fiddly, and while the first attempt at 3D printing the computer’s frame and enclosure went much better, it still left something to be desired.

The final result is a clean and straightforward design that has plenty of room inside for a Raspberry Pi 4, UPSPack V3 power management board, 10,000 mAh battery, internal USB hub, and a AK33 mechanical keyboard. Topside there’s a 7” 1024×600 IPS LCD with touch overlay that’s naturally been offset in the traditional cyberdeck style, and on the right side of the enclosure there’s a bay that holds a KKMoon RTL-SDR. Though that could certainly be swapped out for something else should you decide to print out your own version of this Creative Commons licensed design.

In our 2020 review we noted the incredible influx of cyberdeck builds we’d seen over the last 12 months, and judging by just what we’ve seen in just these last few weeks, 2021 should be another bumper year for these unique computers.

Raspberry Pi Enters Microcontroller Game With $4 Pico

Raspberry Pi was synonymous with single-board Linux computers. No longer. The $4 Raspberry Pi Pico board is their attempt to break into the crowded microcontroller module market.

The microcontroller in question, the RP2040, is also Raspberry Pi’s first foray into custom silicon, and it’s got a dual-core Cortex M0+ with luxurious amounts of SRAM and some very interesting custom I/O peripheral hardware that will likely mean that you never have to bit-bang again. But a bare microcontroller is no fun without a dev board, and the Raspberry Pi Pico adds 2 MB of flash, USB connectivity, and nice power management.

As with the Raspberry Pi Linux machines, the emphasis is on getting you up and running quickly, and there is copious documentation: from “Getting Started” type guides for both the C/C++ and MicroPython SDKs with code examples, to serious datasheets for the Pico and the RP2040 itself, to hardware design notes and KiCAD breakout boards, and even the contents of the on-board Boot ROM. The Pico seems designed to make a friendly introduction to microcontrollers using MicroPython, but there’s enough guidance available for you to go as deep down the rabbit hole as you’d like.

Our quick take: the RP2040 is a very well thought-out microcontroller, with myriad nice design touches throughout, enough power to get most jobs done, and an innovative and very hacker-friendly software-defined hardware I/O peripheral. It’s backed by good documentation and many working examples, and at the end of the day it runs a pair of familiar ARM MO+ CPU cores. If this hits the shelves at the proposed $4 price, we can see it becoming the go-to board for many projects that don’t require wireless connectivity.

But you want more detail, right? Read on.

Continue reading “Raspberry Pi Enters Microcontroller Game With $4 Pico”