Singapore Mini Maker Faire 2012

I live in Singapore but only found out about the Singapore Mini Maker Faire 2012 from a DangerousPrototypes blog post. It’s happening this weekend (4th and 5th August 2012) at the Science Centre, 10am – 5 pm. Admission charges to the Science Centre applies.

Infrared Remote Control Protocols: Part 1

As I was perusing the SB-‍Projects site on the different IR protocol formats, I decided to make a summary but later found out that it was a pretty standard thing, as documented by a Vishay document “Data Formats for IR Remote Control” (pdf).

The infrared remote control signals are layered on top of a carrier signal of 36 or 38 kHz, therefore the signal can only be “on” or “off”. A transmission typically starts with an a burst (“on” state) that is used for the Automatic Gain Control (AGC) circuitry in the receiver, followed by the “off” state and the actual data transmission.

There are 3 basic types of data transmission formats, which are illustrated in the following diagram. Protocols can be based on these transmission formats, but need not necessarily conform to them.

Illustration of IR data transmission protocols: manchester encoding, pulse distance coding and pulse length coding.

So how do you know what your remote control uses? And how do you capture the sequence so that you can re-transmit it from an IR diode?

Continue reading "Infrared Remote Control Protocols: Part 1"

Adobe Flash Player is Crap

It seems that Adobe has been releasing Flash Player updates very often, and it’s getting a little irritating since I told it to “notify me to install updates”. I’m generally very against software that automatically updates itself (like Google Chrome). So recently an update popped up a couple of days ago, and I went ahead to install it. What’s really irritating is that it doesn’t keep my preference of “update method”.

Continue reading "Adobe Flash Player is Crap"

The Apple 30-pin Dock Connector

The 30-pin dock connector first appeared on the iPod 3G in 2003, and has been on all iPods, iPhones and iPads ever since, with the sole exception of the first generation iPod Shuffle. The first gen Shuffle looks like a thumbdrive (or what some would call a pen drive) and used a USB male connector, whereas the first and second generation iPods had a FireWire port at the top.

iPod Accessory Protocol

Since its introduction, Apple made several minor modifications to the electronics interface of the dock connector, but the physical connector itself remains unchanged. Collectively, this and the communications protocol is called the iPod Accessory Protocol (iAP).

Initially, they introduced different resistor values on the “accessory detect” pin when they allowed third-party companies to make docks and car adapters. At that time, the dock connector mainly had audio in and line out functionality (connected to the back of the docks), as well as a serial interface for remote control via the dock. The serial protocol was largely reverse-engineered by maushammer (website no longer accessible) and this guy here (I think he’s called Christoph but it’s not on that page). This was also used by car manufacturers to allow iPod playback control from buttons on the steering wheel.

When Apple released the iPod Video that was capable of playing videos in 2005, they added video out (composite and S-‍video), as well as an authentication chip to allow only authorized docks and cables to receive video out (including audio). Soon enough, China caught up with their release of “authorized” accessories, which contain the authentication chip that can be re-purposed for other use.

authentication chip Authentication chip (image from thice.nl)

Presumably, that was also when they added USB support for iAP, which I’m pretty sure also requires an authentication chip. USB support would allow a host to communicate and control the iPod through a USB cable. My car stereo correctly recognizes the iPhone as an iPod over a USB cable.

The iPod Camera Connector was also introduced for the iPod Photo and iPod Video in 2005. This was a small “dongle” that has a dock connector on one end and a USB port on the other. Oddly, according to an Everymac article, later iPods released in 2006 do not support this accessory any more. It is unknown if they somehow switched the USB interface to host mode, or if they used a separate chip to emulate this.

In 2008, charging via FireWire was no longer supported with the introduction of the 2nd generation iPod Touch and 4th generation iPod Nano. The pins dedicated to FireWire in the dock connector are now unused.

Continue reading "The Apple 30-pin Dock Connector"

DIY Optical Slave Flash

I found a couple of old disposable cameras in storage that I played around with 15 years ago, shorting the caps to make a loud bang, wiring up the flash trigger to a remote-controlled relay kit I had assembled. I thought I’d do something useful with them.

I decided to turn them into optical slave flashes, since on-camera flashes are not very flexible. I was thinking of a way to detect the camera flash so that the slave could be fired, maybe using an LDR with the ADC to detect an increase in light intensity? It turns out there’s an even easier way to do this - with an infrared sensor. Apparently when flash tubes are fired, they give off infrared which can be detected more reliably than light intensity changes. When I read about this, I tested it out with a simple Arduino sketch and it works as advertised.

Disposable cameras usually have metal contacts that are placed near the shutter mechanism. When the shutter opens, the contacts are closed and if the flash was charged it would fire. To control the flash firing, I replaced the contacts with an SCR.

Continue reading "DIY Optical Slave Flash"

Debugging Fun with JNI

Our proprietary system, written in a mix of Java and C++, was crashing quite often. It only started happening after some new features were added, so naturally that became the prime suspect, but my colleague claimed it was because the process ran out of memory. I wrote a small test case to see if an out-of-memory situation would cause this, and true enough, it did. The JVM generated a crash log file that looked like this (I’ve omitted the unimportant parts):

Continue reading "Debugging Fun with JNI"

Logic Analyzer Software Review

I was looking into the Openbench Logic Sniffer (OLS) client, an open source logic analyzer software to be used with the Logic Sniffer from Dangerous Prototypes and Gadget Factory, so I thought it might be worthwhile to look at other alternatives, including commercial products. In the next few posts, it will probably become obvious why I’m doing this.

Since I do not have any of the hardware, I must make it clear that I am only reviewing the software that is meant to be used with their analyzers. Good logic analyzer products will usually make their software available free, with either some demo files or a means to generate random or test waveforms.

Continue reading "Logic Analyzer Software Review"

Voltage Regulation: Zener Diodes vs. LEDs

I was prototyping a circuit on a piece of veroboard using SMD components and I needed a 2 V supply from my FTDI cable. Of course I didn’t have any SMD regulators handy, so I thought I would use the simplest regulator - a zener diode. But it’s not like I have a 2 V zener diode lying around either, so I thought maybe I could use an LED instead, since its forward voltage is close to 2 V (for the red/green ones).

Continue reading "Voltage Regulation: Zener Diodes vs. LEDs"

Don't Use Power Drills as Screwdrivers!

I think people who use power drills with those screwdriver “drill bits” are just plain lazy. I had a new ceiling fan installed yesterday, and the installation guy came over with a power drill fitted with the Phillips screwdriver bit to do his job, and he used it on everything. The fan came with the blades and motor hub separately, so some assembly was required. Just have a look at the result.

Continue reading "Don't Use Power Drills as Screwdrivers!"

Mac Battery Firmware Hacking

[youtube=http://www.youtube.com/watch?v=bc1EU5GTbLE] Charlie Miller reverse engineers the Mac battery firmware updater, sniffs battery communications on the SMBus, writes an IDA processor plugin (in IDAPython) for the CoolRISC 816 processor in the bq20z80, and mucks around with the its firmware. All the source code and presentation materials are provided. [via Dangerous Prototypes]