Tag Archive for hack

Remote shutter release adapter for Lumix G1

I’ve got a growing list of camera-related things I’d like to try, and the lack of a way to trigger the shutter for my Panasonic Lumix G1 has become a real annoyance. Unfortunately, Panasonic only offers one option, a wired remote shutter release that costs $80, though you can get it some places for a mere $50.

Fortunately, there’s another option, detailed in this blog post:
http://ranger9.net/?p=906

It’s a simple multi-resistance control, connecting various resistances across one circuit and allowing multiple functions to be controlled with one pair of wires…the second “ring” contact and the “sleeve” contact of the 4-contact 2.5 mm TRRS (“phone” or “phono”) plug. I’m not sure the high resistance has any use, it may allow the camera to detect that an external shutter release is plugged in. Closing the circuit with a 5 kohm resistance signals a half press of the shutter button, and a 2 kohm resistance signals a full press. A few resistors is all that is required to convert it to switch closure control. The second ring contact (connected to the 30-40 kohm resistor) appears to be the ground…this is unimportant if using relays or pushbutton switches, but needs to be accounted for if using transistors or optoisolators.

The main problem is the 2.5 mm TRRS plug used. I was unable to find one of the corded adapters he used, but found a cheap $20 Rocketfish headset that included an adapter. On opening, it proved to be a one-piece plug adapter, but I was able to cut it apart into a separate 3.5 mm jack and 2.5 mm plug. The wires connecting the two were potted in a thermoplastic compound…softening it with heat let me strip much of the bulk off with pliers, prying and cutting with a razor knife did the rest. Given how much trouble it was to get ahold of the 2.5 mm plug, I made a single general-purpose adapter that I would be able to use with a variety of external triggers. I free-formed the adapter onto the plug using 4 resistors (a 15 kohm and 22 kohm in series for 37 kohm total, and a 3.3 kohm and 2.2 kohm) and a header socket, and encapsulated the whole thing in hot glue for a compact and solid adapter.

There’s easier ways to get the plugs, I was unlucky and in a hurry. To my surprise, Mouser does not seem to have these 2.5 mm plugs. DigiKey doesn’t seem to have them either, but does have cords with the required plugs:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=CP-254S-M/M-ND

Chop one of those in half, and for $6.09 you get two plugs with cords attached. Or you may just want to buy the jacks and use the cords whole…for some reason I’ve found the jacks much easier to find than the plugs.

Newark was the only place I found that actually has the plugs:

http://www.newark.com/pro-signal/psg01501/connector-rca-phono-plug-4way/dp/26M2022

http://www.newark.com/pro-signal/psg01491/plug-2-5mm-jack-4pole/dp/24M6363

Pictures:

WiFi Christmas Lights

While looking for something to do with my 3.5″ Insignia Infocast, I came across this post about some controllable RGB Christmas lights: http://www.deepdarc.com/2010/11/27/hacking-christmas-lights/

WiFi-enabled Christmas lights seemed like a good way to test out a variety of things, and hopefully something to show to family members who don’t quite get what I do for work and play (while I’m not sure that WiFi Christmas lights is the best example for this, it fit the season). The result didn’t see any use during Christmas, unfortunately…setting up a Linux machine on a wireless network via the command line is not as straightforward as I’d hoped, so it never got hooked up at my family’s place. I never got around to coding any lighting programs, so only the most basic functionality is actually implemented and tested. But those basics are there: a CGI program that runs on the Infocast (which is essentially a Chumby One, with a 454 MHz ARM processor, 64 MB of RAM, and a WiFi dongle), displaying a web page and sending I2C commands to an AVR Xmega board, which itself is loaded with firmware that communicates with the LED string. A hex inverter is used as a 5V driver for the LED string communications line, and to provide some measure of protection should mishaps occur while wiring things up.

The Infocast main board plugs neatly into a solderless breadboard with the addition of a couple right angle headers to the “mod port”. I used single-row headers on both sides of the board, the header on one side soldered in “backwards” and extended with a straight header to get the needed length and spacing. The result worked quite well:

The lights themselves have simply been modified to remove the original remote control receiver, replacing it with a bit of ribbon cable and a header connector for plugging into a solderless breadboard. This is not ideal…if the connector pulls out of the breadboard, I’ve got exposed pins with 5VDC and fairly high maximum current flailing around near my largely-3.3V Infocast and AVR. It’s far more secure than the first approach, which had the connectors attached straight to the thick, unwieldy light string cables, though:

The long green jumpers are the I2C lines, the small DIP IC is a hex inverter powered off the 5.6 V from the lights and driving the LED comm line. There’s a FTDI USB-serial module that takes up entirely too much board space, but gives a serial console into the Infocast/Chumby One board. The black box underneath is the case and power supply for a dead Ethernet switch, adapted as a base for the protoboards. (someday, I’ll stuff one of the USB-serial modules into that box as well and free up some board space)

The Xmega32A4 board is one of my own design, made with Eagle, boards done by Seeed Studio, and put together with a Home Depot heat gun. A good part of the goal with this project was simply to get an Xmega talking with the embedded Linux devices via I2C, as a general purpose controller/data acquisition peripheral. This turned out to be quite trouble-free, once I figured out that my I2C addresses needed to be shifted by one bit on the Linux side (for those unfamiliar with I2C, some things consider I2C addresses to be 8 bits with the LSB a read/write flag, others consider them to simply be 7-bit addresses with the flag considered separately).

Due to various delays with the toolchain (do not run Bingo’s toolchain build scripts from avrfreaks.net, they have an entertaining failure mode in which they crawl up your directory tree executing “rm -fr *” as they go, and the script maintainers refuse to recognize this as a significant problem…fortunately I was able to restore from a recent Time Machine backup, and am now using an old toolchain until I can build a newer one that works), wireless configuration, and general lack of time, the code is nowhere near a finished product, but here it is in all its hodge-podge, undocumented glory:
xmegaxmas.tgz

Insignia Infocast

A.K.A. “BB8″, for “Best Buy 8-inch”.
First off, it’s not an alarm clock. For some reason a lot of people seem to mistake it for one. The Insignia Infocast is a Best-Buy branded Chumby device, an “internet media terminal”. It runs Linux on a 800 MHz Marvell PXA168 ARM9, has a 800×600 color touchscreen, 2 GB internal storage (on a microSD card that can easily be swapped out), 128 MB RAM, Compact Flash, SD, 2 USB 2.0 host ports, etc. And it’s extremely hackable. The board has labeled headers for an I2C bus, a 115200 8N1 USART, and 4 GPIO pins (and a good number of other GPIOs scattered around the board that could be repurposed if needed), and there’s source code with examples of using these. The whole thing runs off 5V DC, powered out of the box from a wall-wart, with a coin cell battery for RTC backup. I don’t know yet how much power it needs, but converting it for battery operation should be trivial.

For a piece of consumer electronics sold by Best Buy, it is surprisingly fast and easy to get into…nothing to jailbreak, there’s an easter egg of sorts that lets you in. Once the device is up and running, go to the apps screen, press the logo in the corner to bring up the device info screen, press the pi icon in the upper right corner to bring up a hidden control panel, and press the sshd button to enable SSH login. Log in via SSH (no password needed), type “make” or “gcc”, and it will offer to download and install a toolchain for you. It’s got enough CPU, RAM, and storage space that you don’t necessarily need a cross-compiler, you can do everything on the device itself.

The bottom is held on by four screws hidden under the rubber feet, and one snap-latch at the back near the USB ports…relocate the feet, remove the screws, and pry a bit with a flat-blade screwdriver to get it open. There’s some ventilation slots on the bottom with plastic cover bits that can be easily snapped off with pliers, letting you snake ribbon cables from the serial and I2C/GPIO headers through to the outside world.

The device uses an AU6350 for the USB ports and card slots. For Compact Flash, this chip is limited to PIO mode 6…so there’s no reason to go for an expensive card faster than 25 MB/s (and it’s entirely possible the actual bottleneck would be between this chip and the processor). I haven’t discovered if it would be possible to boot directly from a card, but you can put your own stuff on the card and overlay it over the file system with UnionFS as detailed in this forum post. A current oddity of the software is that it won’t automatically mount a SD card if it’s in the slot at boot, but I did get it to automatically mount the CF card…this may have to do with the fact that I formatted the card as ext3. This is something that merits further investigation.

Some detailed information here, including I2C source code, pictures of the main board, and schematics of the reference platform: http://www.bunniestudios.com/blog/?p=1140