I am a certified oscilloscope nut, who owns more of them than he needs and is always looking for another one. So when I learned that cheap scope and frequency analysis programs are available for smartphones I was smitten.  Unfortunately, the practical utility of the software by itself is limited. A pair of alligator clips connected to the audio jack will handle only a small range of low-voltage and low-impedance signals, could inject voltage from the phone into the external circuit, and might carry a risk of frying the phone.

This Instructable describes a preamplifier circuit for making smartphone scopes more versatile, more useful, and highly resistant to accidentally transferring lethal voltages into your audio jack.  The input impedance is increased from around 2 KΩ to 1 MΩ, the voltage range is 10 mV to 50 V or more, and the safe overload range is equal or higher.  The scale is easily calibrated with not much more than a volt-ohm meter (VOM.)  No software is included; why reinvent the wheel when good apps are already out there for many platforms at a few bucks—or even free?  The same basic circuit can be used, with minor changes, in many other systems including laptops, iPads, and Android tablets.

STANDARD WARNING:  the complete circuit and your phone should be safe from accidental overvoltages of reasonable magnitude. But I take no responsibility for any damage that may occur to you, the circuit, or the phone.  Nor can I guarantee that your particular brand/model phone will give good results. The frequency range will be limited by the parameters of your device; most should be usable from about 75 to 15,000 Hz (no DC).  UNDER NO CIRCUMSTANCES SHOULD THE PREAMP OR YOUR PHONE EVER BE CONNECTED TO THE AC WALL JACK OR POWER LINE.

Step 1: Parts and Tools

Mouser part numbers are listed because Mouser carries the special 4-contact audio plug that smartphones require. I advise that you not waste too much time soldering components together and drilling lots of holes in the box.  Leave the components permanently on the solderless protoboard/breadboard.  This saves a lot of effort and grief correcting mistakes and modifying the circuit, and can last for years. A see-through plastic box lets you leave the LEDs right on the breadboard as well.

Minimal Circuit –  $12-15
-Miscellaneous wiring.  Old audio cables (the kind with RCA plugs) are good for the input and output leads.
-Small alligator clips (2)
-SPST “on-off” switch
-Solderless breadboard [Mouser 510-EXP-350E, $5.00]
-Resistors, ¼  watt: 1.5 KΩ, 22 KΩ (2)
-1 MΩ linear trimpot [Mouser 652 -3352P -1-105LF, $1.24]
-4.7 uF capacitor [Mouser 810-FK18X5R1A475K, $.17]
- TLC272 dual op amp [Mouser 595-TLC272IP, $.71]
-3.5 mm 4-conductor (TRRR) audio plug [Mouser 171-7435-EX, $2.60]
[-3.5 mm 3-conductor (TRR) stereo audio plug for calibration signals – OPTIONAL]
-9V battery clip
-9V battery
-Small clear plastic box. I used a 2.5 by 3.25 inch “Really Useful Box” from Office Depot, $1.29.  This is about as tight as you can get.

#soldering iron
#volt-ohm meter (VOM) for calibrating and troubleshooting

Full Circuit – additional parts about $3.00
-bipolar LED [ Mouser 604-WP57YYD, $.46]
-blinking LED [Mouser 696-SSL-LX5093BSRD $.87]
-0.1 uF 100v capacitor [Mouser 594-A104K15X7RH5TAAV, $.50]
-Resistors, ¼ watt: 560 Ω, 330 Ω, 3.3 KΩ, 33 KΩ, 330 KΩ
-6.0 V 1/2 watt zener diode [Mouser 512-1N5233BTR $.05]
[-3.5 V  ½ watt zeners (2) [Mouser 771-NZX3V0B,133, $.03 each - OPTIONAL]
-SPDT “range” switch


<p>very impressive. thumbs up</p>
<p>Finally, I made it :D</p><p>sorry for bombarding you with my silly questions, this is my first Op amp circuit and I am so excited about it :)</p><p>I finally built the full circuit dropping the zeners and using two normal inversed-polarity leds instead of the bipolar one. I figured out the I mixed up between -ve and Gnd and I had no good understanding about the need of common, -ve and +ve for those op amps. After fixing that (and frying a jrc4558) , My problem was not the connection itself but the jrc4558 op amp which worked for a while and got fried twice for an unknown reason while measuring a square wave produced by ic555 timer (why?) !!! I replaced it with lf353N and it works ok! When I put the jrc4558 it ges very hot and it would blow(why?)</p><p>Notes and Questions:</p><p>0- I used a 4.7uF capacitor because I couldn't find a ceramic with this value. Is it possible to use a 470nf ceramic? What might be the effect on the circuit?</p><p>1- I noticed that using the fl353N doesn't indicate the presice frequency generated by my phone, while the freq. meter on my multimeter reads 1000hz the Oscillscope pro app reads 1047 and fluctuating +-20Hz (is it really the op amp fault?)</p><p>2-The wave shape changes when changing from Hi to Lo input at the same generated wave, why?</p><p>3- I couldn't understand the callibration part, I measured the AC voltage of the 1000Hz sin wave from my ipad it was 0.245v , to callibrate the Oscilloscope app, where is the voltage indicated in the app? If it was the one reading delta m V then it is fluctuating so much that I can't know which is the correct value. What's missing??</p><p>I would really appreciate it If you could discibe the process step by step so that my project is fully completed(thanks to you)</p>
<p>what other component can I used in replace with op amp tlc 272? thank you</p>
Rather than me trying to guess what your problem might be with the TLC 272, and then generating a list of possible alternatives, it might be more efficient for you to explain why that chip won't work and list what alternatives are available to you.
<p>Great instructable is should say :)</p><p>In my country I couldn't fine this chip , but i found 4558d JRC dual op amp.</p><p>1- Is it ok to use it? what are the possible effects.</p><p>2- Also, I couldn't find a 1M pot but I do have a 500K pot and many resistors, can I use a 500K resistor in series with the 500K pot to create a 1M resistance in total?</p>
<p>The 4558d is a very old chip that is listed to to need a minimum &plusmn;5 V power, so it might be marginal here. But my guess is it will be OK. The 500K pot by itself should be OK too. Good luck.</p>
<p>so I built the minimal circuit using the 4558d and i used a 9v battery with the same schematics but the problem is that the chip gets hot and i dont know if thats normal or not, also i replaced the 9v battery with an 11v from an adjustable ATX power source which made the chip very very hot!!</p><p>Whats going on??</p><p>Also, I noticed that the battery gives more cleaner signal than the atx ( connected to mains)</p>
<p>The chip should not get hot. Something is very wrong with your circuit.</p>
<p>Ok, lets diagnose the problem.</p><p>What i have done was</p><p>1) I replaced the ceramic capacitor (4.7uf) with a polarized one where the posative terminal connects to the led (two parrallel leds inversed in polarities) and its negative terminal connects to the 1.5k resistor then the resistor to the negative of the battery (ground)</p><p>2) I couldn't find a bipolar led so i used to normal leds in parallel each with inversed polariy meaning if enough voltage were passing one of them should be lit depending on the direction of current i guess </p><p>The rest to the circuit is the same as the full circuit without the zener Diodes and the power indicator led.</p><p>+ve of battery directly connects to pin8</p><p>-ve of battery is connected to the ground os the circuit </p><p>One Oscope testing probe is connected to the ground </p><p>The other probe connects to the pot thrugh a 0.1 uf cap</p><p>Ground of the trrs connects to ground of circuit(negative of battery)</p><p>Mic line connects to the negative side of the polarized 4.7uf cap (before the resistor 1.5k)</p><p>What did i do wrong and Any suggestions to fix it is appreciated</p>
<p>Thank you chipstein, </p><p>I found a 1m ohm pot today. I will start building the circuit soon and I'll update you with the results (hopefully the chip will work)</p>
why you are used zener diod??
<p>now make a module for the lg g5 :)</p>
<p>Hello, really thanks for this simple and useful project. <br>My question: the circuit works it shows waves correctly but after some time (and sometime almost immediately) it starts dialing the last phone number. It happens so often that I can not use it. Sometime it&acute;s necessary to restart the phone, because it tends to dial the number even after the preamp is disconnected.</p><p>I have HTC 601 phone. Does anybody have such problem? Any idea what to do? </p><p>But anyway, thank you a lot, if even it will not work perfectly I got a lot of important knowledges.</p>
Pavelpick, I had never heard of this before! But a quick google search showed that this is a known problem with the HTC headphone jack and suggested a solution. See http://android.stackexchange.com/questions/22833/when-i-plug-in-earphones-into-my-htc-desire-s-it-dials-the-phone<br> Hope that fixes it.<br>
<p>I think it helped. But it is also possible that there was some soldering or other technical problem on the pcb bringing higher voltage to the phone. You ware soooo right that making the circuit on the pcb can couse a lot of troubles. And I really spent so long time to find all the mistakes. A good lesson to me.<br>But now is the device in the box and I hope it will help me with my future project. <br>Thanks for your patient replies for our questions. </p>
<p>question why my preamp of my cellphone got been destroyed I mean it time to time the preamp overheat and pop!! And I can't use it why did just happening is there a problem with pot resistance what happen if I low resistance about 5k it will work???</p>
aalejo, I'm sorry you are having trouble. This is not nearly enough information for me or other readers to help. You should NOT lower the pot resistance to 5K. That resistance is part of the protection against excess voltage.
<p>Amazing Instructable ! :)</p><p>I used it for my latest project : <a href="http://www.instructables.com/id/OscilloPhone-Use-your-Smartphone-as-an-Oscilloscop/" rel="nofollow">OscilloPhone: Use your Smartphone as an Oscilloscope / Signal Generator</a></p>
<p>Hi loboat. I would like to know if you have like a page where you share your projects. I would like to contact you and ask for some help because I&acute;m trying to know more about the way you show the signal in the phone. </p><p>I would aprecciate it a lot. </p>
Carlos, I think you ended up on the wrong project page. This is where ioboat commented on my project. Go to the link in his comment.
<p>what is the software for iphone?! </p>
Oscilloscope and e-scope work on my iPad. Several others on the App Store look promising.
<p>Aww, that's cute. You actually think the iPhone can do more than look pretty.</p>
<p>Hi,</p><p>This is a great article. I built it today and it works well. However I think it is worth pointing out that it is very important to use a 1.5K resistor on the output. I didnt have one so used a 1K. This resulted in me spending an hour or so wondering why the phone did not select the external microphone input. It turns out that my Samsung phone expects at least 1.5K across the external mic input before it senses that an exernal mic is present.</p><p>So perhaps you could add a note about this to avoid anyone else having a similar problem.</p><p>Cheers,</p><p>David.</p>
Hi David, Thanks for having added that note yourself with this comment. The sensing circuits for external mikes are a pain in the neck, and they also contribute to poor low-frequency performance wherever they are used. I hope that everybody building this circuit reads the comments and the section on troubleshooting if they need it. Chip
<p>Hey, i found only a bipolar LED which needs 2,5V instead of 2,1V:</p><p><a href="http://www.reichelt.de/LEDs-Blink-Multi-Color/LED-3-RY/3/index.html?&ACTION=3&LA=5&ARTICLE=76978&GROUPID=3022&artnr=LED+3+RY" rel="nofollow">http://www.reichelt.de/LEDs-Blink-Multi-Color/LED-...</a></p><p>What do i have to change in the circuit using this LED.</p><p>My suggestion is to change the 330 ohm resistor with a 390 ohm.</p><p>Would this work?</p>
That LED is OK and no change is needed. Remember, the bipolar LED is there just to protect your phone from any excess voltage that might possibly get in, and to show you that something is wrong for the voltage to even be there. If you ever see that the bipolar LED is lit, turn everything off immediately and find the problem!
<p>Hey, thank's for the great instructable! I built the minimal circuit <br> and with the phone I'm using it works well for sine waves generated by <br>another smartphone up to about 5-6 kHz. However, when I try to look at a <br> PWM signal, e.g. RC receiver output or the arduino example &quot;Fading&quot; <br>(see Arduino GUI Examples-&gt;Analog-&gt;Fading) I get strange results <br>as shown in the attached screenshot: There's a lot of noise and after each pulse the signal goes into negative ranges slowly crawling back to zero. Any ideas of why this happens? I <br>have triple-checked my wiring and since sine waves look good I'm quite <br>confident I did something right, however, I must add that I'm quite new <br>to DIY electronics.. </p><p>PS: The screenshot is cropped, the grid is 446us horizontal and 160mV on the vertical axis.</p>
<p>here's the screenshot again, this time with proper filename ending, so you can actually see it ;)</p>
Apologies to a lot of people that I have been traveling and swamped with my day job. This is, as you already discovered, not a problem with the preamp or probably with the analog-to-digital converter. The square wave turns into a slant wave and overshoots down into the negative range because there is an RC filter on the smartphone input. The capacitor is charging on the DC signal, and it overshoots in the process of discharging when the DC turns off. The spiky noise is &quot;ringing&quot; somewhere else in the system, probably in the analog circuitry as well. From the picture and the listed scale, I would guess that the low end of the passband is quite high and that the phone may not be the world's best. However, you still see the essential information: those are square waves and you can measure their timing.
<p>I got exactly the same result with software PWM on a Raspberry Pi using the full circuit. I tried to short both capacitors (although did not shorted both of them at the same time yet, I will say if it fixes the problem), but that changed nothing. Setting the trimpot does not help too. Looking forward for help... </p>
<p>I was able to reproduce the result without the preamplifier circuit (used a simple voltage divider to get below 0.5V input), so it's probably a problem of the smartphone hardware (i.e. analog to digital processing) which is just not designed for such signals.. any thoughts on this theory?</p>
Question: what will happen to the phone if the frequency is greater than the range limit?
I made it. Now I wander if it is possible to extend it a little into a four opamp tlc274 making it a two channel to be used on a PC soundcard.<br>BTW, I tried to get some wave forms from a 555. I put it on the same breadboard. But the waves are distorted , as if it leaves noise in the circuit. I wander if that could be possible. Otherwise maybe my smartphone gets info from the internal mic. The 'waves' are blocks with a ripple on top of it.
<p>I was looking something like this... simple and I can use my android phone to see basic waves... is enough to start learning and troubleshooting small circuits. </p><p>Thanks you very much... As soon I assembly mine, will come back with some pics. </p><p>-Alex.</p>
I just want to say I love the project. Im going to be making one for my dad for Christmas. I had one question though. Is there a way to add a second channel to this oscilloscope by either creating a separate box that could be processed through the micro USB connection or adding it to the existing circuit?
Thanks for your nice comment. I hope your father enjoys his present.<br>Unfortunately, it's not possible to add a second channel through the mike input of an iPad or any smartphone I know of, because there is only one mike channel. Signalscope reportedly can accept inputs through an &quot;official&quot; Apple USB connector, but this would be an expensive solution, and I don't know if this technique can handle 2 channels either.
<p>Technically it would be possible for mutiple channel , but more components and associated complexity:</p><p>use one of the audio out channesl to send a pulsed tone, and have the circuit detect that and switch channels via standard analog switch technology. </p><p>Or use the audio out to send a constant frequency to control the switching if the output signal is possitive swithch in channel one, negative switch in channel 2.</p><p>Could do alt sweeps easy this way, chopped should also work at lower freq inputs.</p>
<p>Awosome instructable. i have a few questions one, i have a tlo82cp op amp from the the pin out it is the same as the tlc272Ip so so wiring it just as yours diagram will be fine correct? and my second question my first Oscope was just 2 resistors wired together so i tried to compare the signal through both those and yours but it seems that im still getting alot of distortion the sine wave looks good but the others i get distortion at the rise of the square wave and as it drops it is not straight it slants. do you have any idea as to why this is happening or how to fix it? and one more question sorry....could the distortion im getting be from un sheilded wires? right now everything is bread boarded using bread board wires (not the ridged ones) i will try and get a picture of it posted. and one more thing the resistor you have crossing over the ic from pin 8 to pin 3 what is the rateing on it i am shade blind so reading the colors for the code is very difficult for me, and what purpose does it serve.</p>
Again, sorry about the long delay. A TLO82 should be fine. A picture of the square wave distortion labelled by frequency would be good. Without a picture I'm guessing this is most likely caused by the very poor low-frequency response of smart phones in general. (Probably not from using unshielded wires.) That crossing resistor is 22K, as is the one below it. 1/4 watt is fine.
<p>I am a little confused comparing your diagram with the image of your breadboard (full). Re. the power source (9Vbattery) in the diagram the negative lead is only connected to the first resistor in the divider. There is no indication that it ties to common ground. However in the photo I see a jumper on the black power lead?</p><p>Where does that jumper go?</p>
<p>In the schematic I left off the positive and negative connections to the TLC272, which you can find by downloading the specs. However, the jumper you mention in the photo is negative connecting to pin 4, and another jumper connectspositive to pin 8. The common ground is NOT the negative lead from the battery. If this seems confusing, Google op amps and &quot;split power supply.&quot;</p>
<p>Thanks....I will later upload a complete diagram. It is Memorial day...going out to shop to finish this !</p>
<p>Here is my modified diagram showing the power rails to the IC.</p><p>( Please verfify this is how you powered the circuit )</p>
<p>That looks right. Sorry about the very long delay. I had a lot of things on deadline.</p>
<p> what can i use to substitue the 1m ohm pot? my funds are very limited. my local radio shack dosnt carry anything more the 50k ohm. i have one of those and a few 10k ohm as a possiable replacement?</p>
<p>Don't try to use a 50K pot, much less 10K. You really do need a large resistance at the input, to ensure a high input impedance and to help protect the rest of the circuit from accidental encounters with excess voltages. However, you only need a pot to precisely adjust the gain. You can try replacing the pot with different combinations of resistors, like 2 X 470K, 1M and 100K, etc, to land in the right ballpark. Just make sure that the larger resistor connects to the input signal. </p>
<p>I just ordered parts to build two. Cheap, why not have one in the tool kit?</p><p>However the second will likely be built with a PC board. If I design the layout and board and have some make professionally, would anyone here be interested in buying one to offset the cost of making them?</p><p>I figure they will probably cost about $3-4 each for 2 side PC boards. Of course it would be a version to support the FULL CIRCUIT.</p><p>Not trying to get rich here...but it is far cheaper to make a batch of boards than to mess with just one or two so would like to share the cost.</p><p>Let me know a paul@paulkruger.us</p><p>Thanks</p>
<p>paulckruger, I'm flattered and happy for you to do the kit and the boards. (Unfortunately, you're pretty much guaranteed not to get rich from it.) </p><p>However. As discussed many months ago, I myself leave small circuits like this on breadboards. It's true that things on breadboards can sometimes come loose, especially if the breadboard, battery, and wiring are not held firmly in the box. However, it's quick and easy to just stick them back in-- provided you have invested 30 seconds in saving a picture. In contrast, it takes a lot longer to solder all the parts in place, and a lot longer to fix errors in soldering. Also a lot longer to make modifications.</p><p>A modification in point: the high pass filter (required by the mike-sensing circuitry) is set to about 22 Hz. This was fine for the original circuit because no device I tested would go below 75-100 Hz. However, the latest iPads, when used in conjunction with Signal Scope, are good down to 20 Hz and possibly lower. For this, a 10 uF NP electrolytic, or possibly a 2.7 K resistor, would be better. Testing out such mods takes only a few minutes. </p><p>However^2. If you want to make sure one of my circuits is still around in 50 years, I'm not going to argue too hard.</p>

About This Instructable




More by chipstein:A Preamplifier for Smartphone Oscilloscopes 
Add instructable to: