I am trying to measure current from a DC circuit. So it basically I am trying to make an ammeter. I am using ACS712 20A current sensor and Arduino UNO. Theoretically, I can measure a minimum of 50 mA current using ACS712 20A and a 10-bit ADC (built-in with Arduino UNO). In practice, however, it may be 150~200 mA due to noise. My problem is that I want to plot a characteristic curve of a transistor for that I need to measure current in the microampere range.

My idea is to somehow amplify the current and then measure it using the existing setup. For example, if there is a 10 micro ampere current in my circuit, then I will place a black box in front of the ammeter that multiply the current into a factor of 10k. So, the ammeter would measure .1A or 100mA. Likewise, a 12 microA current would be amplified to .12A or 120 mA.

Now, is it possible to build such a black box? The black box can contain its own power source or anything! I heard that transistors can amplify current. How can I connect the transistor so that I gain such current?

I do not have prior experience with electronics. I only took freshman-level physics courses. So, if some parts are unclear, I apologize. I will try to provide clarity in the comments in case you ask.

  • \$\begingroup\$ One factor is the range of current. If you only need to measure current over a few orders of magnitude, you can select a reasonable burden resistance to put in series and measure or amplify the voltage drop across the burden resistance. For really small signals like micro or nanoamps, you may need an engineer as all kinds of interference and error matter. \$\endgroup\$
    – K H
    Apr 19, 2021 at 10:43
  • \$\begingroup\$ Look into a Transimpedance Amplifier, I have a picoammeter that uses this method to measure current and has a ranges from picoamps to 10's of milliamps. \$\endgroup\$
    – user30884
    Apr 19, 2021 at 11:44
  • \$\begingroup\$ @Earmen: Depending on how clever you get (and how patient you are,) it is possible to generate and measure the base current using just the Arduino. You might want to look into how my gadget generates the microampere level base current, but also use your ACS712 to measure the collector current. \$\endgroup\$
    – JRE
    Apr 19, 2021 at 11:57
  • \$\begingroup\$ Instead of a hall-effect sensor like the AC712, for small currents you should use a small resistor in series (shunt), measure the voltage drop, and amplify the voltage if necessary. Since your shunt resistor won't be referenced to ground, an instrumentation amplifier is often used for situations like this. Google current sense circuit instrumentation amplifier, but you will probably find that building something like this is beyond your ability right now. If you are persistent and patient, you can learn; this would be a good starter project. \$\endgroup\$
    – Mattman944
    Apr 19, 2021 at 12:48
  • \$\begingroup\$ Also, it is easier to measure small currents if you can tolerate a large voltage drop across your shunt resistor. There are trade-offs to be made. We will need to know a lot more about your project if we are going to help you make these decisions. \$\endgroup\$
    – Mattman944
    Apr 19, 2021 at 12:52

2 Answers 2


The ACS712 has voltage output. Rather than try to amplify the current, it would be simpler to amplify the voltage output.

More reasonable, though, would be to use a more suitable current sensor. A 20A current sensor is just not the correct tool for measuring microampere level current.

There are many other current sense sensor models available with ranges more appropriate to measuring microamperes.

If you were doing general current measurement, I'd recommend that you use one of those better ICs or modules. They can accurately measure low current with low voltage drop to the load.

You aren't trying to measure current in general, though.

You are trying to measure the base current of a transistor in order to plot its current/voltage chart.

This means that you don't have to care in the slightest about the voltage drop across the current sensor. You are free to measure current the old fashioned way with a shunt and a couple of voltmeters.

  • Your Arduino has a handful of analog to digital converters (ADCs) that measure voltages - two ADC channels is two voltmeters.
  • A "current shunt" is any resistor with current flowing through it. There will be a voltage drop across it that you can measure.

For your use, you can pick a high value resistor. That wouldn't work for a general purpose ammeter because the voltage drop will be awful across it.

For your IV tracer, that's fine.

I did this very thing a couple of months ago, with this circuit:

enter image description here

As it is, that circuit will generate a base current from 0 to about 5 milliamperes.

I use the Timer1 library to generate a pulse width modulation (PWM) signal at about 10kHz. With the high frequency, the simple filter is adequate to smooth the base output to DC. The Timer1 library also gives you 10 bits of resolution on the PWM duty cycle - you can vary the output voltage with 1023 steps.

Using the two ADC channels and the known (measured) value of resistor R2, you can measure the current going to the base of your transistor.

The base signal is rather noisy, and ADCs of the Arduino aren't really up to microvolt measurements, but if you use oversampling, you can reduce the noise and gain precision at the same time.

Set the output PWM value, measure and average both channels a few thousand times each, and you have your base current. You only need to measure the base current at the start of each trace, so while it slows things down it is not a complete show stopper.

This is a plot made using the method described above:

enter image description here

The base currents are give to two decimal points of precision in microamperes in the upper right corner. They are truthfully no more precise than about 0.5 microamperes, but I needed more decimal points to be able to judge that.

Since you have the ACS712, I'd say go ahead and use it to measure the collector current but generate and measure the base current using the Arduino and a resistor.

Absolute accuracy is pretty much impossible on an IV tracer, no matter what you do.

  • The variations in room temperature alone will cause variations in the curves - measurements made on a cold day will be noticeably different than measurements made on a warm day.
  • Transistors vary. Two transistors of the same type made on the same date can give traces that are very different.

The thing about good amplifier design is that a good design doesn't care about the specific values of the transistor as far as current gain goes.

Build your tracer, and try it out. In building it, you will learn a lot about transistors and how they work. In using it to design an amplifier, you'll learn even more.

  • \$\begingroup\$ thanks, it really helps. But I do not understand why are we using the capacitor C1 in the circuit you provided? \$\endgroup\$ Apr 20, 2021 at 3:52
  • \$\begingroup\$ And one more thing. You said, "Using the two ADC channels and the known (measured) value of resistor R1, you can measure the current going to the base of your transistor". In your circuit, we should know the value of R1 and R2 both, right!? \$\endgroup\$ Apr 20, 2021 at 4:40
  • \$\begingroup\$ @Earmen: You measure the voltage on each side of R2. Take the difference, and divide that voltage by R2. That gives you the current through R2, which is also the current through the base of the transistor. \$\endgroup\$
    – JRE
    Apr 20, 2021 at 6:05
  • \$\begingroup\$ R1 and C1 convert the pulse width modulation signal from the Arduino to DC. R1 and C1 are a low pass filter. \$\endgroup\$
    – JRE
    Apr 20, 2021 at 6:06
  • \$\begingroup\$ There was a typo in the text. I referred to R1 to calculate the current when I should have referred to R2. \$\endgroup\$
    – JRE
    Apr 20, 2021 at 6:07

Have you tried googling "op amp current sense"? Also, eevblog ucurrent


Don't amplify the current, convert it to voltage and amplify voltage. Here is something more Andreas Spiess video

  • 2
    \$\begingroup\$ This is not an answer, it's a couple of suggestion links. Answers on stack exchange are expected to actually answer the question without replying on external resources. If those links die then this "answer" becomes useless. \$\endgroup\$
    – brhans
    Apr 19, 2021 at 14:25
  • \$\begingroup\$ It is an answer. Those links are not required. \$\endgroup\$
    – Hedgehog
    Apr 19, 2021 at 15:52
  • 1
    \$\begingroup\$ "Have you tried googling "op amp current sense"?" is a comment asking the OP for further info - the place for that is in the comments under the question. All that's left then is "Don't amplify the current, convert it to voltage and amplify voltage", which is not particularly useful as an "answer" - particularly considering the OP's stated lack of experience: "I do not have prior experience with electronics. I only took freshman-level physics courses." Note that I'm not suggesting that you're wrong, just that what you've written here is not particularly useful as an answer. \$\endgroup\$
    – brhans
    Apr 19, 2021 at 16:01
  • 1
    \$\begingroup\$ @brhans - Hi, I understand your concern. However from a mod viewpoint, it doesn't quite meet the "link-only answer" threshold - even without the links, there is an answer attempt of one line. As you say, some people might decide that it's "not particularly useful", but it is an answer attempt. It's up to the community (via voting) to decide, even if the links were unavailable, whether it is a useful answer or not. Some further reading on Meta.SE here. || Hedgehog - If you can improve (e.g. add info from the links), that would be great. \$\endgroup\$
    – SamGibson
    Apr 19, 2021 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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