HiJack In the Box – Part 1 – iPhone HiJack Tutorial
August 21, 2011
Another weekend tutorial!
This time, I would be demonstrating HiJack, a device that can integrate sensors to your iOS gadget using only the headphone jack. Isn’t it amazing? For more details about the project, you can visit the HiJack project site and also Seeedstudio on where I got this amazing product from.
The HiJack is a nice platform to build external sensors that can provide analog input iOS device. You can do lots of analog-ish devices like temperature sensors, moisture sensors, humidity sensor, etc.. So why this? I can opt to do sensors through iPhone SoftModem (waay cheaper) but it would need an external controller board (like Arduino) and an external power source.
Lets get it on!
The prerequisites for this demo are:
- Follow Seeedstudio’s procedure on loading the firmware of the HiJack mainboard (you have to make sure, mine was not loaded).
- Download the HiJack application from iTunes, it is free don’t worry.
- Get any rotary potentiometer, I know you have somewhere stashed on your bin. It does not matter what value, I used a 5kOhm one.
- Get some jumper wires. I used 1 pin female wires for easier setup.
- You can use a breadboard if needed
For this demo, we would be using a rotary potentiometer, which will emulate an analog input device for us. We can wire up the pot as below:
Following Seeedstudio’s schematic diagram for the HiJack mainboard, we will connect the potentiometer to the GND, VCC and A6 pins on the HiJack device. For the uninitiated, we can say that the middle pin on the potentiometer connects to the A6 pin and the two other pins can connect to either GND and VCC.
This is from Seeedstudio
After wiring it up, you may now start the HiJack app on the iOS device and play around with it:
And that’s the end of the tutorial right?
Hmm so what better way to play around with it than testing it with an oscilloscope!
My bear likes to see the squiggly lines of the oscilloscope:
It may be a bit of a paradigm because it would be an oscilloscope testing an oscilloscope:
I connected the probes to the A6 and GND pins and started the signal generator to put out 10hz (it is the lowest possible frequency that the Seeedstudio DSO Nano 2 can produce):
True to the test, the HiJack app can detect the 10hz frequency. But let us try out the other pins
From the output jack, we can see the 22khz frequency which is used to power the device:
Below is the mic pin:
Each L and R pins output a different signal:
But I won’t care for now as I don’t know anything about what protocols the HiJack device uses to communicate with the iOS.
For the next part, we will try to create our own iPhone app to interface with the HiJack! Great!