I'm trying to design a universal input circuit which can accept 0-10v as well as variable 0-300k resistance.

I'm using this ADC (mcp3008) which has a maximum input of 5 volts , couldn't find an equivalent product that isn't cheaper than 15 pounds

Therefore I design 2 circuits , one which can accept resistance as an input (R2)(where I provide it with 5 V and then convert the voltage to resistance in order to figure out what resistor is connected ): enter image description here

The other has a potential divider which can accept 0-10 volts as input (V1) : enter image description here

So my main question is how can I combine these two together so that I can have an input that would accept both a resistor between 0-300k or a voltage between 0-10 ?

  • 1
    \$\begingroup\$ (1) What is your voltage source for the analog input? (2) Will it be able to sink current from your resistance measurement and keep its output voltage constant? (3) It's more readable if you follow convention and have your circuits read from left to right. The ADC input should be on the right since that's the way the signal is travelling. \$\endgroup\$ – Transistor Nov 10 '17 at 13:47
  • \$\begingroup\$ the voltage source for the analogue input will be from a raspberry pi \$\endgroup\$ – bluetiger Nov 10 '17 at 13:49
  • 1
    \$\begingroup\$ They don't have analog outputs as far as I know so that comment doesn't help. \$\endgroup\$ – Transistor Nov 10 '17 at 13:51
  • \$\begingroup\$ I was referring to V1 in the 1st circuit, there is no voltage input for the 1st circuit its just a resistor (R2). \$\endgroup\$ – bluetiger Nov 10 '17 at 13:57
  • 1
    \$\begingroup\$ (1) For resistance measurement there is going to be a current source of some type connected to the input pin. This will run a current through the resistor under test and generate a voltage that you can measure. (2) For voltage readings your analog 0 - 10 V voltage source will be fighting the current source. That's why we need to understand what the 0 - 10 V source can tolerate. \$\endgroup\$ – Transistor Nov 10 '17 at 14:01

The cleanest method to do what you want is to use a constant current source to the input. This will generate a voltage across the resistor under test (RUT) proportional to the resistance. To get 10 V at 330k we need a current of \$ I = \frac {V}{R} = \frac {10}{330k} = 30 \ \mathrm {µA} \$.


simulate this circuit – Schematic created using CircuitLab

Figure 1. Dual-purpose analog input. 0 - 10 V or resistance measurement to 330k.

  • OA1 provides a buffer between the input and the voltage divider required to feed your ADC. It needs to be able to swing to 0 V so check this in the datasheet.
  • R1 / R2 divide the voltage down to 5 V for your ADC.
  • V++ will need to be higher than 12 V to provide enough headroom to operate the 30 µA constant current source. You'll probably need 15 V.
  • The constant current source will inject 30 µA into any 0 - 10 V source you connect to the input. That's why I requested more information on that.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.