Basic Electronics, Chapter 7: Challenge 3 solution (sensors and the signal chain) Formulas: dR/R = GF x strain bridge: Vdiff = Vex x x / (2 x (2 + x)) (x = dR/R, about Vex x x / 4) INA333: G = 1 + 100 k / RG Vout = REF + G x Vdiff shunt: V = I x Rs P = I^2 x Rs non-inverting gain = 1 + Rf/Rg RC filter: fc = 1 / (2 pi R C) |H| = 1 / sqrt(1 + (f/fc)^2) alias frequency = |f - fs| full-power bandwidth = SR / (2 pi Vp) (a) Strain gauge, 350 ohm, GF = 2.0, 2000 microstrain (0.002), quarter bridge, 3.3 V excitation x = dR / R = GF x strain = 2.0 x 0.002 = 0.004 dR = 350 x 0.004 = 1.4 ohm Exact: Vdiff = 3.3 x 0.004 / (2 x 2.004) = 3.293 mV Approximate: Vex x x / 4 = 3.3 x 0.004 / 4 = 3.300 mV (0.2 % high) INA333 with REF = 1.65 V: Vout = 1.65 + G x Vdiff. For a +1.5 V change: G = 1.5 / 3.293 mV = 455.5 RG = 100 k / (G - 1) = 100 k / 454.5 = 220 ohm (a standard E12 value) G = 1 + 100 k / 220 = 455.5 Vout = 1.65 + 455.5 x 3.293 mV = 1.65 + 1.500 = 3.150 V At 600 microstrain: x = 0.0012, Vdiff = 3.3 x 0.0012 / (2 x 2.0012) = 0.989 mV Vout = 1.65 + 455.5 x 0.989 mV = 1.65 + 0.451 = 2.101 V Compression of 2000 microstrain gives about 1.65 - 1.50 = 0.15 V: the whole span 0.15 V to 3.15 V is used for +/- 2000 microstrain. (b) Low-side current sensor, Rs = 0.05 ohm, up to 3 A shunt voltage = 3 x 0.05 = 0.150 V power = 3^2 x 0.05 = 0.45 W (use a 1 W resistor) The gain must keep 0.150 V below 3.3 V: 1 + Rf/Rg <= 22, so Rf <= 21 k with Rg = 1 k. E24 values: 20 k gives gain 21 (3.15 V at 3 A, 1.05 V per amp); 22 k gives 23 (3.45 V: too high). Choose Rf = 20 kohm. Offset error: Vos = 2 mV at the input is amplified to 21 x 2 mV = 42 mV at the output, which equals 42 mV / (1.05 V per A) = 0.040 A = 40 mA (also simply 2 mV / 0.05 ohm = 40 mA) Larger Rs reduces the offset error in amps but wastes more power and lifts the ground further: the load's return sits 0.15 V above the board's 0 V at 3 A. (c) Anti-alias filter and slew rate: fs = 2 kHz C = 1 / (2 pi x R x fc) = 1 / (2 pi x 1000 x 160) = 0.995 microfarad -> 1 uF fc = 1 / (2 pi x 1000 x 1e-6) = 159 Hz Alias of 1.7 kHz at fs = 2 kHz: |2000 - 1700| = 300 Hz (inside the signal band, so it cannot be removed afterwards) Attenuation at 1.7 kHz: |H| = 1 / sqrt(1 + (1700 / 159)^2) = 1 / sqrt(1 + 114.3) = 0.0932 (-20.6 dB) 100 mV peak-to-peak becomes 9.3 mV peak-to-peak, which the converter shows as a false 300 Hz tone of 9.3 mV / 0.8057 mV = 11.6 counts peak-to-peak (without the filter: 100 / 0.8057 = 124 counts) A single RC is only a gentle filter (6 dB per octave): to cut the 1.7 kHz tone further, lower fc (reduce R x C) if the signal band allows, add a second RC, or sample faster and filter digitally. Slew rate: a 3 V peak-to-peak sine has Vp = 1.5 V. MCP6002: f(max) = SR / (2 pi Vp) = 0.6e6 / (2 pi x 1.5) = 63.7 kHz (LM358, SR 0.3 V/us: 31.8 kHz) Gain-40 stage with GBW = 1 MHz: the small-signal bandwidth is 1 MHz / 40 = 25 kHz. This is below the slew-rate limit of 63.7 kHz, so the bandwidth is the stricter limit: the gain-40 stage is usable up to about 25 kHz (at that frequency its gain is 3 dB, 29 %, below 40), whatever the signal size. Checklist - Convert microstrain to x with the gauge factor, then use the bridge formula (exact for large x, quarter formula for small x). - In-amp: one resistor sets the gain; the REF pin sets where zero input appears on the output. - A shunt trades loss and ground shift for signal; amplifier offset limits the smallest current you can see. - The anti-alias filter must come before the converter; alias = |f - fs|. - Take the smaller of bandwidth (GBW / G) and full-power bandwidth (SR / 2 pi Vp).