Playstation controller -> iPad/iCade emulator

Silly me, I almost dropped $30 on one of these bluetooth game controllers for iOS… and thankfully I got my brain back in order and started thinking about how I could hack some stuff I already own to do this.

Essentially, these bluetooth game controllers for iOS/Android are just bluetooth keyboards. I started out thinking I could hack this tiny bluetooth keyboard that I already have – but hardwiring the keyboard keys to buttons…

So I started looking into the magic behind these controllers, starting with the bluetooth iCade cabinet. Turns out that they use a special version of keymapping that is not as straight foward in implementation. The deal with these is that when you hit a button, it sends a single keyboard key signal (like the letter A) and then sends another key signal when you release the button (like Q). This is true of the D-Pad/Joystick as well.

This is where I decided that hardwiring something wouldn’t “just work”. I’m sure there’s some hardware folks out there that’ll say “hey, no problem”, but that’s because you know more than I – but I’m sure it would include more hardware than just the controller, and that’s something I was trying to avoid.

Arduino to the rescue:

In researching how I might do this, I discovered that iPad Camera Connection Kit (again, something I already have) allows you to hook up USB keyboards to your iPad (how I didn’t know this, well, I don’t know). I also thought that I might use an old PC gamepad that I had lying around, but stumbled across an Arduino library for talking direct digital to Playstation controllers (also in a box in the garage). Also existing is a library for emulating a USB keyboard from the Arduino, but currently I’m two zener diodes short on the hardware side to test.


Playstation Controller Arduino Library:
Arduino Virtual USB Keyboard:
iCade controller reverse engineering discoveries:

So, I start on this journey: Playstation Controller -> Arduino -> USB keyboard protoshield thingy -> iPad Camera Connection Kit -> iMAME for iOS

a couple of hours of hacking on the controller->Arduino bit. I dug up an old wireless dongle for a PSOne controller and ripped out the controller socket. [ Note: the case it was in is probably perfect to re-house all the guts once my DigiSparks arrive to replace the massive Duemilanove that I’m using for dev on the project.]

Followed the wiring diagrams:

Controller -> Arduino
CLK -> Pin7
ATT -> Pin6
CMD -> Pin5
DAT -> Pin4
5v -> 5v

I had to fiddle with the timings in the actual PS2X library code to get my buttons to be recognized correctly, but after a little tweaking, we have success!

Screen Shot 2012-10-22 at 1.43.12 PM

Here we have the current hardware prototyping mess. Also included is the breadboarded USB breakout this is missing those zener diodes. As soon as I make my hardware run, the USB keyboard emulation tests will be the subject of the next post. Until next time!


I was cruising right along, until I started running into issues with the USB keyboard emulation. It’d work great for about a minute and the arduino would appear to hang.

So I decided to trash the USB keyboard emulation idea and got myself a Bluetooth HID module. I never did get into hacking on that thing (there were some lightly documented firmware changes that I’d have to make), so there in died the posting of updates for this project.

Until! After the holidays, ThinkGeek put the iCadeJr on clearance for $10 each (sadly, no longer offered at this price). Its a nifty little bluetooth thing that emulates a bluetooth keyboard, works with iOS and Android. Problem: its probably meant for full sized Smurfs to play on, as I find it impossible to make it work with any efficiency.


But that’s ok, as I knew I’d tear this thing apart anyhow. Ten minutes later, I have this:


So – this is what I’ll be hacking on the other end of the Arduino instead of an emulated USB keyboard. You can see that the Bluetooth controller is nice and exposed, and they even gave me a nice connector to work with for the front buttons. There are four buttons on the back of the unit – which is good, as I plan to map those to the shoulder buttons on the PS2 controller. Also what looks like a serial header that’s ready for a pin header to be soldered in there.

Hopefully I’ll have more details later. Wish me luck!

what I’ve done to my five year old son’s mind. a snapshot. (thanks, George)

His depiction, in LEGO, of the “fire planet where Anakin gets burned up” from Star Wars, The Revenge of the Sith.

Yeah, I should have paused before that scene.  Apparently its viewing has made quite the impression.  I’ll rationalize it as a lesson to him about what happens if you do things that hurt others…


Garden Hacking

Certainly not the first introduction of tech to the wife’s garden, but first application of 3D printing.

Saw this clever idea on Thingiverse:

Theory is that the white (cabbage) butterflies are too polite to tread on another’s turf, so they stay away if someone else is “laying eggs” in a certain area.

I scaled them down a bit from the original. I saved some filament making them thinner and hot gluing sprinkler marker flags (minus flag) to them for stakes. Also moved the dot to where our local species seem to have them (if I remember correctly).

The hope is that we humans are the only ones that are munching on our veg.


Hopefully I’ll see some (non) results in the next few weeks!

MiniPwner hardware hack: melding the router and the battery

I love the little router and battery combination that is the Minipwner.  However, I was not fond of the cable hanging out between the battery and the router.

In having a 3D printer, I thought I’d design a custom case to house both the items – once I freed them from their respective plastic shells.  As I was looking at them and thinking of the best way to fit them together, I noticed (after a little Dremel action) that I could use half of each case to house both units in the same shell.  Quick, and dirty?  Yes.  But an easy hack for sure.  Add some soldered leads between the power connections, and I have a all-in-one unit with no pesky cables (other than the required ethernet cable).  And I can still see all the status lights of each the battery and router!

Finished product:

So… to start, you’ll want to crack the cases open.  These are the normal plastic tab-type enclosures.  Carefully work them open using your favorite prying device (as you can see by the giant crack in the upper shell, I’m no expert in this field, please google elsewhere for tips on this subject).   The router case’s blue top is the part that needs to be removed to reveal the board.

Once you’ve got the boards out, we’ll need to Dremel away at some of the plastic on the router’s white case to make room for the LED light, power switch and large USB receptacle.

You’ll need to remove plastic from the areas highlighted below.  Keep the top of the battery case handy to make sure you’ve removed enough for a good fit.  There is also a plastic pin that protrudes from the top of the battery case lid.  This will need to be removed as well (not pictured).

Now for the wiring.  I used a couple 80mm lengths of 22AWG Kynar wire.  Use whatever you have, but the lighter gauge, the better.  Below are the the two pair of points that need to be connected.  There are other points you could use – if you have a multimeter, you can poke around and find them.  I did have to scrape a but of the gloss off the copper ground pad on the router to get the solder to gain a good grip.

Once you’ve got it wired up, put the boards back in their places (don’t forget the tiny screws on the battery board).  I added a piece of electrical tape over the larger USB connector on the battery; no way I’d be fitting a plug in there anyways, with the router case now partially blocking it.


Center the battery case on top on the router case bottom to your liking.  I held the two pieces together with a clamp and *attempted* to neatly place some drops here and there around the seams – again, you’ll probably do a better job of this than I did.  Let the glue dry for a handful of minutes… and there you go!  The MiniPwner in a nice, neat, singular package!

Dropbox and Skeinforge/Printrun

If you’re like me and sometimes print from different hosts (desktop at home, laptop remotely), then you may have run into some issues in getting your settings all synced up between those machines.

I found Dropbox to be the perfect solution.  Keep all of your profiles, alterations and models in a Dropbox directory and stop worrying about copying stuff in a scramble before you pack up your stuff for the next meet-up.

If you don’t already have a Dropbox account, get one today [link] – they are free and awesome!

Note: I’m on Mac/OSX on both my desktop and laptop.  These instructions will also work for linux.  However, I’m not sure about creating shortcuts and how reliable they can be on Windows OSes.  If you know the best way, please leave a note in the comments!  The cool thing about Dropbox is that it is cross platform and should work between mixed operating system configurations as well…

I created a 3d_printing/ directory in the Dropbox root.  Under that I have my printrun/ installation directory (with skeinforge in subdirectory below that), a 3d_objects/ directory (so that I always know where my printable models are) and most importantly, a skeinforge_settings/ directory.

I’ll address the latter mention first – as it is most important.  In the skeinforge_settings/ directory, I have copied the alterations/ and profile/ directories from the .skeiforge/ directory in my home folder.  Once that was copied, I made a symlink in my home directory (replacing the original .skeinforge directory) that points to the folder in Dropbox:

ln -s ~/Dropbox/3d_printing/skeinforge_settings ~/.skeinforge

The other important symlink is the printrun/pronterface settings file.  Copy the .pronsolerc file from your home directory into the Dropbox skeinforge setting directory, and make sure to rename it (I called it _pronsolerc) so that it won’t be hidden to the GUI file manager.  Symlink that file as well (you’ll have to remove/copy/rename the original first, of course):

ln -s ~/Dropbox/3d_printing/skeinforge_settings/_pronsolerc ~/.pronsolerc

Now… repeat this for the hosts that you plan on using as your printing hosts.

Once you’ve done this – you’ll gain two advantages over your previous setup:

  1. any change you make on any host will be automatically synced between machines.
  2. (and perhaps most important) you’ll have a revision history for your profile changes – this has saved my bacon more than I care to count

Reprap calibration: Bottom, the First Layer and Z-Home

The technical details of the bottom, or first layer, on a reprap print was something that eluded my understanding when I first started working with my printer.  Here’s my best understanding of the subject, as it relates to your reprap (or repstrap or TOM) and your slicing software.  I focus on skeinforge in particular.

First off, we should focus on what the software and your controller board will think is the Home or zero position.  Most tutorials say the print head should be “the width of a piece of paper” above your print platform when to Z-home endstop is engaged. No paper being identical, I decided to use something a bit more reliable to measure the distance: a gap indicator or “feeler” gauge.  Here’s a link to an inexpensive example that conveniently has the metric measurements marked in addition to the SAE units.

In my case, with a .5 mm nozzle,  I currently print with .3mm layer height.  In my skeinforge configuration, the Bottom module is enabled and Additional Height over Layer Thickness ratio is set to 0.5 – this means that it will move the print head up .15 mm ( 0.5 ratio * .3mm layer height ) in the Z direction (from Z-Home) before it starts extruding the first layer.

So… based on these numbers, in theory, I should make sure my print head is .15mm from the platform when Z is in the Home position. BUT… we do want to make sure we are a bit closer than that, so we can get good adhesion to the print platform for that first layer.  How close you go will ultimately depend on your printer the platform surface.  I mostly print PLA on glass, with a 2.2 width over height ratio (giving me a .66 mm extrusion width), so I try to make my gap as close to that .15mm as possible  [though being: more plastic surface area = better the surface grip].

Now the actual measurements: the smallest gap I can test with my particular gauge is .006″, or .152 mm.  My platform is mounted at four corners, so I make sure to measure at the extent of each of those corners.  I also have some fairly stiff springs supporting my platform, so the way I “feel” the height may differ from yours.  I place the gauge between the print head and the platform, and adjust the platform height while slowly moving the gauge back and forth until I feel the gap is close enough to start interfering with that movement.  After that, I tighten another half turn to reduce the gap another fraction to add the extra “squish” that will help with adhesion of that first layer.  I only do this extra half-turn because I do not have a gauge that will measure past .15 mm.  I’m hoping that I’m getting somewhere between .12 mm and .14 mm as my actual gap size with this method.  This height, added to the additional height ratio that comes from the Bottom skeinforge module will have our print head starting a couple hundreds less than my .3mm layer height for that first layer (hopefully somewhere between .27 mm and .29 mm).

I try to keep that extra “squish” as minimal as possible.  If you get the head too close to the platform, the plastic needs to go somewhere – and that will be to either side making your extruded stream wider than expected.  When laying down infill on the initial layers, the extruded material will start to overlap and flow upward past the current level of the print head.  This could interfere with the movement of the head, even on the next layer…

Extra Notes:

I recently printed up some thumbwheels with trapped nut holes and added them to the bottom of the screws (with 6/32″ nylocks) that hold my platform.  That single improvement made platform height adjustments a SNAP.  Once I get up from the couch here, I hope to take some pics of my setup.  In the meantime, here’s the Thingiverse link to the parametric model that I used.  I sized my wheels to about 1″ in diameter.  Anything smaller proved to be difficult to turn for micro-adjustments.  Anything bigger and you might start limiting your X and Y extents.



salvaging a XBOX 360 wireless controller module for use in OS X

A few days back, I saw the post on Hackaday about how you can solder a USB cable and some components on the powerbutton/wireless module from a XBOX 360 and use it as a host for wireless controllers on your PC.

I just happened to have one on hand, but had some different ideas from previous projects. First, I wanted the hack to be non destructive, so I wouldn’t be soldering stuff directly to the control board. Secondly, I wanted to use this on my Mac, not a PC.

Hardware you’ll need:

  • wireless module from a 360
  • XBOX 360 wireless controller
  • XBOX 360 Charge and Play cable
  • USB cable
  • proto board with solder pads – mine was from radioshack, but something like this should work too
  • A Windows PC to complete the pairing process
  • A Mac running OS X

Here’s what that wireless module looks like once removed from the 360:

So, for the first part. I’ve made my own USB connectors in the past with a proto board and some blobs of solder. Just cut the board down to fit and add some even height blobs of solder to make contact with the pins in the socket.

This hack also requires a couple 1N4001 diodes to drop the supply voltage from +5v to around +3.3v – and the proto board is perfect for that. I attached some 30 gauge kynar wire to each blob to make it a bit easier to connect the circular traces on this board.

The edge seen in the right side of this picture will be the side that is inserted into the connector on the wireless module.

The top most part of the connector on the wireless module has 4 pins.  This is where my proto board bumps will be making contact with those pins:

Here’s a closer shot of the board making contact with those pins.  Note that you’ll have to be careful in how you size down the edges of the proto board to insure proper alignment of the contacts:

Part 2: connecting to the Mac

Prior to all of this, I tested it on a PC, following the directions in Dil’s writeup – just to make sure my cable was working as expected.

Then, get and install the OSX drivers for 360 controllers:

The syncing trick that was discussed on Dil’s blog does not seem to work on the Mac.  You must plug both the module and a controller with the Charge and Play cable into a PC to get the module and the controller to sync (you’ll need to follow his procedure for getting the software installed and modified for the new wireless module).

Once you’ve completed the pairing on a PC, plug the module into the Mac and hold down the silver/center/large X button on the 360 controller.  It should start to blink and then connect to the module.  Open System Preferences -> Xbox 360 Controllers – you should see your controller in the Device: pulldown selection!

If you don’t have the Windows PC that is necessary for the syncing step, you could always use an arduino to do it instead.

Custom VGA Dash Display Console for 2000 Jeep Cherokee

This post is cloned from

OK, first off, props to Shakes and his install. I stole almost all my ideas from him.

I’ve been working on this system since the beginning of August. It has taken a little longer to install than I expected, but mainly because I’ve been waiting for parts to arrive here and there.

First off, the dash bezel. Here’s my original with head unit still installed.

I didn’t want to mess with my original bezel, as a call to the dealership revealed a $265+ replacement part price. So, I managed to get another one to play with on eBay. I did search the local junkyards, but it seems the pop-off bezel is the first thing to disappear before the head unit, maybe even before it gets to the junkyard.

So, on to bezel fabrication. I constructed a new frame for my 7″ Lilliput. I grabbed some 1/2″ aluminum L stock and 1/4″ square hardwood to support the frame from the inside. I removed the necessary plastic from the bezel with a Dremel and epoxied the frame in. Note: use the gel epoxy – much easier to work with and build up where you need it.

Next 3 days: bondo. sand. bondo. sand. bondo sand. primer. sand. bondo. sand. primer. sand. glazing. sand. primer. wet sand. primer. wet sand.

this gives us:

Notes: I probably didn’t rough up the plastic enough at the edges where the bondo feathered off… I notice that while working with what I thought was a finished bondo job, that the edges started peeling up a bit. If I were the perfectionist I used to be, I would go back and do this all over again. But, after spending 30+ hours working with what I have now, I think it is good enough for the time being – I’ll live with it. Most people don’t notice anyhow. I’ll get better pics of the problem and add them later.

The finish paint I used was a satin finish enamel, black. I heard that Kelly Moore will match paint for you and put it in a spray can. Once again, if I were a more patient and less frugal man, I would have had them match my factory grey interior color in a satin finish enamel. Instead, I went with the best that I could find at Home Depot. I am happy with the texture of my current finish – almost matches the orignal bezel texture perfectly.

note: bad reflections on the pic – I should be able to get a better image when it is installed and the car is out in the sunlight

Line driver: I’ll be keeping my factory amplifier (from the factory “premium Inifinity” sound system) – I am happy with the sound of the system and didn’t want to re-engineer the amp’s crossover between the door speakers and the tweeters. Because of this, I needed to boost the voltage on the signal coming from the sound card to match the line level of the old factory head unit. The Phoenix Gold SLD44 is working great to fill this need. Now that the factory head unit is out of the dash, there’s a ton of room behind the area the LCD will be sitting. That’s where the line driver got installed. I used a couple of short drywall screws to secure the unit to the back of the plastic vent channel thats back there. It was a tight fit to get all the RCAs to fit back there, but with a little patience you can make sure that none of the wires will be pinched with the final placement.

AM/FM solution: I scored a RadioShark on eBay for $35, so I’m going to see how it goes before I decide to drop a bill and a half on the HQCT. I reboxed the board and added my own antennas on there… more details in this thread. The hardware will go into the same area I have the line driver… all kinds of space in there

The USB GPS, bluetooth and 802.11 adapters are fitting nicely in the gap between the air vents and the top of the dash. No interference that is limiting their operation as far as I can notice… great, becuase everything is totally out of sight.

That’s all I’ve got for now. I’m waiting on the parts to build the case for the motherboard – that’ll be going into the center armrest console. I’m also re-fabbing the storage compartment. The storage area will be very shallow, so I can store a mouse and some other things in there – also status lights and all the switches I’ll need – oh, and the two external USB ports will be accessible from there as well – great for adding JPEGs from the camera for review after sightseeing…

I’m soooo glad this forum is here, thanks to all involved for sharing knowledge and discussing new ideas. I’ve picked up far more than I expected in the month I’ve been reading here.

I’ll post updates as they happen.




install complete

OK, I’ve managed to get everything in. I’m pretty happy with the look, overall. I think most people would pass it off as a stock install…


And the center console:

Yep, the PC is under there. I just cut the stock storage area down to make it very shallow – but enough to store the mouse and some other goodies. I added all the switches and status lights I’ll need here. Clockwise from top right, Ign bypass (valet switch), P/S Power switch – then over to the top left I have the night/day switch for the monitor (coming soon), middle left is two USB ports, bottom left if monitor power and then the HDD, Power and Sleep LEDs.

I’m pretty happy to have been able to build in some more storage. I used that console to store all kinds of stuff and would have missed it if I had to remove it completely.

Now back to the drawingboard to figure out what is up with the reception on my radioshark…

2000 Jeep Cherokee Limited 4WD
Lilliput 7″
VIA EPIA M10000, 512M, 80G WD
Soundblaster Live! 24-bit
Phoenix Gold SLD44 Line Driver
Griffin Radioshark (reboxed)

Reboxing a RadioShark USB Radio for use in a automotive entertainment PC (CarPC)

this post is cloned from

I’ve had good luck with this

I recently reboxed my radioshark as well.

The reception has vastly improved. I added a motorola connector to the FM and a new AM loop that I snagged from a indoor tuner.

I noticed some confusion about where to wire up the FM leads (AM leads are a no brainer). I found an alternate ground, the square hole open on the top of the board where it is labelled J9. So, the center pole of the motorola connector is soldered to the board where it is marked FM, and the outer ring of the connector to the new alternate ground I found on the RadioShark board.

UPDATE: I’m now wondering if using the vehicle’s ground might improve reception – maybe utilizing the metal on the car as antenna might not be a bad thing… of course, could add tremendous amounts of noise and interference…

I haven’t run the car outside of the garage with the RS hooked up, so I don’t know how reception is affected when the car is moving, but in my garage the FM reception is pretty good. I’m still fiddling with AM, as I’d like to mount the loop under my dash. Problem is that the station I listen to the most comes in best when the loop is standing up in a way that would be impossible to mount… maybe things will improve when I get fully installed and moving on the road. If not, I may look into wiring into the rear defroster for use as the AM loop.

UPDATE2: Do NOT ground the antenna to the vehicle’s ground.  It won’t do you any good.