My project requirement is to make an analog current input to ADC of microcontroller. Analog input current has 4-20mA specification.

Since I don't have particular industrial sensor with 4-20mA specification, I realised this 15mA current source circuit for testing with my ADC interfacing.

Instead on getting same voltage on either side of the circuit, the ADC input always reads zero. Please look into the issue.

Current source setup

Analog current Input test to microcontroller

I made a circuit arrangement for analog current input test input for 3.7V compatible ARM microcontroller (figures used for symbolic purpose). There are two things happened here:

  1. Since 15mA current is passing through 185 Ω, I am getting 2.774V (practical value) across the resistor and MCU should interprete the same voltage in ADC values. I was not getting any ADC values, Is my circuit arrangement correct?

PS: I already smoked the microcontroller while connecting both analog and digital ground together in order to provide reference voltage to microcontroller.


closed as unclear what you're asking by Olin Lathrop, Chris Stratton, Voltage Spike, Wesley Lee, uint128_t Mar 3 '17 at 1:05


  • 4
    \$\begingroup\$ Do you think it's a good idea to connect 12V directly to the ADC input? This may be the reason why your micro smoked up. A voltage divider would help. \$\endgroup\$ – mic Mar 2 '17 at 15:55
  • \$\begingroup\$ Ya, I understand that 12v voltage is not a good idea for a 3.7v MCU. Further, current will be same irrespective of voltage value as it is constant current source arrangement. Actually 5v or less was not able to provide current through 330E resistor which I wanted to convert into voltage across 185E resistor. \$\endgroup\$ – Prasan Dutt Mar 2 '17 at 16:10
  • 2
    \$\begingroup\$ Even if it wasn't destructive, this circuit would accomplish nothing. Back up and explain what you are trying to do - without clarity there, you can't design a suitable circuit, and using an unsuitable one as you are trying to will only require extreme measures to make it compatible, for example an additional op-amp or active device, when what you should be doing is configuring the original op-amp to accomplish your unstated goal. Put the actual thing you are trying to measure at the left of your circuit and label it as an input. \$\endgroup\$ – Chris Stratton Mar 2 '17 at 16:18
  • \$\begingroup\$ It's a bit screwy, but it looks like you are attempting to read the voltage across the 185 ohm resistor in which case your gnd reference to the processor would be tied to Q1 collector. \$\endgroup\$ – Tut Mar 2 '17 at 16:21
  • \$\begingroup\$ @PrasanDutt - I have tried to help by changing your text to use the Ω symbol (and added some blank lines to split the questions and make it easier to read). Now you know what to do next time. \$\endgroup\$ – SamGibson Mar 2 '17 at 16:28

A- Your microcontroller and analog circuitry do not share a common ground, so A/D readings don't have much meaning.

B- the microcontroller measures voltage with respect to some reference, not "across a resistor", unless you provide that reference at one end of the resistor.

C- your microcontroller smoked because when you hooked your grounds together, the A/D input saw 12V.

  • \$\begingroup\$ I understood the reason for smoked up MCU. But still wondering how to interface voltage across R2 to MCU. Microcontroller has Vref supply of 3.7v and it can measure from 0-3.7V... Further, the collector point of transistor has a voltage of ~9.225V with respect to analog ground. How to take it as reference point? \$\endgroup\$ – Prasan Dutt Mar 2 '17 at 16:05
  • 2
    \$\begingroup\$ @PrasanDutt take a step back and tell us what you're trying to accomplish. Why do you need to know the current through R2 when it's largely set by R1? Why do you need to measure on the high side (which is why you're having reference problems) instead of on the ground-referenced low side? Which is your real load, R1, or R2? \$\endgroup\$ – Scott Seidman Mar 2 '17 at 16:17
  • 1
    \$\begingroup\$ Are you trying to measure the value of R2 indirectly? \$\endgroup\$ – Scott Seidman Mar 2 '17 at 16:18
  • \$\begingroup\$ My load is R2... As per the reference links already shared at beginning of question, I wanted to make a current source for current input test to MCU. As MCU cannot understand current so needed to be changed in voltage form using 185 Ω . \$\endgroup\$ – Prasan Dutt Mar 2 '17 at 16:27
  • \$\begingroup\$ @PrasanDutt -- this doesn't really answer my question. Why do you need to make a current, and then measure it? Either you have an unknown current, and you're trying to measure it, or you're trying to produce a current for some device. Which are you trying to do? I can't help unless I can understand. So-- take a big step back, describe what you're trying to accomplish starting from Step 1, not from the middle. \$\endgroup\$ – Scott Seidman Mar 2 '17 at 16:54
