We are making a circuit which harvests power from an audio jack.
The growing prevalence of smartphones, even in developing regions of the world, means that using an audio jack for power could meaningfully impact individuals the world over by providing a small source of DC power.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: What You Need
Oscilloscope & lead wires
Device that plays audio and takes microphone over a 3.5mm audio jack (we are using a Samsung Galaxy Vibrant).
3.5mm TRRS Audio Cable (1)
Varied values of resistors, between 1Ω and 15 kΩ
1.5 mH inductor (1)
Schottky diodes (4)
You can use a breadboard. If you’ve never used one before, see https://www.instructables.com/id/Breadboard-How-To/.
You can use an oscilloscope. If you’ve never used one before, see https://www.instructables.com/id/Oscilloscope-How-To/.
Step 2: Measure Device Impedance
Why: In order to harvest the maximum power from your phone's audio jack, you need the impedance of your entire circuit to be equal to the internal impedance of your device. For more background on this, see the Wikipedia pages “Impedance Matching” and “Maximum power transfer theorem”.
Theory: In order to measure the impedance of the device, we will perform a sweep of different resistances. We are going to build a voltage divider (see the hand-sketched circuit diagram) by putting different resistors across the ground and signal wires of the audio cable while it is transmitting, and measuring the voltage drop across the resistor. We will record the amplitude of the voltage, convert it into power, and then calculate which resistance gives us the maximum power. This resistance is the impedance of your device!
Practice: Download the “Favorite Frequencies” app from the Android marketplace, or a similar app for whatever device you are using. This will allow your device to play a known frequency. We are using 550 Hz, but based on research in “Hijacking Power and Bandwidth from the Mobile Phone’s Audio Interface”, anything in the audio range will do; the power should be independent of the frequency. This should make sense because if the power was frequency dependent, then the device would have to do some crazy things to output a steady volume for an audio file.
Set up a spreadsheet so you can see results as you get them: you’ll want to record resistance and voltage amplitude, then set up another column that calculates power: power = 1/2 * voltage^2 / resistance. In our case, we took down the CycRMS voltage (an output of the oscilloscope) so our power = CycRms ^ 2 / R.
Using your breadboard, plug in ground and signal, and attach oscilloscope leads to measure. Plug in your highest resistor across ground and signal and record its value and the output voltage amplitude.
Unplug this resistor and repeat with the next highest resistor, watching the power. The amount of power should increase, then begin to decrease, depending on whether you have matched the impedance of your device. Once the power starts to decrease, you can stop moving down the resistor scale: you want the resistor that gives you the maximum power. Our power graph is shown above.
This resistor value is the impedance of your device. We found the matching impedance of our Samsung Galaxy Vibrant to be about 15Ω.
Step 3: Step Up Voltage: Build a Transformer
Theory: A “transformer” is a pair of inductors interacting: it’s a couple of coils of wire whose magnetic fields affect each other, and thus whose electrical flows interact. Specifically, we will run input current through one inductor (coil of wire around a core), known as the “primary winding”. We will wind a separate coil of wire around that same core, concentrically using magnetic wire. This second coil (the “secondary winding”) will be our output.
We can calculate the parameters of our primary winding by first recognizing that we want to match the impedance of the phone (15Ω). In order to match the impedance of the phone for maximum power transfer, the AC impedance of the primary inductor (wL: http://hyperphysics.phy-astr.gsu.edu/hbase/electric/impl.html) must also equal 15Ω. We elect to design an inductor for an output frequency of 20 kHz because it was within the capabilities of our device.
Knowing the impedance and frequency going through our inductor, we decide the inductance of our primary winding to be 119 microH (L = 15Ω / (2 * pi * 20 kHz)). From the primary inductance, we decide that we want a 1:20 turn ratio to our secondary inductor in order to amplify the original 269 mV from the phone by a magnitude of 20 to a predicted 5.38 V which can satisfy the rails of most devices. Some notes to keep in mind:
- The audible range is between 16 Hz and 20 kHz. This is a relatively low frequency, which means that we want to make a transformer with a ferrite core. (Higher frequencies require a laminate core.)
- We want to step our voltage to a rail voltage. The change in voltage will have the same proportion as the ratio between the number of turns and also the impedances of the primary and secondary windings
Practice: The impedance of our sound card is 15Ω, so the impedance of our primary inductor is ideally 15Ω also (the impedance of the inductor will greatly outweigh impedance generated by other components in this section of the circuit so it’s the only one we have to worry about).
In practice, we realized that a transformer with a 1:20 turn ratio and a 119 microH primary inductance would be extremely difficult to make from scratch as we would be winding inductors by hand. Therefore we compromised with a pre-fabbed 1.5mH secondary inductor and wound our own primary inductor (95 microH). We felt we were within ballpark of the ideal values to proceed. If you desire more precise results, more exactitude will be required.
The resulting voltage after our transformer did not actually provide us with a 20x amplification from our input. Reasons for this discrepancy are still slightly foggy and can be attributed to the imprecision of our homemade parts.
“Clipping” occurs if the power is too high; see the last picture with the funky waveforms. If you get an output like this, reduce the power until you have a smoother output. For us, 55% of full volume (680 mV in) from the audio input gave us a clean output of 1.88 V at 20780 Hz, a 2.8x amplification.
Step 4: Rectify Voltage: Make a Diode Bridge
Why: Together with the filtering step later, this will form an AC to DC converter (your device outputs Alternating Current, which means it switches between positive and negative current; we want to harvest Direct Current, like the kind that you get from a battery). “Rectifying” voltage means making it all positive.
Theory: We are going to rectify the power by making a diode bridge. Diodes only let current travel in one direction across them. By hooking up diodes as in the circuit diagram shown above, we essentially take the absolute value of the signal, adding the positive and the negative pieces together.
Practice: The theory is sound; the diodes turn all of the voltage positive. However, because the diodes have an internal resistance, they draw some of the voltage, subtracting about 1.4 V from our amplitude. This left us with a maximum of 0.4 V of uneven DC voltage.
Step 5: Filtering: Capacitors (Smoothing Rectified Voltage)
Why: The output voltage from our diode bridge is all positive, but it has a rippled frequency. DC voltage is just a flat, positive line, so to complete our AC to DC converter, we need to smooth out the voltage using a reservoir capacitor.
Theory: Capacitors store charge and then release it. The value of the capacitor must be chosen so that the RC time constant of the will be much longer than the period of the rectified waveform.
Practice: Our transformer was unable to provide us with the predicted 1:20 amplification of our input voltage. Therefore, after the initial diode bridge rectifying stage, the amplitude of the DC ripple that we were experiencing with was not of significant worry to us to suggest a need for further filtering. Filtering would be a good idea, but we have a flat enough line that it is not necessary.
Step 6: Look at That DC Voltage!
What can you do with a small DC voltage?
Our system is pretty inefficient, but if we optimized it (read as: if we made the transformer of our dreams), we could probably expect something like 3-5 volts. That's enough to power LEDs and sensors.
The main point is, DC voltage from a smartphone's audio jack is portable!
Participated in the
Epilog Challenge V