Adventures In Overclocking: Which Raspberry Pi 4 Flavor Is Fastest?

There are three different versions of the Raspberry Pi 4 out on the market right now: the “normal” Pi 4 Model B, the Compute Module 4, and the just-released Raspberry Pi 400 computer-in-a-keyboard. They’re all riffing on the same tune, but there are enough differences among them that you might be richer for the choice.

The Pi 4B is easiest to integrate into projects, the CM4 is easiest to break out all the system’s features if you’re designing your own PCB, and the Pi 400 is seemingly aimed at the consumer market, but it has a dark secret: it’s an overclocking monster capable of running full-out at 2.15 GHz indefinitely in its stock configuration.

In retrospect, there were hints dropped everywhere. The system-on-a-chip that runs the show on the Model B is a Broadcom 2711ZPKFSB06B0T, while the SOC on the CM4 and Pi 400 is a 2711ZPKFSB06C0T. If you squint just right, you can make out the revision change from “B” to “C”. And in the CM4 datasheet, there’s a throwaway sentence about it running more efficiently than the Model B. And when I looked inside the Pi 400, there was this giant aluminum heat spreader attached to the SOC, presumably to keep it from overheating within the tight keyboard case. But there was one more clue: the Pi 400 comes clocked by default at 1.8 GHz, instead of 1.5 GHz for the other two, which are sold without a heat-sink.

Can the CM4 keep up with the Pi 400 with a little added aluminum? Will the newer siblings leave the Pi 4 Model B in the dust? Time to play a little overclocking!

Continue reading “Adventures In Overclocking: Which Raspberry Pi 4 Flavor Is Fastest?”

Autonomous Multi-Task Performing Robot

[Ruchir] has been pretty into robotics for a while now and has always been amused by the ever-popular obstacle avoiding robot, but wanted something that could do more. So, like any good hacker, he decided to build something himself.

He wanted to incorporate all the popular beginner robot capabilities into a single invention. His robot can follow a line, detect an obstacle, and retrieve an object without switching between modes. It can even follow another robot, which is pretty neat.

His robot has a lot of the hardware you would expect. It uses a Raspberry Pi for all the heavy image processing, has optical sensors for line following and obstacle avoidance, and includes a speaker for audio feedback. What’s especially cool is the impressive interface, called the Regbot GUI, that [Ruchir] is using with his robot. According to the Wiki page, the Regbot GUI appears to accompany an educational robotics platform developed by Professor Jens Christian Andersen of the Technical University of Denmark for teaching controls to engineering students. [Ruchir] was able to adapt the GUI to his particular bot no problem.

Using the Regbot GUI, [Ruchir] can monitor all the robot’s sensor data in real-time (accelerometer, gyroscope, distance sensor, servo, encoder, etc.), dynamically adjust its calibration settings if needed, or even provide a universal killswitch in case the unthinkable happens. We’d say it’s definitely worth a look before you embark on your next robotics project.

Continue reading “Autonomous Multi-Task Performing Robot”

The Internet Of Bubble Machines

Everyone loves a good bubble machine. These oddly satisfying novelty items have brought children and adults mindless entertainment since their inception. [8BitsAndAByte] had the same thought, but wanted to give their bubble machine a taste of the IoT-age.

First, they modified an off-the-shelf bubble machine with a Raspberry Pi and relay module. The Pi can easily trigger the bubbling mechanism by controlling power to the machine using the relay. Seems simple enough. The part of this project that might be a bit more unfamiliar to you is controlling the robot over the internet using remo.tv.

Remo.tv is a robot controller platform that’s both free and open-source, and we’ve seen [8BitsAndAByte] take advantage of this web controller before. Seems like they’re really getting the hang of it. Their writeup links to a detailed setup guide for configuring the Pi, so hopefully, that’s not too much trouble.

Couple the IoT setup with a Pi camera and you’ve got a live stream that’s admittedly oddly satisfying to watch with or without the bubbles.

Continue reading “The Internet Of Bubble Machines”

Looking For Pi In The 8087 Math Coprocessor Chip

Even with ten fingers to work with, math can be hard. Microprocessors, with the silicon equivalent of just two fingers, can have an even harder time with calculations, often taking multiple machine cycles to figure out something as simple as pi. And so 40 years ago, Intel decided to give its fledgling microprocessors a break by introducing the 8087 floating-point coprocessor.

If you’ve ever wondered what was going on inside the 8087, wonder no more. [Ken Shirriff] has decapped an 8087 to reveal its inner structure, which turns out to be closely related to its function. After a quick tour of the general layout of the die, including locating the microcode engine and ROM, and a quick review of the NMOS architecture of the four-decade-old technology, [Ken] dug into the meat of the coprocessor and the reason it could speed up certain floating-point calculations by up to 100-fold. A generous portion of the complex die is devoted to a ROM that does nothing but store constants needed for its calculation algorithms. By carefully examining the pattern of NMOS transistors in the ROM area and making some educated guesses, he was able to see the binary representation of constants such as pi and the square root of two. There’s also an extensive series of arctangent and log2 constants, used for the CORDIC algorithm, which reduces otherwise complex transcendental calculations to a few quick and easy bitwise shifts and adds.

[Ken] has popped the hood on a lot of chips before, finding butterflies in an op-amp and reverse-engineering a Sinclair scientific calculator. But there’s something about seeing constants hard-coded in silicon that really fascinates us.

Giving The Pi 4 PCI Express

The release of the Raspberry Pi 4 brought us a new SoC, up to 4 Gigs of memory, and most importantly, got away from that janky USB to USB and Ethernet solution. The Raspberry Pi 4 has a PCI Express interface buried under some chips, and if you’re very good at soldering you can add a PCIe x1 device to the new best single board computer.

[Thomasz] took a look at the Raspberry Pi 4 and realized the new USB 3.0 chip is attached to the PCI Express interface on the SoC. That is, if you remove this chip and you have some very fine wires, you can patch in a real PCI Express slot. Removing the chip is easy enough with a hot air gun, although a few caps did get messed up. Throw that in an ultrasonic cleaner, and you have a blank canvas to work PCI magic.

This hack requires six wires, or three differential pairs, there’s a reference clock, a lane 0 transmit, and a lane zero receive. Working backwards from a PCI Express riser, [Thomasz] traced out these connections and soldered a few wires in. On the Pi side, a few capacitors were required to be compliant with the PCI Express spec, but the soldering isn’t too bad. You can do a lot with a small tip on an iron and a microscope.

The Pi was successfully wired up to a PCI Express riser card, along with the lines for ground, 5V, link reactivation, and a power good signal. The only thing left to do was to plug in a PCI card and test. This didn’t go as well as expected, because the PCI Express adapter didn’t like being enumerated by the Raspberry Pi kernel. In subsequent experiments, an Adaptec SAS controller worked. Does this mean external graphics cards for the Pi? No, not quite; this is only one lane of PCIe, where modern graphics cards require an x16 slot for the best performance. Still, if you’ve ever wanted a SCSI card for a Pi, this is the best option yet.

PiFX, The Pi-Powered Pedal Board

Since the beginnings of the Raspberry Pi, [Tibbbbz] has wanted to build a DIY guitar effects board and amp simulator. A device like this, and similar ones sold by Boss and Kemper, put a bunch of processing power inside a metal enclosure with some footswitches and a pair of quarter inch jacks for input and output. Mash some buttons and wicked toanz come out the other end. Now this is actually possible with a Pi, and it’ll sound great too.

Because this is an audio application, latency is critical. It doesn’t really matter if you have 200 milliseconds of latency when scrolling through your Facebook feed, but for real-time audio processing anything over five milliseconds is disorienting and nearly unusable. [Tibbbbz] is using a standard, off-the-shelf USB audio adapter that gets the latency down to about that level. A Raspberry Pi is never going to have latency as low as a handful of transistors in a analog effects pedal, but it’s close enough.

For the audio system, it’s all about JACK audio: a wonderful frontend for the Linux audio system. The actual pedal emulation is happening with Guitarix. For the hardware part of this build, there’s actually not that much going on here apart from a USB sound card and a touch screen display. The footswitches are the most interesting as they’re wired up as buttons in a repurposed USB keyboard controller board. This repurposing of a USB keyboard is rather interesting, because it vastly simplifies the entire build. All of this is wrapped up in a wedge-shaped walnut pedalboard that’s sturdy enough to live on the stage at least part of the time. You can check out the demos here.

Python And Pi Provide Heads Up Display For Your Experimental Airplane

You shouldn’t be looking at screens when you’re driving, but what about a heads-up display? A screen that could put relevant information in your field of vision would be great, even more so if it used a Raspberry Pi. That’s exactly what [John] did, only he did it with an airplane.

First up, the legality of this build. [John]’s plane is registered as experimental, which, provided you know what you’re doing, is pretty close to ‘anything goes’ as you would want in a manned aircraft. [John] has a sufficient number of hours in his log book, and he’s built a Zenith 701.

For hardware, the hard part of this build is constructing a heads-up display. Fortunately, aftermarket HUDs exist, and [John] is using a Kivic projector, a $200 piece of equipment that’s readily available on Amazon. If you need a HUD for your car, there you go. The software is another thing entirely, with the goal of having the software decoupled from the display and data sources. This is somewhat easy to accomplish with a Raspberry Pi; the display is actually just some minimal text-based blocky graphics built in PyGame. This build is also decoupled from the data sources by building this as a user interface for Stratux, an independent Raspberry Pi-based ADS-B receiver for pilots.

There are several views available with this HUD, with the AHRS + ADS-B providing information on the aircraft’s attitude and altitude, along with a few indicators of the nearest planes. The traffic view expands on the ADS-B data, showing the nearest eight or so aircraft in the air, with a range, bearing, and difference in altitude. There’s a diagnostic window, and since [John]’s plane is a backcountry STOL thingamado that can hover in a strong wind, there’s also a digital version of a norden bombsight. It’s for dropping bags of flour onto a grass strip. You can check out [John]’s entire AirVenture presentation of the build below, with all the code available here.

Continue reading “Python And Pi Provide Heads Up Display For Your Experimental Airplane”