0

I am using a sensor which delivers a 4 to 20 mA output. Converting this with a 250 Ohm resistor to ground I convert this to a 1 - 5 V output.

My question how can I change the 0V reference, so I can use the full spectrum I found a way to change the 5V reference (analogReference()). Is it possible to change the 0V reference of a input to 1V?

Any other solution to my problem is welcome as well! (As long as it doesn't involve I2C or anything which lowers my looptime drastically)

3
  • Not possible with the Uno, as it has only GND-referenced single-ended inputs. Commented Jun 22, 2015 at 8:25
  • On which board is this possible? Is there another way to use the full resolution?
    – KoenR
    Commented Jun 22, 2015 at 8:33
  • Don't know for sure. The Mega is based on the ATmega2560 chip, which has differential inputs to its ADC. If those are available on the board connectors, and if you can provide your 1 V reference to the negative input, it should work. Commented Jun 22, 2015 at 8:42

1 Answer 1

6

The ADC is ground-referenced, and there's no way to change that. The question is if that's necessary. The ADC has a 10-bit resolution, that's good for 1024 different levels between 0 and 5 V. If you convert the 4-20mA with a 250 Ω resistor to a 1-5 V range you still can discriminate between more than 800 different values.

If that's not enough you can use a differential amplifier to subtract 1 V:

enter image description here

By choosing R3 = 1.25 R1 you convert the 0-4 V range to a 0-5 V range.

3
  • I like the differntial amplifier answer. But, what are V1 and V2? Why are you talking about 0-4 to 0-5 when I have a 1-5? Thanks in advance!
    – KoenR
    Commented Jun 22, 2015 at 11:54
  • 1
    0-4v is 1-5v with 1v subtracted as the answer says. V2 is your signal at 1-5v, v1 is 1v reference voltage. V1 is subtracted from V2 (so 1-5 becomes 0-4) and then amplified by R3/R1 to make 0-4 into 0-5.
    – Majenko
    Commented Jun 22, 2015 at 13:00
  • Use a 2nd opamp section to make a unity gain buffer (OA out to OA-) use this to buffer a pot that you adjust to 1V (Pot feed OA+,OA out to V1. ) || Make One of the R3's adjustable using a bigger value pot than R3 fixed. eg if R3 = 10K make pot say 15K so you can adjust it either side of 10k slightly. This is used to make gain of V1 & V2 inputs track. || Overall accuracy is limited by balance of resistors so use 1% or better still 0.1%. (may not need pot above if R's are matched well enough). IF you want to avoid having to supply matched R's buy an "instrumentation amplifier" IC. Commented Jun 23, 2015 at 3:24

Your Answer

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

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