Alright, here’s my semi-analysis of the circuit contained at the bottom of the pdf at the website http://affect.media.mit.edu/pdfs/05.strauss.pdf for the gsr circuit. I would change the circuit so that in the first amplification stage, you have 2 1M resistors, a 500k resistor, and a 250k resistor in parallel. I probably made many mistakes, major or minor, so just correct me. An analysis is important before you build a circuit because, well, if you want to change a few factors, you have to know what you’re doing. Look at the schematic,
or else you’ll have no clue what I’m talking about. So here it is…
First, an overview of the circuit. There are two amplification stages. The first one has 4 gain stages. The first has a range of 0-5 uS, the second 4-10 uS, the third 8-20 uS, the fourth 16-40 uS. S stands for a Siemen, while the u stands for micro (10^-6). A siemen is equal to 1/resistance. Therefore, 5 uS = 1/(5*10^-6) ohms = 200,000 ohms. The corresponding ohmic ranges, from first to fourth gain stage, are 200,000 + ohms; 250,000 to 100,000; 125,000 to 50,000; and 62,500 to 25,000 ohms. The second amplification stage shifts the range of voltage into the 0-2.5 V range required by the PIC microcontroller for its Analog to Digital conversion.
Let’s take a look at the first amplification stage. The input voltage to the + side of the op amp is .5 V. The capacitor on the – side is simply meant for noise filtering. The voltage gain of this noninverting amplifier configuration can be shown to be 1+R/Skin where R is the equivalent resistance of resistors R3, R4, R5, and R6 (depending on which ones are connected).
The mode depends on whether the appropriate electronic switches are open or closed. The microcontroller controls the state of the switches . The switches are actually contained in the ADG712BRU integrated chip.
In the second gain mode, the 2 1M resistors are connected in parallel. Therefore, R = (1*10^6)^2/(2*1*10^6) = 500,000 ohms.
Therefore, the gain in mode 1 is 1+500,000/(100,000) to 1+(500,000/250,000) = 6 to 3. The output voltage range is therefore .5 * 6 = 3V to .5 * 3 = 1.5 V. The same calculations can be made for modes 1, 3, and 4.
Mode 1: R = 1,000,000 ohms. Gain is 1+(1,000,000)/(200,000) = 6 all the way down to 1 (as skin resistance approaches infinity, R/Skin approaches 0). Therefore, voltage range is from 3V to .5 V.
Mode 3: R =250,000 ohms. Gain is 1+(250,000)/(50,000) = 6 to 1+(250,000)/(125,000) = 3. Voltage range is from .5*6 = 3V to .5*3 = 1.5V
Mode 4: R = 125,000 ohms. Gain can be calculated to be from 6 to 3, which in turn produces an output voltage of 3 to 1.5V.
All right, to sum it up we have 4 modes that produce an output voltage from 1.5 to 3 V for stages 2,3, and 4 while producing output voltage of .5 to 3V.
On to the second amplification mode! The voltage input into the second op amp can be seen to be 11/21V (V is output of first amplification stage) with only the 100k resistor in series with the 110k resistor going to ground.
The voltage output of the second amp can be derived as V-20*10^3*((V1-V)/(26.4*10^3)+(V2-V)/(132*10^3)) where V = the input voltage into the + side of the op amp, V1 and V2 can be 3.3V or 0V, as controlled by the high and low state of the microcontroller (it is powered by a 3.3V regulator). Of course, the low voltage won’t really be 0 V and the high voltage won’t really be 3.3V. This probably means that, to get the best accuracy, you would have to record the voltage level of your individual microcontroller at home and change the computer software as appropriate.
Anyways, since I’m getting tired already, and you’re getting tired of reading this stuff, suffice it to say that in order to subtract .5V from the first amplification stage you need a 100k resistor alone, while in order to subtract 1.5 and multiply by 5/3, you need the 100k resistor in parallel with the other two resistors that are also in parallel (24k and 91k. Atleast that’s what I think 24k||91k means in the schematic in the pdf file). The second part just mentioned is actually just an approximation, but the error is so small, that a 10 bit ADC won’t detect the difference.
Now it’s time to calculate the accuracy of each mode!
The minimum change in voltage the ADC can detect is 2.5/(2^10) = 2.5/1024 = .0024414 V. The output voltage for modes 2, 3, and 4 is (.5* (1+R/skin)-1.5)*5/3 = V, where V = output voltage. First, solve equation for skin resistance given output voltage. Skin = 5*R/(6*V+10) .
Starting with mode 2, V max is 2.5 V, while minimum is 0 V. Letting R= 500,000 ohms, the error can be calculated at 2.5V (100,000 ohms skin resistance) to be
5*(500,000)/(6*(2.5-2.5/1024)+10) -5*500,000/(6*2.5+10) = 58.6 ohms.
At 0V (250,000 ohms skin resistance) error is Abs(5*500,000/(6*(0+2.5/1024)+10)-5*500,000/(6*0+10)) = 365.7 ohms. These errors correspond to percent errors of (365.7/250,000)*100 = .14628% to (58.6/100,000)*100 = .0586%.
Next, mode 3. R = 250,000 ohms. V max is 2.5 V, while minimum is 0 V. Error is from 29.3 ohms (at 2.5 V) to 182.8 ohms (at 0 V). This corresponds to a percent error of (182.8/125,000)*100= .14624% to (29.3/50,000)*100 = .0586%.
Next, mode 4. R= 125,000 ohms. V max is 2.5 V, min is 0 V. Error is 14.6 ohms (at 2.5 V) and 91.4 ohms (at 0 V). This corresponds to a percent error of (91.4/62,500)*100 = .14624% to (14.6/25,000)*100 = .0584%.
Finally, the awesome mode 1. We need to derive a different formula for this, since in the second mode of amplification only .5 V is subtracted rather than subtracting 1.5 V and multiplying by 5/3.
The formula is .5(1+R/skin)-.5=V, where V= voltage output. Solving for skin, we get
skin=R/(2V)
At 2.5V (200,000 ohm skin resistance), error is 1,000,000/(2*(2.5-2.5/1024))-(1,000,000/(2*2.5)) = 195.5 ohms.
This corresponds to an error of (195.5/200,000)*100 = .09775%. Notice that we subtracted (2.5-2.5/1024) because this will give us a larger error than adding (2.5+2.5/1024). As V gets smaller, the error increases rapidly (the skin resistance measured gets larger).
Let’s calculate the skin resistance that will produce an error of 1.0%. Set up the equation …
((1,000,000/(2*(x-2.5/1024)))-(1,000,000/(2x))) /(1,000,000/(2x))* 100 = 1
Solving, x = .246582 volts. This corresponds to a skin resistance of 2.028*10^6 ohms. Unfortunately, 1% of this is a 20,280 ohm error! At x = .5 V, skin resistance would be 1*10^6 ohms. This level will correspond to an error of 4906.77 ohms. If we switch to a 12 bit ADC converter (you can get microcontrollers that have this level of ADC built in), the error that corresponds with a skin resistance of 2.028*10^6 would be 5031.57 ohms.
Alright. Now it’s time for a preliminary part cost list of the integrated chips used (didn’t include resistors, capactitor, diodes, because I didn’t feel like it. So cost is higher. Also, it doesn’t include Bluetooth since we can just connect it serially to the computer)
ADG712BRU: $2.00
OPA2342EA: $2.36 *2 = $4.72
PIC16LF88 = $5.33
3.3 Voltage Regulator: $1.13
Total: $13.18 + $8.00 (shipping, maybe more) = $21.18
We could probably find a cheaper microcontroller than the PIC (somewhere around $2.00, say an atmel tiny) but I’m just going with what they used. Alright… Next, I shall look at the other possibility mentioned, using a frequency to voltage converter. Even if this way is not cheap enough, still some ideals concerning using the skin resistance to change the op amp amplification is good to know.
It’d be good to discuss and generate more ideals, suggest improvements on this circuit to make it cheaper/more accurate, etc… Till then, au revoir!
|
|
Bookmarks