Measure/Projects: Difference between revisions
(→Simple differential amplifier: change name to make clear what the purpose of this is, remove a drawing, etc) |
(→Specifications: redo with more info) |
||
Line 104: | Line 104: | ||
* '''Power-input plug''': USB connector |
* '''Power-input plug''': USB connector |
||
::* Use either a "naked" connector or a USB cable cut and stripped to reveal the red (+5 volt) and black (0 volt -- common) wires. Cut the other two wires flush and tape-over their ends individually. |
::* Use either a "naked" connector or a USB cable cut and stripped to reveal the red (+5 volt) and black (0 volt -- common) wires. Cut the other two wires flush and tape-over their ends individually. |
||
* '''Voltage Gain''': |
* '''Voltage Gain''': R2/R1 (i.e. the circuit divides the input down by this ratio) |
||
::* Accuracy will depend on the ratios of R1:R3 and R2:R4. |
::* Accuracy will depend on the ratios of R1:R3 and R2:R4. |
||
* '''Input impedance''': |
* '''Common-mode Input impedance''': R1 ohms (e.g. 100K or 200K or 1 megohm) each side to circuit common |
||
* '''Differential-mode Input impedance''': twice the common-mode impedance |
|||
* '''Laptop settings''': Set either (i) MEASURE to DC and OFFSET to OFF, or (ii) MEASURE to AC and OFFSET to OFF |
* '''Laptop settings''': Set either (i) MEASURE to DC and OFFSET to OFF, or (ii) MEASURE to AC and OFFSET to OFF |
||
::* No harm will result if these setting are wrong, e.g. the activity starts in MEASURE = AC. The gain will be higher in AC, but the amplfier can be used in AC too). |
::* No harm will result if these setting are wrong, e.g. the activity starts in MEASURE = AC. The gain will be higher in AC, but the amplfier can be used in AC too). |
||
* '''+5 volt power source''' -- derived from the nearby USB port (red and black wires inside a sliced-open USB cable) |
* '''+5 volt power source''' -- derived from the nearby USB port (red and black wires inside a sliced-open USB cable) |
||
* '''+5 volt current draw''' -- a few milliamperes |
* '''+5 volt current draw''' -- a few milliamperes |
||
* '''Minimum power-source voltage''' -- approximately +4.0 volts [as low as +3.0 volts is possible |
* '''Minimum power-source voltage''' -- approximately +4.0 volts [as low as +3.0 volts is possible]. |
||
* '''Measureable input voltage''': See also AC and DC common-mode rejection specifications. The "gain slider" is the adjustment on the right-hand side of the screen. The trace is adjusted to center-screen and then voltage applied to the (+) and (-) probe inputs; the voltage is adjusted until the trace moves to fully up (+ voltage), or down (- voltage): |
|||
'''Gain of 1/100, i.e. R1 = R2 = 1.00 megohms 0.1%, R2 = R3 = 10.0K ohms 0.1%''': |
|||
{|{{prettytable}} |
|||
|- style="font-size:9pt;font-weight:bold" align="center" valign="bottom" |
|||
| width="65.25" Height="12" | Gain slider |
|||
| width="114.75" | Maximum +V input, volts |
|||
| width="126" | Maximum -V input, volts |
|||
| width="113.25" | Volts per major division |
|||
|- style="font-size:9pt" align="center" valign="bottom" |
|||
| Height="12" | Full up |
|||
| 0.367 |
|||
| -0.368 |
|||
| approx 0.050 |
|||
|- style="font-size:9pt" align="center" valign="bottom" |
|||
| Height="12" | 75% up |
|||
| 2.126 |
|||
| -2.036 |
|||
| |
|||
|- style="font-size:9pt" align="center" valign="bottom" |
|||
| Height="12" | 50% up |
|||
| 13.13 |
|||
| -12.62 |
|||
| |
|||
|- style="font-size:9pt" align="center" valign="bottom" |
|||
| Height="12" | 25% up |
|||
| 78.5 |
|||
| -73 |
|||
| |
|||
|- style="font-size:9pt" align="center" valign="bottom" |
|||
| Height="12" | 12.5% up |
|||
| 80 |
|||
| -80 |
|||
| approx 10 |
|||
|} |
|||
'''Gain of 1/50, i.e. R1 = R2 = 1.00 megohms 0.1%, R2 = R3 = 20.0K ohms 0.1%''': |
|||
{|{{prettytable}} |
|||
|- style="font-size:9pt;font-weight:bold" align="center" valign="bottom" |
|||
| width="65.25" Height="12" | Gain slider |
|||
| width="114.75" | Maximum +V input, volts |
|||
| width="126" | Maximum -V input, volts |
|||
| width="113.25" | Volts per major division |
|||
|- style="font-size:9pt" align="center" valign="bottom" |
|||
| Height="12" | Full up |
|||
| 0.185 |
|||
| -0.189 |
|||
| approx 0.025 |
|||
|- style="font-size:9pt" align="center" valign="bottom" |
|||
| Height="12" | 12.5% up |
|||
| 40 |
|||
| -40 |
|||
| approx 5 |
|||
|} |
|||
* '''Maximum input voltage''': +/-15 volts useable, tested to +/-30 volts. See also AC and DC common-mode rejection specifications. |
|||
::* I.e. apply the voltage of 15 volts (30 volts absolute maximum for testing) in both polarities by "flipping the battery" |
|||
* '''Frequency specification''': DC to 1000 hertz (1 KHz). Beyond this frequency significant aliasing occurs. |
* '''Frequency specification''': DC to 1000 hertz (1 KHz). Beyond this frequency significant aliasing occurs. |
||
::* "Aliasing" appears as wiggles on what should be a pure sine wave (an envelope that modulates the input). This is caused by the sampling of the waveform done by the input-converter (codec). |
::* "Aliasing" appears as wiggles on what should be a pure sine wave (an envelope that modulates the input). This is caused by the sampling of the waveform done by the input-converter (codec). |
||
⚫ | |||
{|{{prettytable}} |
|||
⚫ | |||
|- style="font-size:9pt;font-weight:bold" align="center" valign="bottom" |
|||
| width="95.25" Height="12" | Trace-speed slider |
|||
| width="114.75" | Minimum frequency |
|||
| width="126" | Maximum frequency |
|||
|- style="font-size:9pt" align="center" valign="bottom" |
|||
| Height="12" | Right - fast |
|||
| TBD |
|||
| TBD |
|||
|- style="font-size:9pt" align="center" valign="bottom" |
|||
| Height="12" | Center - medium |
|||
| TBD |
|||
| TBD |
|||
|- style="font-size:9pt" align="center" valign="bottom" |
|||
| Height="12" | Left - slow |
|||
| TBD |
|||
| TBD |
|||
|} |
|||
⚫ | |||
⚫ | |||
* '''AC Common-mode rejection''': measured relative to the power-common (circuit 0 volts), 0-1000 Hz, +6 volts AC rms injected: less than 0.001 volt AC rms (observable at the highest gain setting of the laptop: approx 2 scale divisions) |
* '''AC Common-mode rejection''': measured relative to the power-common (circuit 0 volts), 0-1000 Hz, +6 volts AC rms injected: less than 0.001 volt AC rms (observable at the highest gain setting of the laptop: approx 2 scale divisions) |
||
::* AC common mode rejection depends critically not only on the matching of the resistors R1 to R2 and R3 to R4 but also upon stray capacitance in the circuit, the ''apparent'' impedance of the reference-voltage source (i.e. the reference-op amp's output impedance), the quality of the op-amps themselves, etc. |
::* AC common mode rejection depends critically not only on the matching of the resistors R1 to R2 and R3 to R4 but also upon stray capacitance in the circuit, the ''apparent'' impedance of the reference-voltage source (i.e. the reference-op amp's output impedance), the quality of the op-amps themselves, etc. |
Revision as of 16:17, 14 January 2008
Temperature monitoring system
How to build
You need-
- LM35 or any similar temperature sensor
- USB connector
- Audio connector
- Some wire or a cable. You could use cut a USB cable and an audio cable from the middle
- Measure Activity
The USB port has two pins which are of use to us. One is the ground and the other one is the one which provides a constant 5V. When you cut a USB cable in the middle, you could find out by trial-and-error by using a simple Voltmeter which are the two wires corresponding to these two pins. If you don't have a Voltmeter, try using a simple LED and a resistor to do the job.
We provide the +5V that this temperature sensor requires from the USB port. For this we connect the +5V wire to the Vcc of the sensor. We connect the ground to the Ground terminal on the LM35. We connect the Vout of the sensor to the Audio Input jack.
How to operate
Set the Measure Activity to be in the DC Mode and Turn Off the Bias Voltage. Both these can be controlled by using the first two buttons on the 'Measure Toolbar'.
The DC voltage is proportional to the temperature . The voltage that the XO can read varies between 0.9 V - 3V. The output of the sensor would be from 0-5V, so, for for different ranges of temperature one can either use a potential divider for higher ranges or using resistances add a bias to the Vout of the sensor from the +5V of the USB again.
Learn More
The LM35 has an output voltage proportional to the temperature. The scale is 0.01V/C. Read the [Data Sheet] to learn more.
One could log temperature over a period of time - say at an interval of 1 hour for a complete day to know when is it the hottest / coldest.
Video
(put video with flame demonstration here, put pictures here - including ckt diagram)
Intrusion Alarm system
How to build
You need-
- A toy laser
- An LDR or a Photo-Voltaic cell
- Some wire
- Measure Activity
Open up the toy laser and remove the batteries. Connect a wire to the spring inside and connect the other wire to the metallic body inside. Connect both of these wires to the USB power supply wires. Click here to learn about how to determine the USB power supply lines.
Connect the LDR to the Audio Jack.
How to operate
Set the Measure Activity into DC Mode and turn ON the bias voltage. Setup the LDR and the laser to be in line and facing each other. When the path of the laser light gets cut, you should observe a marked increase in voltage indicated by the position of the waveform shifting up.
Learn More
The resistance of the LDR - Light Dependent Resistor is proportional to the amount of light falling on it. The potential drop across the LDR is dependent on the resistance of the LDR. When the path of the light gets cut, the resistance increases hence we notice a marked increase in voltage indicated on the screen.
Click here to know more about Bias Voltage and how it works.
Simple isolation and protection amplifier
The following "probe-circuit" allows the student or teacher to "input" both DC voltages greater than +5.0 volts (such as from a 9 volt battery, etc), negative voltages, as well as AC voltage. The probe provides resistive isolation of the laptop from what is being measured (the amount of isolation dictated by the choice of two resistors R1 and R2) The following design may change as it evolves:
- See revision history at bottom of this section.
Specifications
These specifications are valid given use of the preferred components as listed in the Bill of Materials:
- Signal-input plug: mono audio jack (3.5 mm, 1/8", see above)
- Power-input plug: USB connector
- Use either a "naked" connector or a USB cable cut and stripped to reveal the red (+5 volt) and black (0 volt -- common) wires. Cut the other two wires flush and tape-over their ends individually.
- Voltage Gain: R2/R1 (i.e. the circuit divides the input down by this ratio)
- Accuracy will depend on the ratios of R1:R3 and R2:R4.
- Common-mode Input impedance: R1 ohms (e.g. 100K or 200K or 1 megohm) each side to circuit common
- Differential-mode Input impedance: twice the common-mode impedance
- Laptop settings: Set either (i) MEASURE to DC and OFFSET to OFF, or (ii) MEASURE to AC and OFFSET to OFF
- No harm will result if these setting are wrong, e.g. the activity starts in MEASURE = AC. The gain will be higher in AC, but the amplfier can be used in AC too).
- +5 volt power source -- derived from the nearby USB port (red and black wires inside a sliced-open USB cable)
- +5 volt current draw -- a few milliamperes
- Minimum power-source voltage -- approximately +4.0 volts [as low as +3.0 volts is possible].
- Measureable input voltage: See also AC and DC common-mode rejection specifications. The "gain slider" is the adjustment on the right-hand side of the screen. The trace is adjusted to center-screen and then voltage applied to the (+) and (-) probe inputs; the voltage is adjusted until the trace moves to fully up (+ voltage), or down (- voltage):
Gain of 1/100, i.e. R1 = R2 = 1.00 megohms 0.1%, R2 = R3 = 10.0K ohms 0.1%:
Gain slider | Maximum +V input, volts | Maximum -V input, volts | Volts per major division |
Full up | 0.367 | -0.368 | approx 0.050 |
75% up | 2.126 | -2.036 | |
50% up | 13.13 | -12.62 | |
25% up | 78.5 | -73 | |
12.5% up | 80 | -80 | approx 10 |
Gain of 1/50, i.e. R1 = R2 = 1.00 megohms 0.1%, R2 = R3 = 20.0K ohms 0.1%:
Gain slider | Maximum +V input, volts | Maximum -V input, volts | Volts per major division |
Full up | 0.185 | -0.189 | approx 0.025 |
12.5% up | 40 | -40 | approx 5 |
- Frequency specification: DC to 1000 hertz (1 KHz). Beyond this frequency significant aliasing occurs.
- "Aliasing" appears as wiggles on what should be a pure sine wave (an envelope that modulates the input). This is caused by the sampling of the waveform done by the input-converter (codec).
Trace-speed slider | Minimum frequency | Maximum frequency |
Right - fast | TBD | TBD |
Center - medium | TBD | TBD |
Left - slow | TBD | TBD |
- DC Common-mode rejection: Voltage injected between (i) the two inputs tied together, and (ii) circuit common (circuit 0 volts), tested to +/-90 volts DC. Measurements TBD.
- DC Common-mode rejection depends critically upon the matching of resistors R1 to R2 and R3 to R4. Matching of 0.1% is required either by buying 0.1% resistors, or buying e.g. a 100 or a 1000 of inexpensive metal-film resistors and sorting them.
- AC Common-mode rejection: measured relative to the power-common (circuit 0 volts), 0-1000 Hz, +6 volts AC rms injected: less than 0.001 volt AC rms (observable at the highest gain setting of the laptop: approx 2 scale divisions)
- AC common mode rejection depends critically not only on the matching of the resistors R1 to R2 and R3 to R4 but also upon stray capacitance in the circuit, the apparent impedance of the reference-voltage source (i.e. the reference-op amp's output impedance), the quality of the op-amps themselves, etc.
Circuit description
This deceptively-simple "probe" circuit is called a "differential amplifer" (differencing amplifier) and although not very fancy it performs the fundamental task of isolating and protecting the laptop from adverse electrical events while allowing the student to measure voltages in excess of +5 volts, minus voltages, etc.
The circuit requires some design tricks and represents some design-challenges, to be described below.
- This circuit has the advantage of not presenting an input voltage greater than +5 volts to the microphone input, plus the USB-port's circuit limits its +5 volt output-current to about 1 ampere in case something short-circuits the USB's output voltage.
- If properly designed, this circuit should survive "accidents" and protect the laptop and the child against such accidents as: "plugging the probe into the 240VAC wall-outlet".
- Any supply voltage derived from another source must be less than +5 volts. For example, three 1.5 volt batteries will also work at +4.5 volts -- as long as the batteries are not accidentally reversed !! -- but four 1.5 volt batteries at 6.0 volts present a risk of inputting more than +5 volts into the microphone input.
- Any externally-derived power voltage (batteries solar cells, etc) directly applied also risks of reveral. If a battery is to be used, add a reverse-protection schottky diode e.g. Avago 1N5711 static-protected by a 0.1 uf capacitor in series with the battery (i.e. a 4.5 volt battery with a 0.4 volt diode drop). A better scheme uses a low-current, +5 volt low-dropout-voltage regulator. Details TBD.
Trick #1 -- "Differential" rather than "single-ended" input: A single-ended amplifer connects one of its two inputs directly to the circuit common -- the metallic part of the USB port, for instance. Any current or voltage on the common goes directly into the laptop. So if somehow such a probe's input-lead is inadvertenly connected to a high voltage, this voltage will appear on the metallic parts of the laptop. If the laptop is electrically isolated, this adverse voltage will present a touch-hazard. If the laptop is electrically grounded, it will be destroyed.
A differential amplifier's two inputs, a "plus" (+) and "minus" (-) are both somewhat isolated from the laptop's common by high-value resistors (true "galvanic" isolation is possible but expensive).
As a properly-designed single-ended amplifier will require use of the same 4 resistors (R1*, R2*, R3**, and R4**) as the "differential" amplifer. Moreover, the differential amplifer subtracts away "common-mode" noise Vn and common-mode voltage Vcm i.e. noise and voltages that appear on both leads (relative to circuit common): i.e.
- ( V(+) + Vn + Vcm) - ( V(-) + Vn + Vcm ) = V(+) - V(-)
So it makes sense to design the amplifer as a differential amplifer.
Trick #2 -- Artificial "ground": This trick kills two problems with one stone. (i) The laptop accepts only positive voltages: The laptop's analog-to-digital converter (codec: AD1888) converts (works only on) plus-DC voltages between approximately +0.3 volts (minimum, corresponding to bottom of screen with high gain (control near the top)) and approximately +2.0 volts (maximum, corresponding to top of screen with high gain (the slider control near the top)). this means that approximately +1.18 volts puts the trace into the center of the screen.
Thus the probe-circuit must "offsets" the difference between the "+" and "-" inputs with this voltage of approximately +1.18 volts. It derives this from a highly-stable "band-gap reference" (any number of different types are possible -- +1.225 volts +/-1% volt, +1.235 volt +/-1%, 2.50 volts +/-1% etc.) Audio-jack inputs less than this "centering-voltage" will drive the trace lower than center, and inputs greater than this "centering-voltage" will drive the trace higher than center. At the laptop's highest gain the voltages require to do this are quite small -- on the microvolt range.
(ii) Increasing common-mode voltage rejection: Together with the choice of R1* and the gain of the circuit, this +1.18 volt offset dictates the maximum common-mode voltage that the probe can "accept" and still function correctly. For example, with R1* = 1 megohm and an attenuation of 1:50 (i.e. the probe reduces the input to 1/50*( V(+) - V(-) ), a negative "common mode" input will be divided down by a factor of 50. If this common-mode voltage V(+) is negative, it will suck out out of the input approximately Vin/(R1*+R2**) amps, and this will develop a voltage at the input to the amplifier of Vin*R2**/(R1*+R1**)+1.18 volts.
- Example: Common mode voltage is -100 volts, R1* = 1 megohm, R2** = 10K:
- -100*20,000/(1,000,000 + 20,000) + 1.18 = -0.96 + 1.18 or -0.22 volts.
Can the amplifier (LM358AN) tolerate this? Yes, it can tolerate up to -0.3 volts at its (+) and (-) pins. What really happens depends on the circuit design. The part can tolerate up to 50 milliamps being sucked from the (+) or (-) pins. And the resistors prevent any more than a few hundred microamps from being pulled from the pins. So the amplifier will survive.
What about the preferred but expensive LT1413N. In this circuit it can withstand voltages on its (+) and (-) pins equal to the supply voltage (e.g. +5 volts) and -5 volts.
Trick #3 -- Matched decent-quality (i.e. not carbon-film or carbon-composition) resistors: The "common-mode rejection ratio" -- the ability of the circuit to reject noise that is on both signal-leads simultaneously -- is determined by the precision of matching of the two resistors R1 and R2 to 0.1%, and the tworesistors to R3 and R4 0.1%. The exact R1/R3 ratio and R2/R4 (i.e. 20:1, 50:1, 100:1) is not particularly important, and will be good to +/-2% with typical 1% resistors selected to 0.1%. (All four can be matched for very precise division, but the resistors themselves can drift with temperature and time, and the amplifier's input offset will drift, as will the voltage reference). Ideally The resistors should not "drift" too much with temperature; but since they will, at about 25-50 parts per million per degree C (the CMF type), they all should be of the same metal-film construction. The recommended type is a tempertaure-time-voltage-stable metal-film 1/4 watt resistor such as the Vishay CMF55 or IRC RC55-LF.
One approach is to buy a bunch of decent resistors (e.g. the metal-film industrial Vishay/Dale CMF or IRC RC55LF-D type available from Mouser at www.mouser.com, a quantity of 100 of 10K cost about $7.00 US, a 1000 cost about $25.00 US) and then sort them into 0.1% categories. Unfortunately this requires a digital ohmmeter. But a trial sort of 100 showed extremely tight matching (+/-0.2% around the nominal). Another approach is to just buy precision resistors (at about 8-to-10x the cost):
- IRC RC55LF-D-10K, 0.1% 25 parts per million per deg C, 1/4 watt at 70C, $0.96 each or $0.64 each in 100's
- IRC RC55LF-D-20K, 0.1% 25 parts per million per deg C, 1/4 watt at 70C, $0.96 each or $0.64 each in 100's
- Vishay/Dale PTF5610K000BYBF, 10K 0.1% 10 parts per million per deg C, 1/8 watt at 85C, max 300 volts @ $0.82 ea, or $0.53 each in 100s
- Vishay/Dale PTF5620K000BYBF, 20K 0.1% 10 parts per million per deg C, 1/8 watt at 85C, max 300 volts @ $0.82 ea, or $0.53 each in 100s
With larger-value resistors R1* = R2* = e.g. 1.0 megohm (the recommendation), measurements with a low-cost ohmeter become problematic and suspect due to phenomena such as test lead-noise. The recommended procedure is to buy the precision resistors:
- IRC RC55LF-D-1.0M, 0.1% 25 parts per million per deg C, 1/4 watt @ $1.08 each or $0.72 in 100's
- Vishay/Dale PTF651M0000BXBF, 0.1% 15 parts per million per deg C, 1/4 watt, 500 volt @ $1.68 each, or $1.28 in 100's
Trick #4 -- Use higher-voltage input resistors that can handle extreme overloads : Resistors actually have voltage specifications as well as power specifications. An ideal circuit should survive, and protect the laptop against, 10% high line 230VAC, i.e. 358 volts peak, the common household voltage in much of the world. The industrial voltage 400 +10% VAC 50 Hz i.e. 622 volts peak, or 480 +6% VAC 60Hz i.e. 720 volts peak in the Americas will be destructive). If equipped with 1 megohm, higher-voltage (400-500 volt resistors) input-resistors R1* and R2* in both "legs" of the probe should survive this "household" voltage. This corresponds to 0.07 watts of power, 400 microamps in each resistor common mode. But in fact in differential mode the probe divides this power and leakage in half.
- Example: Common-mode worst case: the laptop power puts earth-ground potential but the probes are both plugged into 230 +10% VAC and this is referenced to the same earth common: (230 +10% VAC)^2/(1,000,000) = 0.105 watts, and 358 volts peak/1,000,000 = 385 microamps into and out of the probe's (+) and (-) inputs and the laptop's common (0 volts of the USB plug).
- Example: Differential-mode worst case: the laptop's power is derived from a "floating" source (e.g. the AC-to-DC adapter provided) but the (-) and (+) are plugged into the 230 + 10% VAC receptacle: (230 +10% VAC)^2/(2,000,000) = 0.05 watts, and 180 volts peak/1,000,000 = 180 microamps into and out of the probe's (+) and (-) inputs.
The tradeoff with larger-value resistors will be more circuit error due to leakage across surfaces, e.g. caused by dust and humidity and their combination. An enclosure becomes more important. More about this TBD.
Trick #5 -- Pick a decent-quality "centering" adjustment:
- As the laptop warms up the internal reference of the AD1888 "drifts" for about 10 minutes until the voltage stabilizes. This causes the centering to move in one direction or the other.
This has proven to be the most difficult and potentially-expensive part of the design. "Trim-pots" can survive only about 200 adjustments (Bourns specification). A 500 full-cycle test of a Vishay/Sfernice trimpot destroyed it. An adjustment potentiometer that can withstand 25 adjustments a day x 200 days a year x 10 years = 50,000 cycles cost as much as the precision resistors and the amplifer. Alternatives:
- (i) A Bourns 3006P trimpot (~$1.50 USD single-unit cost. Works fine, but only 200 adjust life, plus has no "knob").
- (ii) A Bourns 3/8" sealed trimpot (~$0.85. but only 200 cycle adjust life, plus has no "knob". Hard to adjust at high gain until the laptop's drift settles down).
- (iii) A Vishay/Sfernice sealed trimpot with a 1/2 diameter knob ($1.92. It failed a 500 cycle hand-test, the specs are ??)
- (iv) A Bourns encoder PEC11-4220F-N0012 plus a Catalyst CAT5113LI-10: 10K, UP/DOWN Digital Potentiometer plus a debounce circuit:($1.20 encoder + $1.50 Digital Pot IC + ~$0.35 74HC132 + 2*~$0.20 + 4*$.07 = $3.88. This does not have a "memory" -- a center-point could be "programmed in" during its build. Is on the edge of too large.)
- (v) Two pushbutton switches + 74HC132 quad-nand schmitt-input plus 4 capacitors, 6 resistors (~$0.50 x 2 + $1.50Digital Pot IC + ~$0.35 quad nand + ~$1.00 capacitors + 6*$0.07 resistors = $4.37).
- (vi) 10K Linear slide-switch. Cannot be easily sealed, don't use carbon comp!!
Trick #6 -- Use only parts that can be hand-assembled: Fewer and fewer parts are designed as "through-hole" with leads on 0.10 inch spacings (2.54 mm), and many very nice parts cannot be hand-assembled because of their tiny sizes.
Tirck #7 -- Bend the precision resistors' leads correctly (clamp needlenose pliers between resistor body, then bend lead against needlenose0 and do not apply too much solder-heat -- heatsink with needlenose or alligator clips when soldering : The IRC and Vishay/Dale resistors will drift +/-0.03% (typical) due to soldering. They also don't like physical shock (+/-0.03% typical). Precision components require precision treatment.
Trick #8 -- Ruggedize the mechanical design: Leads into and out of an enclosure will be subject to stress and strain. Potentiometer adjustments will suffer blows. Best practices would either "sink" the plane of the control below the surface of the enclosure or as low as possible (a good example is the laptop's controls).
Bill of Materials (BOM)
The following BOM specifies relatively good-quality components. Prices of the resistors assumes a 100-piece buy; all other prices (e.g. bandgap reference, LM358AN, potentiometer) are single-unit. 100-piece buys would cut the cost by at least 1/3 if not more. Substitution of lesser-quality components (e.g. carbon composition resistors, generic LM358N, two 1N4148 signal diodes in series in place of the bandgap reference, single-turn "trimmer" potentiometer) would cut the cost even further but significantly degrade performance.
Part | Description | Preferred Manuf | Preferred Part Number | Comments | Qty | each, USD | USD | 100 piece price | 100-piece price total |
C1, C2 | Capacitor: 0.1 microfarad (uf), 10%, 63 V, metallized polyester, 0.20 inch lead spacing, box style | Visay/ Roederstein | MKT1817410065 | AVX, Vishay/Roederstein, Wima, etc. | 2 | 0.25 | 0.50 | 0.18 | 0.36 |
IC1 | IC: Dual op-amp, single-supply 3 volt min, 3 mv max input offset, 30 nA input offset current max, 8-pin DIP | Fairchild Semi, National Semi | LM358AN or LM258N | ST Micro, Texas Instruments, etc. Much better part is Linear Technology LT1413CN8 @ $2.00 each | 1 | 0.21 | 0.21 | 0.15 | 0.15 |
LED1 | LED: green diffused 20 millicandela, 2.2V forward voltage, T-1, 0.1 inch lead spacing | Kingbright | WP7104SGD | Any color, any manufacturer: Avago HLMP-3507 | 1 | 0.13 | 0.13 | 0.10 | 0.10 |
P1 | Potentiometer: 10K 15 Turn cermet rectangular: 0.2+0.3 x 0.1 inch lead spacing | Bourns | 3006P-1-104 | Vishay/Spectrol, Visay/Sfernice. BI Technologies, etc. | 1 | 1.55 | 1.28 | ||
Potentiometer: 10K 1 Turn cermet 3/8 inch square with knob | Vishay/Spectrol | M63P103KB30T640 | M63P103KB30T607 is another type of adjustment control | 1 | 1.29 | 1.29 | 0.78 | 0.78 | |
R1*, R2* | Resistor: 200K, 1%, 1/4 watt commercial, metal film, matched to 0.1% | Vishay | CMF55200K00FHEK | Generic metal film 1%: RN55D2003F | 2 | 0.15 | 0.30 | 0.11 | 0.22 |
R3**, R4** | Resistor: 10K, 1%, 1/4 watt commercial, metal film, matched to 0.1% | Vishay | CMF5510K000FHEK | Generic metal film 1%:: RN55D1002F | 2 | 0.14 | 0.28 | 0.07 | 0.14 |
R5 - R9 | Resistor: 10K, 1%, 1/4 watt commercial, metal film | Vishay | CMF5510K000FHEK | Generic metal film 1%: RN55D1002F | 5 | 0.14 | 0.70 | 0.07 | 0.35 |
R10 | Resistor: 1K, 1%, 1/4 watt commercial, metal film | Vishay | CMF555K000FHEK | Generic metal film 1%: RN55D1002F | 1 | 0.19 | 0.19 | 0.15 | 0.15 |
R11 | Resistor: 1K, 1%, 1/4 watt commercial, metal film | Vishay | CMF5510K00FHEK | Generic: RN55D1001F | 1 | 0.14 | 0.14 | 0.10 | 0.10 |
Rx | Resistor: ??K, 1%, 1/4 watt commercial, metal film | Vishay | CMF55--??--FHEK | approx 100K, Determined from measurements and calculations | 1 | 0.14 | 0.14 | 0.10 | 0.10 |
Z1 | IC: Bandgap reference, 1.225 volt fixed, 1%, TO-92 package | ST Micro | TS821AIZ | Obsolete? | 1 | 0.64 | 0.64 | 0.40 | 0.40 |
1.235 volt fixed, 1%, 80ppm/deg C, TO-92 | ON Semiconductor | LM385BZ-1.2RAG | Prices vary, as low as $0.24 1-piece | 0.62 | 0.40 | ||||
2.50 volt 1% shunt regulator/reference, TO-92 | Fairchild Semi | TL431ACZ | 2.5V ref requires resistor changes | 0.17 | 0.27 | ||||
PL1 | PL1: Plug, mono audio 3.5mm (1/8 inch), black plastic barrel | Kobiconn | Mouser 171-PA-3191-1-E | Generic | 1 | 0.71 | 0.71 | 0.50 | 0.50 |
PL2 | USB plug: "silver/white", A-type 4 pin, "naked" (no attached wires) | Kobiconn | Mouser 154-UAW16-E | Generic USB cable | 1 | 0.68 | 0.68 | 0.42 | 0.42 |
Total | 5.91 | Total | 3.77 | ||||||
PCB | PC Board: 0.062 inch thick phenolic or glass-epoxy, 1 oz copper-clad one side, 3.03 x 1.85 inch, prepunched 0.042 holes on 0.1 inch centers | Eagle Plastic Devices | Mouser 400-9043 | PC board material must be able to resist solder temperatures.For budgetary (estimation) purposes | 1 | 3.28 | 3.28 | 2.26 | 2.26 |
Case & lid | Plastic, translucent blue: 3.150 x 1.575 x 0.787 inch | Hammond Manufacturing | 1551KTBU | 1 | 1.84 | 1.84 | 1.32 | 1.32 | |
Plastic, translucent blue: 3.150 x 1.575 x 0.591 inch | Hammond Manufacturing | 1551LTBU | 1.80 | 1.29 | |||||
test-lead wire | RED PVC insulation, 22 AWG 65x40 stranding, 0.018 inch insulation, 0.070 inch total diameter, 300 VAC (UL rating), 100 foot roll @ $32.00 US. | www. e-z-hook.com | 9504-100-red | Do not use solid wire. Units in feet. 1000 foot roll is $220 US | 3 | 0.32 | 0.96 | 0.22 | 0.66 |
test-lead wire | BLACK PVC insulation, 22 AWG 65x40 stranding, 0.018 inch insulation, 0.070 inch total diameter, 300 VAC (UL rating), 100 foot roll @ $32.00 US. | www. e-z-hook.com | 9504-100-black | Do not use solid wire. Units in feet. 1000 foot roll is $220 US | 3 | 0.32 | 0.96 | 0.22 | 0.66 |
minihook | Standard construction, square-hole tip, "minihook", red | www. e-z-hook.com | X100W-red | E-Z-Hook's XR model has a ruggedized hook at $2.15 US each | 1 | 1.71 | 1.71 | 1.57 | 1.57 |
minihook | Standard construction, square-hole tip, "minihook", black | www. e-z-hook.com | X100W-black | E-Z-Hook's XR model has a ruggedized hook at $2.15 US each | 1 | 1.71 | 1.71 | 1.57 | 1.57 |
grommet 2-wire | Buna rubber, drill 0.312 inch, 0.187 inner diameter | Keystone Electronics | 736 | 1 | 0.11 | 0.11 | 0.11 | 0.11 | |
grommet 4-wire | Buna rubber, drill 0.375 inch, 0.25 inner diameter | Keystone Electronics | 739 | 1 | 0.15 | 0.15 | 0.15 | 0.15 | |
Total | 16.63 | Total | 12.07 | ||||||
Optional | |||||||||
Socket | Socket: 8 pin DIP gold-flash contacts | Circuit Assembly | TBD | Any gold-flashed 8-pin DIP socket or equivalent | 1 | 0.50 | 0.50 |
More detail to follow
Construction Details
![](/mediawiki/images/thumb/4/4b/Oscilloscope_circuit_2e.png/500px-Oscilloscope_circuit_2e.png)
This circuit was actually prototyped -- without use of an oscilloscope -- on a "plug board" purchased from Radio Shack. Components were purchased from Radio Shack (the audio jack, 15 turn potentiometer, Micronta digital voltmeter) and from www.mouser.com (resistors, bandgap reference, LM258N) and some old Roederstein capacitors were taken from a sample kit. A USB cable was cannabalized: with an Exacto knife cut off the "B" end flush, carefully slice the exterior insulation around the circumference about 4 inches from the end, and then carefully cut the insulation lengthwise to expose the 4 wires inside (practice first!). Pull back the braided shield and snip off, likewise peel away the interior aluminum shield and cut off.
A possible hand-wired "naked" USB 2.0 plug is shown in the drawing and described below.
Point-to-point wiring: The most likely construction method will be on a piece of "perf" board (unplated PC board material perforated on 0.1 inch spacings) configured as shown in the assembly drawing -- a USB connector and an audio jack both connected to a PC board some distance (e.g. 1/2 meter) away, plus some E-Z-Hook "ball clips" about 1/2 meter long for input (see www.e-z-hook.com; E-Z-hook also sells very flexible 22 AWG lead wire -- highly recommended for this application).
The circuit common, +5 volts, etc. should be bare, solid, tinned copper wire such as 26 or 28 AWG. Carefully "stitch" the circuit common (i.e. run the common along the bottom except at the corners where you stich the wire to the top surface and then stich it back down again to the bottom), then solder various "tie-downs" to make a sufficiently-durable structure. Bend the components' leads (the resitors are shown on standard 0.40 inch lead-spacings) and use the leads to "wire" from point to point. Put the ICs in last.
Solder overheating, cold-solder joints, etc: Use rosin-core solder (expensive). Practice your technique. The components can take a few seconds of soldering heat. But prolonged application of heat, or the use of huge soldering tips (e.g. don't use a soldering "gun"), and monster blobs of solder will overheat the matched resistors R1* and R2*, R3** and R4**, the bandgap reference Z1 and the IC, melt away the PVC insulation of the lead-wires, etc. Best practice is to bend/circle leads around one another and then apply small amounts of solder. Be on the lookout for "cold-solder" joints -- places where the solder doesn't flow nicely and leaves the connection "unmade".
Home-made PC board: A better form of assembly is on a single-sided piece of copper-clad pc board drilled or punched on 0.1 inch centers drilled with approx 0.032 inch holes. (The copper will be on the bottom, the components on the top). Carefully remove etch with a Dremel tool -- the trick is to remove, with a tiny burr, as little etch as possible. Use a cork-backed, stainless steel ruler as a guide. If the copper is tinned, so much the better -- bare copper will tarnish; although this does not affect the circuit, soldering is more difficult. Another more difficult possibility is to buy single-sided unetched board. Carefully locate the holes (e.g. measuring and scribing with a dial caliper or pasting an accurate 1:1 drawing to the surface), mark each hole with a prick-punch (a sharpened steel nail will do), drill and then carve away etch with the Dremel tool.
Kits exist to etch pc boards. See www.mouser.com or www.digikey.com.
Conformal coating: Manufacturers use sprays (expensive) to "conformally coat" their boards for water-, dust- and fungus-resistance. Use multiple coats. See www.mouser.com or www.digikey.com.
Potting: The assembly should be put into a little plastic box, or "potted" or at least glued to a sheet of plastic (don't use wood -- it can absorb moisture and become conductive).
One approach would be to make or buy a box-mold and cast the assembly in a high-grade potting compound designed specifically for electronics. Once potted, unless it is in silicone rubber, the board cannot be repaired.
- Notes: If you plan to pot the assembly do not use an IC socket; solder the IC directly into the circuit. Test before potting. Do not expect nice adhesion of the potting compound to the wires. No potting materials stick well to vinyl insulation, the most common wire-insulation. If casting methods are used be sure to keep any light emitting diodes and the potentiometer adjustment out of the potting compound.
- Best molding/casting practice: Use only flexible RTV rubbers designed for the purposes of electronics molding (expensive). Hard molding compounds may shrink on curing and crack the components. Some RTVs may not cure properly when in contact with certain materials -- the result is a gooey, conductive mess hidden inside what appears to be a good "pot". Experiment -- plan to section a prototype.
- Do not cast with commercial silicone rubber -- silicone rubber outgasses acetic acid (i.e. vinegar), a corrosive.
- Do not use hard "potting" compound such as epoxy (expensive) or polyester resin (cheap). While clear polyester casting resin may work because it has low shrinkage, in general do not use hard potting compounds.
- Tools required: wire-stripping tool, Exacto knife, prototyping plug-board, little insulated jumper-wires (solid wire okay), ball clips, digital voltmeter, mold and molding materials if used.
- Soldering tools: rosin-core solder (NOTE: country-specific regulations may not allow use of lead-tin solder), soldering iron with small tip, solder-wick.
Best practices: The most difficult part of the design is how to assemble it into a robust object suitable for use by children. An assembly method might be as a part of the USB plug. But if the assembly is too long a child risks are bumping and injuring the connector. Given surface-mount components and a PC board the entire device can be shrunk into the connector with a cable for the audio jack and a pair of probes on a shielded cable. However, provision must be made for an external potentiometer-adjustment knob (the DC offset adjustment).
Commercial differential probes use batteries and an amplifier in a box connected by flexible leads to the test instrument, much as shown in the schematic.
USB 2.0 Connection for +5 volt power
More details to follow.
Revision History, simple differential amplifier
The design is subject to revisions as it evolves.
- REV 0: Prototype-test phase, redraw "layout" drawings, add info re E-Z-Hook to schematic & remove top-view symbols (2 Jan 08)
- REV 1: Correct "layout" drawing -- change potentiometer symbol from bottom to top view (3 Jan 08)
- REV 2: Change gain from 1:10 to 1:20, show optional components on schematic with . Add 2nd layout drawing for single-turn potentiometer implementation, plus an LED power-on indicator. Update Bill Of Material. (5 Jan 08)
Other ideas
- A low cost (possibly $2) probe that would increase the range of voltage that can be applied to the input.
- An ultrasonic distance measurement system that connects to the XO and allows the XO to log data. This has immense applications in water level monitoring in villages and also in robotics applications.
- A general purpose hardware kit that interacts with the measure activity. Something on similar lines to http://www.create.ucsb.edu/~dano/CUI/
- Sensors could be distributed along with the XO as peripherals. The advantage of this would be that the measure activity can be calibrated against the known specs of the sensors.
- Being able to measure resistance
- A low cost version of LEGO mindstorms system built around the XO. The XO has good hardware and software capabilities to achieve this.
- RS232 or serial interface would allow a host of electronic devices to interact and communicate with the XO.
- Build a sensor network using a sensor connected to each XO and utilize the mesh networking capability of the XO. This would give us a highly powerful, robust and reconfigurable sensor network.
- Build medical applications using sensors and the XO. See TeleHealth_Module
- Do some Fablab projects using the XO. See http://fab.cba.mit.edu/labs/vigyan/
- Collaborative music creation over the mesh using the music software on the XOs and giving input from an array of different sensors.
- Integrate sensor input into LOGO / Turtle activity
- Milk purity in rural areas. I remember reading about it in some FabLab's website - I think it requires an ADC, which we have.