Measuring laser transmission with photodetector, I obtain voltage values in the range of [0:9]V. The output of the photodetector is to be observed on oscilloscope and taken as input in ADC of Arduino Due for further processing. The I/O pins of the Due have voltage limit of 3.3V. In order not to exceed the voltage limit I need to 'rescale' the voltage from 0-9 to 0-3.3V. I am thinking of doing a voltage divider + buffer op-amp. From the voltage divider equation and plugging the maximum values: $$V_{out}=V_{in}R_2/(R_1+R_2)$$ $$R_1=1.72R_2$$ Since I do not have experience in electronics few questions arise: Is this the correct way to approach the problem? What should be the values of the resistors in the voltage divider? Also, are there any considerations I need to make for the op-amp and the its supply voltages?
2 Answers
This circuit uses the very common (but old) LM358.
The idea is to divide by 3 and then multiply by 1.1
(9/3)*1.1 = 3.3
Input offset voltage shouldn't be a problem with such a low non-inverting gain (1.1).
R3 (2k4) is included to make the impedance seen by both inputs equal thereby reducing output offset due to input bias currents.
I have suggested a +9V supply to give the output plenty of headroom. The negative supply for the circuit is ground which will enable the output to get down to within a few 10s of mV of 0 V when the input to the circuit is 0 V. If this is not accurate enough then use a negative voltage for the negative supply instead of ground which will enable the output to get right down to 0 V when 0 V is input to the circuit.
If you want to use + 3.3 V for the positive voltage supply then you will need to use a rail to rail input and output op amp such as the LMC6482AIN so as not to violate common mode input range.
Any source resistance higher than 0 ohms will affect accuracy and so if source resistance is significant then buffer the input signal with a unity gain buffer in which case you will need to raise the supply voltage to + 12V so as not to violate common mode input range (if using a LM358 for the buffer).
This circuit uses easy to obtain E24 series standard values.
-
\$\begingroup\$ Thank you for the answer! Could you explain on how we chose the value of R3? \$\endgroup\$ Commented Aug 14, 2022 at 18:54
-
\$\begingroup\$ Without checking, I'm pretty sure 0V will not be in the allowable common mode input range for the lm358 with only a high supply. Probably easiest to not bother with the buffer, and stick to resistors below 1k \$\endgroup\$ Commented Aug 14, 2022 at 19:27
-
\$\begingroup\$ @OgnyanPetkov Impedance seen from inverting input is 10k//100k = 10k*100k/(10k+100k) which is equal to impedance seen from non-inverting input = (R5//R4)+R3 = (20k*10k/(20k+10k)) + 2.4k. So basically calculate the impedances seen from each input without R3 in place and then size R3 to make up the difference between them. \$\endgroup\$– user173271Commented Aug 14, 2022 at 19:28
-
\$\begingroup\$ @ScottSeidman The LM358 has a common mode input range that includes ground. \$\endgroup\$– user173271Commented Aug 14, 2022 at 19:32
-
1\$\begingroup\$ @SpehroPefhany I'd go along with that. \$\endgroup\$– user173271Commented Aug 14, 2022 at 21:59
The op-amp needs a separate power supply from the input. It might be convenient to power it from +3.3V.
If you use a RRIO op-amp such as MCP6021 you can otherwise do this.
You could use 280K for R1 and 162K for R2, which are standard E96 series values. There should be a bypass capacitor near and across the power supply pins of the op-amp (100nF is fine) and I would also put a small ceramic capacitor across the 162K (maybe 1nF) which would be -3dB at ~1600Hz.
Because the input resistors are relatively high value the loading on the input is minimal and it can also withstand large overloads without damage. Equally important, the output voltage will not exceed the 3.3V supply so it can't easily damage the Arduino MCU as applying more than 3.3V or less than 0V (by > 1 diode drop) could do.
-
\$\begingroup\$ Inputting + 3.3 V into a MCP601 buffer whilst its powered from a + 3.3V supply, will violate its common mode input range. \$\endgroup\$– user173271Commented Aug 14, 2022 at 18:36
-
\$\begingroup\$ ... or smaller resistors by two orders of magnitude, and skip the buffer, unless minimizing current or loading the sensor is an issue. \$\endgroup\$ Commented Aug 14, 2022 at 19:41
-
\$\begingroup\$ @James Good point, it has to be a RRIO for this to work. Will change P/N to MCP6021. \$\endgroup\$ Commented Aug 14, 2022 at 21:11