A Raspberry Pi SID Player

Of all the vintage chiptune machines out there, the Commodore 64 is the most famous. Even 30 years later, there are still massive gatherings dedicated to eeking out the last cycle of processing power and graphics capability from the CPU and the infamous synth-on-a-chip, the SID. [Bob] wanted to build a SID jukebox. A C64 is capable of the job, but if you want to have every SID composition on an SD card and connect that to a network, a Raspberry Pi is the way to go.

The SID chip, in its 6581 or 8580 versions, is controlled directly by poking registers on the chip through the address and data busses. This means a lot of pins, too many for the original Raspi expansion header. That’s not a problem that can’t be solved with a few shift registers, though. The rest of the circuit is an LM386 audio amplifier, an LCD that displays the current song, and a can crystal oscillator for the SID.

Right now everything is wired up on a breadboard, but making this a Raspberry Pi hat would be a rather simple proposition. It’s only a matter of finding a SID with working filters, and if you can manage that, it’s a pretty easy build to replicate. Video below.

Continue reading “A Raspberry Pi SID Player”

Benchmarking The Raspberry Pi 2

The Raspberry Pi has only been available for a few days, but already those boards are heading through the post office and onto workbenches around the world. From the initial impressions, we already know this quad-core ARMv7 system boots in about half the time, but other than that, there aren’t many real benchmarks that compare the new Raspberry Pi 2 to the older Raspi 1 or other similar tiny Linux dev boards. This is the post that fixes that.

A word of warning, though: these are benchmarks, and benchmarks aren’t real-world use cases. However, we can glean a little bit of information about the true performance of the Raspberry Pi 2 with a few simple tools.

For these tests, I’ve used Roy Longbottom’s Raspberry Pi benchmarking tools, nbench, and a few custom tools to determine how fast both hardware versions of the Raspberry are in real-world use cases.

Continue reading “Benchmarking The Raspberry Pi 2”

Introducing The Raspberry Pi 2

TL;DR It’s called the Raspberry Pi 2 Model B. Quad core ARM Cortex A7 with one Gig of RAM. It’s the same form factor as the Raspberry Pi Model B+. Available now at Newark, Element 14, Allied, and RS Components. It’s the same price as the old one. You’re not a child and you should learn to read.


The original Raspberry Pi released, three years ago, was looking a bit long in the tooth when it was first launched. That’s to be expected for a computer that sells for $35 USD. Three years is a long time in the world of electronics, and the Pi is due for an update. It’s here, now, and the biggest change is a faster quad-core chip, a better processor architecture, and 1GB of RAM.

The Raspberry Pi 2 Model B features a quad-core ARM Cortex A7 running at 1GHz with 1GB of RAM. This chip uses the ARMv7 architecture instead of the ARMv6 of the original Raspi. When playing around with it, it was noticeably zippier than my months-old Raspi Model B in web browsing tasks. Very, very cool, and something that opens up a few doors for CPU-intensive applications.

Although the CPU has been updated, there isn’t much else on the Pi that has changed. USB and Ethernet is still handled by the LAN9514 USB/Ethernet controller. If you’re looking for Gigabit Ethernet, sorry that’s not going to happen. We’re not going to get eMMC Flash, SATA ports, or anything groundbreaking other than the CPU with this hardware update. It’s pretty much just a CPU and RAM upgrade.

All the original ports found on the Raspberry Pi Model B+ are found on the Raspi 2; HDMI, audio, analog video, Ethernet, USB, CSI, the as-for-now unused DSI, and GPIO ports haven’t changed. Again, we’re looking at a CPU and RAM upgrade with this hardware release.

Instead of the odd Package On Package CPU and RAM stack featured in previous Raspberry Pis, the RAM has now moved to the back on the Raspi 2:

raspiback

The RAM chip is an Elpida EDB8132B4PB-8D-F, an eight gigabit DDR2 RAM that has the same clock rate as the RAM in the original Raspi. Don’t look for an increase in memory performance or speed. Instead, just be glad there’s now a full gigabyte of RAM on the Raspi.

A few of you may remember the ‘upgrade’ all those Raspberry Pi early adopters missed out on. After the first few hundred thousand Raspberry Pi Model Bs shipped, someone realized they could upgrade the RAM from 256 MB to 512 MB. It is not yet known whether the Raspberry Pi 2 will be upgraded as easily. Sixteen gigabit RAMs do exist, but now that the CPU and RAM aren’t on the same package, there’s more to consider than just plopping down a new RAM chip.

Continue reading “Introducing The Raspberry Pi 2”

Raspberry Pi Learns How To Control A Combustion Engine

For his PhD at the University of Michigan, [Adam] designed a Raspberry Pi-based system that controls an HCCI engine, a type of engine which combines the merits of both diesel and gasoline engines. These engines exhibit near-chaotic behavior and are very challenging to model, so he developed a machine learning algorithm on a Raspberry Pi that adaptively learns how to control the engine.

[Adam]’s algorithm needs real-time readings of cylinder pressures and the crankshaft angle to run. To measure this data on a Raspberry Pi, [Adam] designed a daughterboard that takes readings from pressure sensors in each cylinder and measures the crankshaft angle with an encoder. The Pi is also equipped with a CAN transceiver that communicates with a low-level engine control unit.

RasPi HCCI Engine Control[Adam]’s algorithm calculates engine control parameters in real-time on the Pi based on the pressure readings and crankshaft position. The control values are sent over CAN to the low-level engine controller. The Pi monitors changes in the engine’s performance with the new values, and makes changes to its control values to optimize the combustion cycle as the engine runs. The Pi also serves up a webpage with graphs of the crankshaft position and cylinder pressure that update in real-time to give some user feedback.

For all the juicy details, take a look at [Adam]’s paper we linked above. For a more visual breakdown, check out the video after the break where [Adam] walks you through his setup and the awesome lab he gets to work in.

Continue reading “Raspberry Pi Learns How To Control A Combustion Engine”

Learning Python With Tron Radio

[5 Volt Junkie] has built his share of Arduino projects, but never anything with Python, and certainly never anything with a GUI. After listening to Internet radio one day, a new idea for a project was born: a Raspberry Pi with a small touchscreen display for a UI and displaying soma.fm tracks. It’s finally finished, and it’s a great introduction to Python, Pygame, and driving tiny little displays with the Pi.

Playing soma.fm streams was handled by mpd and mpc, while the task of driving a 2.8″ TFT LCD was handled by the fbtft Linux framebuffer driver. This left [5 Volt Junkie] with the task of creating a GUI, some buttons, and working out how to play a few streams. This meant drawing some buttons in Inkscape, but these were admittedly terrible, so [5 Volt Junkie] gave up and turned on the TV. Tron Legacy was playing, giving him the inspiration to complete his Tron-themed music player.

The result of [5 Volt Junkie]’s work is a few hundred lines of Python with Pygame and a few multicolor skins all wrapped up in a Tron theme. It looks great, it works great, and it’s a great introduction to Python and Pygame.

Continue reading “Learning Python With Tron Radio”

Tracking Power Usage With A Raspi

With tiny, Internet-connected computers everywhere these days, home automation is finally hitting it big. [Jelora] was looking for a few more home automation projects and realized his electric meter had a pair of ‘digital information outputs’. With a Raspberry Pi and a few bits of wire, he figured out how to read this digital output and put a log of his electricity consumption up on the web.

The digital output on [Jelora]’s meter is a bit odd; it’s 1200 bps, 7 bits per character, parity, with one stop bit. It’s also a 50 kHz AC signal for a binary ‘0’ and nothing for a binary ‘1’. To read this signal, [Jelora] is using a diode to throw out half the signal, a 6N138 optoisolator so the Pi isn’t connected directly to the meter, and a small cap to smooth out the signal. Simple, and it works.

This cleaned up signal is then connected to serial to USB chip and a PHP script scrapes the data every minute. The data received from the meter is stored in a data base along with a few other bits of information: if the meter is being charged peak or off-peak rates, and the price per kWh. All this is saved on an IDE hard drive (more reliable than the SD card, surprisingly), and a ‘electricity cost per day’ is plotted on a nifty graph and served up by the Raspberry Pi.

Handheld Linux Terminal Gets An A+

Are you all thumbs when it comes to Linux? If you follow [Chris]’s guide to building a handheld Linux terminal, that particular condition could work to your advantage. His pocket-sized machine is perfect for practicing command line-fu and honing your scripting skills on the go.

[Chris]’s creation is built around a Raspberry Pi A+ that he stripped to its essentials by removing the GPIO pins, HDMI and USB ports, the audio port, and the camera and display ports. It’s housed in a pair of plastic 2.5″ hard drive enclosures connected with a piano hinge, making it about the size of a Nintendo DS. The display is an Adafruit PiTFT touch screen and in order to save space, he soldered it directly to the Pi.

The 2.4GHz wireless thumb keyboard has all the special characters necessary for Linuxing, but the four USB ports from a dismantled hub provide flexibility. If [Chris] were to make another one, he might use this slightly larger screen from Tindie and add some charging ports to the case.

[Thanks for the tip, ar0cketman]