I am designing an ADC board for Raspberry Pi using the MCP3004 ADC chip. Please see my circuit below.


This circuit is intended to measure voltages form 0 to 10V, to have overvoltage protection (Vin<=24V), and reverse polarity protection.

According to datasheet BAT54 diode has a voltage drop of 240mV @ If 100uA. When 10V will be applied (Vin) the voltage divider will scale it to ~3V. At this time D2 is blocked (except for leakage current). As Vin will rise D2 will open and the input of op amp will stay close to 3.2V. To supply power to D2, a small 3V LDO will be used. When polarity will be reversed, the non-inverting input will see around -240mV, which is more than Vss-0.3V that is specified in LM358 datasheet, so it should be fine.

Everything went fine in simulation, but will this work in real life? When the polarity will be reversed, will the output of op-amp be stable close to 0V?

I read that op-amps are not happy with capacitive load. MCP3004 is a SAR ADC so it can be approximate as an capacitive load (20pF). For that reason Rx Cx are recommended to be used. My question is: Are they really needed? If yes, based on your experience/knowledge, what will be the optimum values?

Thank you in advance for your answers!

  • \$\begingroup\$ What power supply is connected to U2's VDD? \$\endgroup\$ – The Photon Sep 17 '19 at 18:30
  • \$\begingroup\$ @ThePhoton Power supply of U2 is 3v3. It was more simple to use 5V than a voltage level shifter for SPI bus but at this point this is not possible. \$\endgroup\$ – Petrescu Cristian Sep 17 '19 at 19:14
  • \$\begingroup\$ The LM358N reads Large Output Voltage Swing, which means you should carefully inspect the datasheet. 0v may not not produce exactly 0v out, as \$V_{OL}\$ states a max of 20mV error. This is quite small for an op-amp so is very good. \$V_{OH}\$ (high output voltage) is another thing however, stated as 26v from a 30v supply, so -4v. Behavior is not given at a supply of 5v. I'd try it at 5v and see if it does what it should, otherwise expect to power it from a higher voltage such as +12v to ensure reliable operation. \$\endgroup\$ – rdtsc Sep 17 '19 at 21:16
  • \$\begingroup\$ Regarding the Rx/Cx components ---- the ADC grabs a big hunk of charge during the input sampling. The opamp may well RING and RING, when hit with that "impulse". Thus a 200pf or 2,000pf cap, isolated with 100 ohm or 1,000 ohm is the way to avoid causing Opamp ringing. \$\endgroup\$ – analogsystemsrf Sep 18 '19 at 4:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.