Author Topic: Safely measure DC voltage for MCU  (Read 764 times)

0 Members and 1 Guest are viewing this topic.

Offline mitrynicolaeTopic starter

  • Contributor
  • Posts: 45
  • Country: ro
Safely measure DC voltage for MCU
« on: December 27, 2018, 06:06:09 pm »
Hello everyone!

I need your help in designing the input circuitry before the ADC of the MCU. The design should meet the following requirements:
1. the allowed input voltage should be between 0 and 25 volts
2. the output voltage should be between 0 and 5 volts
3. it should be as linear as possible
4. it should protect the MCU ADC for unexpected failure (input should not get to ADC pin by any means; In my design I was using an op amp buffer)
5. it should have a reverse polarity protection (it's a must)
6. it should have an over voltage protection(it's a must). If by mistake the operator of the device inputs 30v instead of 25 maximum the circuitry should survive without issue. A value above 25V will be read as 5 volts. Also if the erroneous voltage disappear from the input, the circuit should recover by itself.
7. it should use as few components as possible
8. it should not use dedicated ICs (maybe already exists)
9. it should have a compensatory adjustment in case some components don't exactly match the specifications (plus or minus 20%) (it's a must)
10. the supply voltage for the circuit will be 5V max.

I have come with the following schematic. Please analyze it and let me know if there is anything wrong with it (except the high power consumption on the input which I already know.)

P.S. Please note that the op amp used is actually MCP6022 (but that part does not exist in my simulation tool.)
 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1852
  • Country: ch
Re: Safely measure DC voltage for MCU
« Reply #1 on: December 27, 2018, 08:25:35 pm »
Resistive divider with high enough values and software cal...
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1325
  • Country: gb
    • bitdynamics
Re: Safely measure DC voltage for MCU
« Reply #2 on: December 27, 2018, 10:15:46 pm »
First question, what is your required measurement bandwidth or sampling rate?  if you have a low bandwidth (say 1Khz / 2ksps or lower) then it's trivial to arrange a resistive divider with suitable diode or zener clamping to achieve these aims (ie no active circuitry)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf