Hack A PS/2 Keyboard Onto Your Pi Zero

Hacking for the Raspberry Pi Zero is a tricky proposition. Whatever you do, you’re working with a nominal five dollar board, so your hacks can’t be too highfalutin. For instance, a decent PS/2 to USB adapter will cost you as much as the Zero did, if not more. But if you just need to drive your Pi Zero from your old Model M (we hear you!) you’ve got to do it on the cheap.

So when prolific Pi hacker [mincepi] set out to build a PS/2 adapter, some corners were cut. PS/2 is a clocked data protocol, but the good news is that the clock doesn’t start and stop all the time as in I2C or SPI. This means that if you poll the data line at just the right frequency, at least in principle you’ll be able to ignore the clock.

ps2-schematic_border

So that’s what [mincepi] did. As you can see in the schematic and the banner image, there’s nothing to it. Two resistors provide the pullup voltage for the clock and data lines. And here’s a gem: a green LED with a drop voltage of about 2 V converts the 5 V data line down to something that the Pi Zero’s 3.3 V won’t get fried with. Cute, and very much in keeping with the spirit of the hack. You might be tempted to scrounge up a 3.3 V zener diode from somewhere just to be on the safe side, but remember, it’s a five dollar computer you’re protecting.

The last piece is a custom kernel module for the Pi that polls the PS/2 data line at just the right frequency. If you’re not a Linux person and “compiling a kernel module” sounds scary, [mincepi] has even put together a nice guide for the Raspbian distribution that he’s using. It should work with minor tweaks for any other distro.

We said [mincepi] is a prolific Pi hacker and here’s the proof: we’ve covered his quick-and-dirty VGA output hack and a scheme to get analog sound input into the Pi Zero just in the last couple of weeks. Hack on!

Raspberry Pi Zero Round 1 Winners!

The Raspberry Pi Zero Contest presented by Adafruit and Hackaday has been going incredibly well! We currently have 132 projects entered, and there is still time for YOU to get in on the fun! The only problem entrants have had is getting their hands on these amazing $5 computers. We’ve made that easy by giving away ten Raspberry Pi Zero boards. The following projects were well documented, well thought out projects were selected by the judges. We’ve already informed the winners through Hackaday.io, and will be shipping out the Pi Zero boards to them right away.

Please join the judges and the entire Hackaday staff in congratulating the winners of the Pi Zero boards!

If you didn’t win, all is not lost! There is still time to enter the contest. The deadline is 11:59 pm PST on March 13, 2016. You’ll be in the running for one of three $100 gift certificates to The Hackaday Store!

Giving The Pi Zero USB, Ethernet, And Serial Over USB

Just as the USB port on your phone can serve as a serial connection, mass storage device, and a network connection, the Pi Zero can do the same. We’ve seen a few people turn the Zero into a single USB gadget, but what about turning the Zero into a USB HID device, network connection, and serial port all at the same time? That’s what [Tobias] did, and his method is even easier than the old one.

The old method of turning the Pi Zero into a USB device required the user to modify and recompile the kernel. Obviously, this isn’t an ideal solution. [Tobias]’ implementation fixes this by putting everything into userland. Everything is configurable through a script and a few tweaks to how the Pi starts up.

The result is a Raspberry Pi Zero that will appear as any USB peripheral. [Tobias] goes through the usual examples: setting the Pi up as a serial device for hacking and code cracking in a terminal, as an Ethernet device to give the Pi Zero networking capabilities, as a keyboard to send keypresses to another computer, and as a mass storage device so that other computers can read a small portion of the Pi’s SD card.

There are plenty more USB gadgets the Pi can emulate, from printers to audio devices to MIDI adapters to webcams. If you can wrap your head around what a Pi Zero could do when configured as one of these devices, drop a note in the comments.

Controlling RGB LEDs With The Pi Zero

The Pi Zero is a great piece of hardware, even if you’re not designing another USB hub for it. [Marcel] wanted to control a few RGB LED strips from his phone, and while there are a lot of fancy ways you can do this, all it really takes is a Pi Zero and a few parts that are probably already banging around your parts drawers.

This isn’t a project to control individually addressable RGB LEDs such as NeoPixels, WS2812s, or APA102 LEDs. This is just a project to control RGB LEDs with five four connectors: red, green, blue, power, and or ground. These are the simplest RGB LEDs you can get, and sometimes they’re good enough and cheap enough to be the perfect solution to multi-colored blinkies in a project.

Because these RGB LEDs are simple, that means controlling them is very easy. [Marcel] is just connecting a transistor to three of the PWM pins on the Pi and using a TIP122 transistor to drive the red, green, and blue LEDs. You’ve got to love those TIPs package parts!

Control of the LEDs is accomplished through lighttpd. This does mean a USB WiFi dongle is required to control the LEDs over the Internet, but it is so far the simplest way we’ve seen to add multicolor blinkies to the web.


Raspberry_Pi_LogoSmall

The Raspberry Pi Zero contest is presented by Hackaday and Adafruit. Prizes include Raspberry Pi Zeros from Adafruit and gift cards to The Hackaday Store!
See All the Entries || Enter Your Project Now!

Hackaday And Adafruit Launch The Pi Zero Contest

Hackaday and Adafruit are teaming up to bring you the Pi Zero Contest. Unless you’ve been hiding out in your workshop for the past month or so, you probably already know The Pi Zero is the $5 Linux-based computer which has been taking the world by storm. Think you have the next great project for this single-board computer? Enter it for a chance to take home one of three $100 gift certificates to the Hackaday Store. We know Zeros have been hard to find, so we’ll be giving away 10 of them before the contest is over. Even if you don’t have a Pi Zero, read on!

This is all about documenting quality projects to Hackaday.io. We’re looking for well thought out, well documented builds intended for the Pi Zero. Any project submitted to this contest can also be rolled over to the 2016 Hackaday Prize. Think of it as getting a head start.

Here are the details:

  • From February 2nd, to February 20th, Lady Ada will make 10 ‘From the Desk of Lady Ada’ broadcasts focusing on this contest. During each broadcast she will present an idea for a Pi Zero Project. You don’t have to build Lady Ada’s projects, they’re starter ideas to get your wheels turning. If you don’t have a Raspberry Pi Zero, don’t worry! You can prototype with a Raspberry Pi Model B, or a Pi 2. There are also 10 Pi Zero boards up for grabs before the contest is over.
  • The deadline for winning a Pi Zero is 12:00am PST February 25th, 2016. The judges will pick the 10 most well thought out and well documented projects.
  • On February 29th, the judges will announce the winners of 10 Raspberry Pi Zero boards.
  • The grand prize for this contest is one of three $100 gift cards to the Hackaday store. The deadline to enter is 12:00 am PST March 14th, 2016.

Entering is easy.  All you have to do is submit your project. Just click the “Submit to” drop down list on your project page. Then select Adafruit Pi Zero Contest.

So fire up your soldering irons, warm up your 3D printers, and load up your favorite code editor. It’s time to start hacking!

Pi Zero Recipe Kiosk

Why do you want to have a tiny $5 Linux system on a chip? Because you can cram it into a discarded LCD monitor and you’ve got a useful device. [zarderxio] did just that, satisfying the age-old dream of the kitchen computer with junk that was lying around in the basement.

There’s not much to this hack. The Raspberry Pi Zero needs a 5V power supply and the screen has 12V, so a step-down converter takes care of that. [zarderxio] hard-wires the monitor out of the Zero straight up to the monitor’s input jack, and hot-glues a USB hub to the outside of the monitor for a keyboard and mouse. (Because if there’s one thing we know, it’s that the Raspberry Pi Zero needs more USB ports: see exhibit A and exhibit B just for example.)

Now you’re all thinking, “USB keyboard and mouse?!?! I want a touchscreen!” Do you really? In the kitchen, with sticky fingers? Well, the screen in [zarderxio]’s junk box didn’t have a touchscreen, and this makes it more flexible, so we’re on the side of the quick hack done. Who knows, maybe he’ll hack yet another Raspberry Pi Zero into a smudge-proof recipe controller?

[via reddit.]