Project HiJack uses iPhone audio jack to make cheap sensors

Students and faculty at the University of Michigan have developed a method to …

Making accessories that tie into an iOS device's Dock connector is an expensive proposition: it requires getting certain components from Apple and applying for a costly "Made for iPhone" (or iPod or iPad) license. However, it is possible to use the headphone jack for two-way data communication with an iPhone and also to power small electronic circuits. A group of students and faculty from the University of Michigan's Electrical Engineering and Computer Science Department have developed a small device it calls the "HiJack" to make sensing peripherals easily accessible to those on a tight budget.

Project HiJack is a hardware and software platform for enabling communication between a small, low-power peripheral and an iDevice. The system uses a 22kHz audio signal, which is converted into 7.4mW of power at 47 percent efficiency. That power runs a TI MSP430 microcontroller as well as any attached electronics, and allows the HiJack to communicate with an iOS application. The components to build a HiJack cost as little as $2.34 in significant quantities.

Other peripherals have used a similar technique to draw power and communicate with mobile devices. Mobile payment processing startup Square uses a small device to read the magnetic stripes on credit cards—it is powered by the headphone jack on an iPhone or other mobile device. There is also a low-power FM transmitter for some iPod models that is powered by the headphone jack.

Project HiJack integrated prototype

The team behind Project HiJack envisions users building low-cost sensing and data acquisition systems for student and laboratory use. So far, it has built an EKG interface, soil moisture sensor, an integrated prototype with temperature/humidity sensors, PIR motion sensor, and potentiometer, and a version with a breadboard for prototyping new sensor applications.

Schematics for the HiJack board, as well as source code to enable communication via the audio port, are available on Google Code so that anyone with some soldering skills and the wherewithal can build a HiJack for his or her own use. Currently, software exists to work on iOS, but the hardware design should work with nearly any mobile device that has a combination headphone/microphone jack. The team plans to build APIs to enable the HiJack to work on Android and Windows Phone 7 in the future.

There is a way to get a HiJack for an iOS device without making one yourself, though: the team is putting 20 prebuilt and assembled HiJack boards up for grabs to those who submit a proposal for how they would use it. If your proposal is selected, you have to agree to two conditions: release any code for your project as open source, and let the team document your project on its website.

Latest Ars Video >

War Stories | Thief: The Dark Project

1998's Thief: The Dark Project was a pioneer for the stealth genre, utilizing light and shadow as essential gameplay mechanics. The very thing that Thief became so well-known for was also the game's biggest development hurdle. Looking Glass Studios founder Paul Neurath recounts the difficulties creating Thief: The Dark Project, and how its AI systems had to be completely rewritten years into development.

War Stories | Thief: The Dark Project

War Stories | Thief: The Dark Project

1998's Thief: The Dark Project was a pioneer for the stealth genre, utilizing light and shadow as essential gameplay mechanics. The very thing that Thief became so well-known for was also the game's biggest development hurdle. Looking Glass Studios founder Paul Neurath recounts the difficulties creating Thief: The Dark Project, and how its AI systems had to be completely rewritten years into development.

while i applaud the cleverness involved, it it sad that such a restricted platform gets so much attention that people will apply this level of creativity rather then look for a less restrictive option.

while i applaud the cleverness involved, it it sad that such a restricted platform gets so much attention that people will apply this level of creativity rather then look for a less restrictive option.

Maybe that's exactly why they're doing it. It's challenging to figure out and probably made a great class project.

Maybe that's exactly why they're doing it. It's challenging to figure out and probably made a great class project.

I expect they're doing it on iOS because that's the platform more students have. Also, you don't have to own an expensive contract phone to use it, you can just buy an iPod touch instead.

But yeah, it seems like a good fit for an Android API. It would be nice to feed that data into a scriptable data logger, and there's limits to how far you can take that with Apple's stupid App Store restrictions.

Its proven it again ... the more difficult you make it for people to get to the core ... the more people will try to crack it. But I have to agree with hobgoblin ... the product is inferior! However, what it really shows is what we are up for in the future ... What we are CURRENTLY doing with mobile phones is only a small percentage of what we will be using them for in 5 years time.

From the article:"A group of students and faculty from the University of Michigan's Electrical Engineering and Computer Science Department have developed a small device it calls the "HiJack" to make sensing peripherals easily accessible to those on a tight budget."

Uhh...electrical engineering and computer science students designing electronics and computer programs. Yeah, that totally sounds like the wrong thing for students to work on.

while i applaud the cleverness involved, it it sad that such a restricted platform gets so much attention that people will apply this level of creativity rather then look for a less restrictive option.

The sad part is that the disapproval your ideology demands comes before appreciation of the achievement. Engineers look for ubiquitous, cheap and effective and this is an awesome hack. It's BSD licensed so go do something positive and write a driver stack for some open platform!

while i applaud the cleverness involved, it it sad that such a restricted platform gets so much attention that people will apply this level of creativity rather then look for a less restrictive option.

The sad part is that the disapproval your ideology demands comes before appreciation of the achievement. Engineers look for ubiquitous, cheap and effective and this is an awesome hack. It's BSD licensed so go do something positive and write a driver stack for some open platform!

Why should i do so when they could have done so in the first place and saved us all a bunch of extra effort?

I'm surprised the iDevice can use the headphone jack as an input. I can understand generating a tone that can be converted to power, but how do they read the response? Is there a mic line in the headphone jack that it's being transmitted on?

It is hard for me to imagine the potential uses for this--which makes the examples given most appreciated --but the fact that you can circumvent the whole 'made for XX' licensing crap is pretty spectacular. Of course, I expect Apple to nuke any application that uses these devices in the app store, so this would be more for jailbroken idevices, no?

I'm surprised the iDevice can use the headphone jack as an input. I can understand generating a tone that can be converted to power, but how do they read the response? Is there a mic line in the headphone jack that it's being transmitted on?

Yeah, it has a mic in line

bedward wrote:

clackerd wrote:

Maybe that's exactly why they're doing it. It's challenging to figure out and probably made a great class project.

I expect they're doing it on iOS because that's the platform more students have. Also, you don't have to own an expensive contract phone to use it, you can just buy an iPod touch instead.

But yeah, it seems like a good fit for an Android API. It would be nice to feed that data into a scriptable data logger, and there's limits to how far you can take that with Apple's stupid App Store restrictions.

What exactly would they use for data transfer?The usb port? Nope, one way.Bluetooth? Expensive, and difficultWifi? ^sameHeadphone and microphone jack? Well were back where we started. Also, Apples audio Api's are still better than Androids, and don't require a contract.

usb port, one way? Err, that depends on it being otg or not. Hell, it may even run full host if it gets the right flag set.

While that is true, OTG usb is an absolute rarity in phones today. All I was able to find was 6 Nokia Phones and the Dell Streak. Android doesn't currently support USB host mode either and implementing communication via USB is also expensive and difficult (in technicallity you have to get a vendor ID from USB-IF which is $2000 every two years). I think the use of the headphone port is ingenious. As the device will also work on more platforms than the iPhone with out any hardware changes.

William Topping wrote:

USB is not one way data transfer, I have no idea where you get that from.

I do not mean one way as in data transfer. Usb generally operates in a Master/Slave mode. Unlike for example firewire and ethernet that work in a more P2P method. In USB, except when OTG is supported a device is made to only operate in either the Master or Slave mode and the device is given the proper port for it. For example on a computer you have a standard female USB port, but on your printer you have a female USB-B port.

Of course, I expect Apple to nuke any application that uses these devices in the app store, so this would be more for jailbroken idevices, no?

Well, the good news is that Apple does not appear to be blocking apps that use similar hardware components. The application raboof pointed out in the third post is one such application. And my, I wish it were available in Australia!

I'm surprised the iDevice can use the headphone jack as an input. I can understand generating a tone that can be converted to power, but how do they read the response? Is there a mic line in the headphone jack that it's being transmitted on?

What exactly would they use for data transfer?The usb port? Nope, one way.Bluetooth? Expensive, and difficultWifi? ^sameHeadphone and microphone jack? Well were back where we started. Also, Apples audio Api's are still better than Androids, and don't require a contract.

API quality I know nothing about, so I'll bow to your point there. But even if you don't need a hardware contract you do need to get your app into the App Store. Which means you can't create a programable data logger, it has to be something more basic / less functional.

Still, I'd say the ubiquity and consistency of the iPhone and iPod Touch makes it a reasonable platform for this project in general, it's just that "no programmable apps" thing that would be a bit of a letdown.

API quality I know nothing about, so I'll bow to your point there. But even if you don't need a hardware contract you do need to get your app into the App Store. Which means you can't create a programable data logger, it has to be something more basic / less functional.

There is more developer programs than the standard program. There is the university program which is free for any staff or student in an educational institution. It allows you to install to 100 devices without going through the app store. There is also the enterprise program which costs $299 a year and lets you deploy your app to an unlimited amount of iOS devices, without going through the app store.

while i applaud the cleverness involved, it it sad that such a restricted platform gets so much attention that people will apply this level of creativity rather then look for a less restrictive option.

The sad part is that the disapproval your ideology demands comes before appreciation of the achievement. Engineers look for ubiquitous, cheap and effective and this is an awesome hack. It's BSD licensed so go do something positive and write a driver stack for some open platform!

Why should i do so when they could have done so in the first place and saved us all a bunch of extra effort?

Because you don't shit a gift horse in the mouth, is why. These kids did all the hard work. You want it to work on something else? Build on what they're giving you.

Ars of Ares wrote:

It is hard for me to imagine the potential uses for this--which makes the examples given most appreciated --but the fact that you can circumvent the whole 'made for XX' licensing crap is pretty spectacular. Of course, I expect Apple to nuke any application that uses these devices in the app store, so this would be more for jailbroken idevices, no?

Not necessarily, no. As I understand it companies and schools and such are allowed to publish their own in-house applications to any iOS devices linked to their company/school. They're not in the general App Store, but in their private repository.

Excellent paper on Hijacking Power and Bandwidth from the Mobile Phone’s Audio Interface.

Mobile payment processing startup FocusPay also uses a small device to read the magnetic stripes on credit cards—it is powered by the headphone jack on an iPhone, Blackberry, and Android and other mobile devices. More info at www.focuspay.com

There is more developer programs than the standard program. There is the university program which is free for any staff or student in an educational institution. It allows you to install to 100 devices without going through the app store. There is also the enterprise program which costs $299 a year and lets you deploy your app to an unlimited amount of iOS devices, without going through the app store.

The university program could be useful but it's still a pale imitation of actually controlling your own devices. Want to share your code with, say, high schools? Oops, sorry, no luck.

And the enterprise program is only available to DUNS-listed corporations and apps can only be used on devices owned by the corporation. That's not very relevant for this type of project. I really have to wonder who would invest any significant time and effort in the enterprise program. I mean, it isn't like it's unheard of for Apple to change its rules without warning. Build a mission critical iPhone app and then have Apple decide they don't like your development toolkit? Oops again! Have fun reimplementing.

App Store lock-in is my only complaint with the iPhone. It's the one thing I could see driving me over to Android someday. Well, I'd like to have an "Android Touch" to play with, but that's just me being a gadget hound.

while i applaud the cleverness involved, it it sad that such a restricted platform gets so much attention that people will apply this level of creativity rather then look for a less restrictive option.

The sad part is that the disapproval your ideology demands comes before appreciation of the achievement. Engineers look for ubiquitous, cheap and effective and this is an awesome hack. It's BSD licensed so go do something positive and write a driver stack for some open platform!

Why should i do so when they could have done so in the first place and saved us all a bunch of extra effort?

Because it's their project and they choose (chose) the device.Also, Apple has a deep history of providing support and hardware to educational institutions. 'just sayin...