A Preamplifier for Smartphone Oscilloscopes by chipstein
Featured
CombinedScreens_edited-1.jpg
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.
 
Remove these adsRemove these ads by Signing Up

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
1-40 of 50Next »
SuperTrooper says: May 14, 2013. 8:25 PM
Would you consider modifying the Preamplifier so that it acts as an preamplifier that provides high gain to the output of a low noise electret condenser microphone while supplying it with a 5V bias voltage.

The microphone has a sensitivity of 38mV/Pa so at the low end of the sounds it can detect its output will be in the order of microvolts, it would require a gain of about 80-120dB to raise the signal above the 100mV threshold that 3.5mm audio jack inputs generally require. (You might need to cascade a pair of Op Amps) and an AGC circuit to ensure that microphone outputs for louder sounds do not overload the input of the smartphone/tablet after amplification.

Input and output interfaces would be 3.5mm audio. (Target Phone HTC Amaze 4G form factor. The phone runs of a 3.7v supply but would need to have the preamp supply 5V or as close as possible to 5V supply to the low noise microphone so that the noise floor is not raised.
chipstein (author) says: May 15, 2013. 11:02 AM
That would be a cool application for the smartphone. It would also be sufficiently different that you would be better off starting from scratch with one of the many electret mike preamps that are described on the web. However, the special phone plug connections here might be useful.
Babarnc says: Apr 4, 2013. 2:09 PM
Hi,
Thanks for this great project and instructions. I am newbie in electronic so I just want to make sure:
->the ground here is never connected to the -V of the batterry but instead to the phone ground.
-> I haven't found any bipolar LED in my region so I took 2 diodes, that should do the trick I suppose?
And thanks again for the instructions.
chipstein (author) says: Apr 4, 2013. 6:31 PM
Correct. The negative terminal of the battery does NOT go to the ground, which is also labelled "common." All the downward arrows connect together at the phone ground. Two LEDs connected with opposite polarity should do fine.
chipstein (author) says: Apr 4, 2013. 6:31 PM
Correct. The negative terminal of the battery does NOT go to the ground, which is also labelled "common." All the downward arrows connect together at the phone ground. Two LEDs connected with opposite polarity should do fine.
naught101 says: Feb 18, 2013. 5:14 AM
What would need to change in the circuit if I wanted to run this off 5v? usb power is something that's readily accessible these days, and I'd rather not use throw away batteries..

Also, why is there a V+, V-, and GND in the circuit diagram? Is V- == GND? Do both of the V+ in the breakout section connect directly to the range switch/op amp leg 5?
chipstein (author) says: Feb 19, 2013. 5:46 PM
The V+, V-, and GND connections are there because op amps generally need both positive and negative voltage sources to run properly. The + on the range switch/op amp leg 5 is NOT a power connection at all but the positive input terminal. Google "op amp tutorial" for background on how these circuits work.

You could directly substitute the 5V from USB for the 9V battery connections, and just leave out all the zener diodes and the bipolar LED. If you are using the preamp with a laptop, that could provide the USB power. But it might be clumsy with a smartphone. One 9V battery should be good for 50-100 hours of operation—around a nickel an hour. I recommend you splurge.
eslighton says: Jul 1, 2012. 10:51 PM
If I add a switch to optionally bypass the input capacitor, would it work o.k. for low voltage D.C. measurement?
chipstein (author) says: Jul 2, 2012. 3:07 PM
The preamp could work for DC, but the smartphone would not. No smartphone, tablet, or laptop that I know of can handle DC signals on the analog input.
jamesh says: Jan 20, 2013. 3:44 PM
As you mention, most phones and other devices are AC coupled, which is a problem if you want to use the onboard ADC to measure DC. Think how useful it would be to have a phone O'scope like this that could also be used to measure DC voltages and resistance values (using the onboard voltage source). I can see at least three ways to accomplish this.

First, one could use a chopper circuit (like this: http://lea.hamradio.si/~s57uuu/scdsp/CheapChop/cheapchop.htm) to move the DC to AC, then use this circuit to allow DC measurement (again, see the like above). It may even be possible to use the audio output to the headphones as a replacement for the 74HC4066 that is used to generate the 5kHz oscillator.

Secondly, you could use circuit based on capacitor charge time to chirp into the O'scope, and by measuring times between chirps, determine the voltage.

Lastly, a larger project might be to measure the voltage in a circuit and pass the information to phone software via DTMF tones or other signals. The integrated chips that are available, or even a microcontroller, make this doable, even in a small package.

Of course, regardless of hardware, a complete solution would also require software that had a mode that converted the signal to a calibrated display of voltage.

Is anyone interested in this type of pocket o'scope / DMM project? Does anyone know of an instructable or website that illustrates this sort of approach?
Ahmed1337 says: Jan 9, 2013. 4:42 AM
Hm, I guess I get your reasoning, but I don't share the view -- although it's pretty basic, most newbies will take quite a while to reach a stage of knowledge at which they'll understand how changes affect this circuit.
Until then I guess most would want to build this on a more permanent platform.

Anyway, figuring out how to move from a breadboard to throughole is something every newbie has to do at some point, so I guess this makes a good exercise.

Another thing: have you considered changing the 1M pot to a 0.5M resistor and 0.5M pot? That should be even more newbie friendly -- one can change the impedance without having to worry about measuring the resistance.
chipstein (author) says: Jan 9, 2013. 5:38 PM
Good suggestion- that would prevent the resistance from ever getting too low.

Probably different people learn things in different ways. My own dim recollections of being a newbie are that I made mistakes, and found unsoldering them difficult; and that I wanted the absolutely lowest possible parts count!
Kavey says: Jan 4, 2013. 3:25 AM
Yes that should help.I need to buy a solderless breadboard.. never tried one before so I dont think I had a full grasp of how it works. I am not new to electronics or solder or anything.. just new at reading this style of schematic. Im a very well trained automotive electrical troubleshooter and if you give me a wiring diagram for a car I know it inside and out. HObby electronics are the next one for me to learn. I got a few things I want to make that are going to require me to have that skill. Not to count my lab scope broke and I dont have 1500 for a new one and tired of borrowing them all the time which is what brought me here to begin with.
A couple of other questions here while I got your time.
Would you possibly be willing to sketch up how this would all be interconnected with no breadboard.. just soldering the resistors, transformers etc all to each other? That will help me better understand it.
Second I cannot find a 1Mohm trimmer. Is there anything I can substitute that is easily found at radio shack?
And finally I have an inductive probe that came off of my old tester that had a oscilloscope. Is there any way to incorporate that into this design? Or any other DIY solutions for the android platform that have an inductive pickup. I really need the inductive option on several things I use a scope for.
Please let me know. If you have a for sure idea on how to make it inductive I would even be happy to pay you for your time to work with me to make one. I got a car right now waiting to be diagnosed and need to get this going so I am going to wait on your answers to the and gather materials and buy an actual breadboard and see if I cant get a scope.
I sure do appreciate your help and you taking the time to reply to this old post. Keep up the good work. Thank you.
chipstein (author) says: Jan 9, 2013. 5:30 PM
Kavey, you need a professional scope. This instructable is meant for portability, not for professional applications like yours. Google "Siglent SDS1052DL 50MHz Digital Oscilloscope" for $250.
Kavey says: Jan 1, 2013. 3:18 AM
Any chance you could post a picture of the back of this so noobs like myself can get a better understanding of how its wired?
chipstein (author) says: Jan 3, 2013. 5:30 PM
There is nothing on the back of a breadboard. All connections are internal or are made by plugging in wires and components on the front. To show better where they go, the last page now has an addendum plus another photo with purple circles and rectangles at every hole that something is plugged into. Hope this helps.
Ahmed1337 says: Dec 23, 2012. 8:45 AM
Nicely done, one thing though:
a breadboard is not a permanent solution and can cause a lot of problems down the line (connectivity) and it's also quite expensive compared to a small throughole PCB from ebay.
To make this things "advanced newbie" friendly, a throughole layout and complete schematic would be really, really neat.
chipstein (author) says: Dec 23, 2012. 11:33 AM
This is basically a difference in philosophy and time management. For me, circuits like this are not immortal masterpieces but works in flux. On the breadboard they can be modified almost instantly; on a PCB any change is tedious and frustrating. (I'm going through that annoying process right now, with a circuit that needs more fiddling than anticipated.) I have left many circuits on breadboards where they worked fine for years. The most common connectivity problem is with wires coming off the board, so I hold those down semi-permanently with hot melt glue. A breadboard allows readers to begin with the minimal circuit and add or subtract the various options if that seems better. Or they might use it as a springboard to try out their own ideas. I hope that some of them will, that any who wish to make their creation permanent on a PCB will be pleasantly surprised at how easy that process is, and that they will feel free to post the layout here.
poland says: Dec 1, 2012. 9:35 AM
TO NIE DZIAŁA
rawrdino says: Nov 4, 2012. 3:52 AM
First of all the project is really awesome. Second of all i don't know if you still check if there is comments but please answer if this would be possible on a samsung galaxy Y? Thanks very much.
chipstein (author) says: Nov 4, 2012. 1:12 PM
The galaxy Y appears to use the same kind of hybrid 4-pin plug, so it should work. I don't have access to one I could test myself. It never hurts to download the scope software and immediately check it with the built-in mike during the refund window--before going any further. Hope it works for you.
number8wire says: Oct 9, 2012. 7:29 PM
I tried calibrating the oscilloscope with a 1KHz sine wave but got a weird looking output wave. I tried on two different devices: a Galaxy Nexus phone and a Galaxy Note tablet and got different results which makes me think maybe its not the circuit but sampling that is the problem? I'm new to oscilloscopes and not sure how to proceed.
GalaxyNoteTablet.pngGalaxyNexusPhone.png
chipstein (author) says: Oct 10, 2012. 8:27 AM
number8wire, congratulations on getting this far, and having your phone pick up the signal. I'm glad you sent the pictures. In the top one, the signal hitting your phone input looks huge: about 8 volts peak-to-peak. You don't want it that big. The first thing is to try a much smaller input signal, or adjust the potentiometer to make the output much smaller. Maybe you have already done that in the second picture, where the signal is smaller but the top portion of the signal is clipping. This probably means that the voltage on "common" is not where it belongs. A connection in the circuit is probably bad. Go back and make sure that the voltage on “common” is halfway between the positive and negative connections (4.5-4.8V) at all the points indicated by the down-pointing arrows--including the TRRR connector. It's NOT likely that your phone sampling or sine wave signal is bad, but you can check the latter easily just by listening to it. If it's good you will hear a pleasant pure tone; otherwise there will be harsh components.
chipstein (author) says: Oct 10, 2012. 8:29 AM
Hmm. The system has invented a new form of punctuation. Those should be quote marks around “commonâ.
number8wire says: Oct 20, 2012. 10:12 PM
I got it to work and learned a lot in the process! You were right about the dodgy connection. Thanks.
andresfrr says: Aug 22, 2012. 10:01 AM
Hi, Could you write here the code?
chipstein (author) says: Aug 23, 2012. 10:05 AM
There is no code. The circuit is purely analog, and interfaces with the cheap/free scope and frequency analysis programs that are widely available for smartphones and tablets.
binaryhellstorm says: Jul 12, 2012. 4:25 PM
Would it be possible to upload a larger view of the final schematic. It's rather small, and I am having a hard time reading it.
chipstein (author) says: Jul 13, 2012. 10:52 AM
Click on the little "i" in the upper left corner of the Figure to get full-size downloads. This feature could probably be labelled better.
binaryhellstorm says: Jul 13, 2012. 11:09 AM
Thank you! Yeah, I totally didn't see that.
number8wire says: Jul 6, 2012. 5:40 PM
I want to have a go at building this but I'm having trouble finding a TLC272 in New Zealand.
My local electronics supplier has these: http://www.jaycar.co.nz/productResults.asp?keywords=dual+op-amp&keyform=KEYWORD&SUBMIT.x=33&SUBMIT.y=13
are any of these a suitable substitute?
(I'm an electronics newbie learning by building projects like this)
chipstein (author) says: Jul 9, 2012. 8:59 AM
Probably any of them would work, although I am most familiar and confident about the TL072 and LM358. The TLC272 is supposed to have better protection against electrostatic discharge and will go rail to rail on inputs and outputs. The latter feature is not essential here.
jeffeb3 says: Jun 29, 2012. 9:29 AM
This may be overkill, but it seems possible to use the phone, with a IOIO or arduino to control the low/high switch and possibly get much more fidelity and range, and it could be automatic. I'd be interested in doing a project like that. Maybe in the fall. Let me know what you think (If it's worth it).
chipstein (author) says: Jun 29, 2012. 7:47 PM
jeffeb3, it would be great to see automatic range control. If fidelity could also be improved that would be awesome.
jeffeb3 says: Jul 3, 2012. 4:30 PM
I was thinking of still using the mic input for the ADC, but just adjusting the gain using a IOIO. You'd need to connect to the preamp using the headphone jack, and the IOIO using usb (or potentially bluetooth, but I don't see the advantage if you are physically connected to it anyway).

Because of latency, You'd need to protect the mic input and the transistors if the software chose the wrong gain.

Would you just control the gain using a digital potentiometer? I see several of them use I2C, which is supported already by IOIO. Can I just replace the 330kOhm series of resistors with a 100kOhm digital potentiometer?
chipstein (author) says: Jul 4, 2012. 7:37 AM
As long as the 1 MΩ input pot is used the same way, the 2 optional zener diodes on the op amp input should be adequate protection against almost anything. A 100kΩ digital pot would be fine as you describe. The IOIO looks like an amazing device. For adding automatic range control, probably the biggest issues to figure out in advance are (1) keeping the signal voltage calibrated to the software, and (2) how to handle highly intermittent signals.
jeffeb3 says: Jun 29, 2012. 9:30 AM
Oh, and very cool project.
Electorials says: Jul 1, 2012. 3:57 PM
This looks like a really nice instructable!

But I don't understand how a smartphone's 3.5mm audio output can be used as an input for signals?
How does that work?
chipstein (author) says: Jul 1, 2012. 7:52 PM
Smartphone audio jacks have an extra contact, which is intended for the mike input of a combination headset. That contact goes to the extra ring of the special 3.5 mm plug. This is why the Parts List specifies where to get the special plug, and step 2 shows where to wire it. The extra contact also carries ~2 volts to power the mike, requiring 2 of the 6 electronic components in the minimal circuit to interface with it.
Electorials says: Jul 2, 2012. 4:19 AM
Oh ok ;)
thank you for explaining!

I guess my ipod touch can't do that right?
1-40 of 50Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!