Speeding Up BeagleBone Black GPIO A Thousand Times

For both the Raspberry Pi and BeagleBone Black, there’s a lot of GPIO access that happens the way normal Unix systems do – by moving files around. Yes, for most applications you really don’t need incredibly fast GPIO, but for the one time in a thousand you do, poking around /sysfs just won’t do.

[Chirag] was playing around with a BeagleBone and a quadrature encoder and found the usual methods of poking and prodding pins just wasn’t working. By connecting his scope to a pin that was toggled on and off with /sysfs he found – to his horror – the maximum speed of the BBB’s GPIO was around three and a half kilohertz. Something had to be done.

After finding an old Stack Overflow question, [Chirag] hit upon the solution of using /dev/mem to toggle his pins. A quick check with the scope revealed he was now toggling pins at 2.8 Megahertz, or just about a thousand times faster than before.

Unbricking a Router With a Raspi

jtag

About a decade ago, [Mansour] learned of the Linksys WRT54G, a wireless router that’s been shoved into just about every project under the sun. After learning of this device’s power, he decided a firmware upgrade was in order. Unfortunately, he accidentally bricked this router and left it sitting on a shelf for a few years.

Idle devices are the devil’s playthings, and when [Mansour] discovered a Samsung hard drive with a an SDRAM that was compatible with the WRT54G, he decided he would have a go at repairing this ancient router. There was only one problem: the most popular utility for programming the router through the JTAG header required a PC parallel port.

No problem, then, as [Mansour] had a Raspberry Pi on hand. The parallel port utility bit-banged the new firmware over to the router, something the GPIO port on the Pi could do in spades. By adding Pi support to the debricking utility, [Mansour] had a functional WRT54G with just a little bit of patience and a few wires connecting the GPIO and JTAG header.

Automated programming and testing jig built with Raspberry Pi

automated-programming-testing-rig-built-from-RPi

[Doug Jackson] makes word clocks, and he must be doing quite a bit of business. We say that because he put together a programming and test bed for the clock circuit boards.

This is a great example to follow if you’re doing any kind of volume assembly. The jig lets the populated PCB snap into place, making all the necessary electrical connections. This was made possible by a package of goods he picked up on eBay which included rubber spacers to separate the board from the acrylic mounting plate, pogo pins to make the electrical connections, and a spring-loaded board clamp seen to the left in this image.

The switch in the lower right connects power to the board and pulls a Raspberry Pi GPIO pin high. The Python script running on the RPi polls that pin, executing a bash script which programs the ATmega169 microcontroller using the GPIO version of AVRdude. We looked through his Python script and didn’t see code for testing the boards. But the image above shows a “Passed” message on the screen that isn’t in his script. We would wager he has another version that takes the hardware through a self test routine.

We first saw one of [Doug's] word clocks back in 2009 and then again a few months later. The look of the clock is fantastic and it’s nice to see the project is still going strong.

Turning a phone into a media center remote

IMG_2061

[Kees] wanted a remote for an XBMC audio system. He had a classic T65 Dutch telephone in one of his project boxes and thought this phone with the addition of a Raspberry Pi he could have a functional media remote with classic lines and 70s styling.

Each of the digits on the phone were wired up to a small solderless breadboard. With a handful of resistors, [Kees] set up a simple pull up/pull down circuit feeding in to his Raspi’s GPIO input.

With a short Python script, [Kees] managed to map the buttons to XMBC’s play/pause, volume up/down, next, and previous commands. There were a few buttons left over, so those were mapped to online radio stations, playlists, and a strange setting known only as ‘moo’. We’re not sure what that button does, but you can see the other functions of this XMBC phone remote in action in the video below.

Continue reading “Turning a phone into a media center remote”

24-port GPIO on a PCI card

btgpio

So you’ve got a project running on an x86 board and you’d like some GPIO pins. Whether you want to read a few buttons, light up a few LEDs, put an accelerometer in your computer or whatever, you’ve got a problem. Luckily there’s an easy way to get 24 GPIO pins on an x86 board using a PCI card for just a few bucks.

The key component of the build is a PCI TV Tuner card made by Hauppague under the WinTV brand. If you’ve got one of these cards with either a Brooktree bt848, bt849, bt878 or bt879 video capture chip, having 24 GPIO pins is just a spool of magnet wire, a soldering iron, and a steady hand away.

It’s a great build if you’d like some GPIO action without going through the usual parallel port mess, and especially useful since these WinTV capture cards can be had from the usual Internet suppliers for just a few bucks. You’ll need a driver, of course, but the relevant Linux kernel driver - bt8xxgpio – should be included any reasonably modern distro.

Special thanks to [Dex Hamilton] for notifying us of this build.

Easy web interface with GPIO access runs on Raspberry Pi

Here’s a Raspberry Pi hack that adds web control using PHP and MySQL. As you can see in the image, it serves up a webpage (using the Apache2 server) which allows you to change the state of the GPIO pins. It’s not super-complicated, but it is nice to see a step-by-step guide for installing and configuring the package.

Web interface GPIO control is one of the features we loved about the Adafruit Web IDE. But this offering is loaded completely from the RPi (the Adafruit package uses cloud based code) and utilizes the tools most Linux network admins will be used to. A MySQL database manages the connection between GUI commands and GPIO modification. The webpage is served up by a PHP script which takes care of polling and changing database values. Configuration requires a new database, plus the username and password which has access to it.

PIC programming adapter for the Raspberry Pi

Here’s another offering when it comes to PIC programming from the Raspberry Pi. The design seeks to adapt the GPIO header so that it may be used for programming PIC microcontrollers, but this does involve a bit more than just physically connecting pins to the target chip. Most of the PIC family require a 12V programming level, and this setup makes that possible.

The sets of NPN transistors shown in the schematic fragment above are arranged in darlington pairs. They’re actually switching voltage from the 6V linear regulator built into the system using the Pi’s 3.3V pins. There’s also a 12V regulator, so you’re going to need a power supply that is capable of sourcing more than that.

We’ve seen a similar concept before but this design carries it a step further. There are several status LEDs built into the programmer, and it includes support for detecting which chip is being programmed. So far this covers just four different chips, but we’re sure that it could be adapted to fit your own needs.

[via Reddit]