Pages: [1]   Go Down
Author Topic: can't get full range from 4mA-20mA sensor  (Read 1831 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I've looked through the archives and as such I am using a 220ohm resistor to read the voltage of 4mA-20mA humidity sensor that takes 12-24vdc. I've mapped the sensor readings as follows:
senConv    =  map(senReading, 180, 900, 0, 100)

where
4mA*220ohms= .88v
20mA*220=4.4v
and for mapping
180= .88v/5v*1023
900=4.4v/5v*1023

The problem that I am having is that the sensor will not read above 70% humidity which is equal to around 3 volts.  Is it possible that the resistor is causing too much of a voltage drop such that the 0-5v scale can not be realized?

Thanks in advance for any feedback.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16540
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you draw out the complete circuit being used including the loop supply power supply and how it's wired to the arduino?

Lefty

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Lefty,

Thanks for the reply.  Please excuse the rough nature of this diagram, it shows the top rail of the Arduino with the humidity sensor and 15Vdc power supply coming into it.

Cheers,
Chumann

                         ____________________________Humidity Sensor (non polar)
                        |                                               |
                        |-220ohm-|                               |
                        |                |                               |
                        |          V    |                               |
                        |          i     |                               |
                        |          n    |                               |
x   x   x   x   x   x         x    x    x    x    x    x        |
A   A   A   A   A   A        |    G    G   5    3    R        |
5   4   3   2   1   0         |    n    n   v     v    e        |      < 15Vdc into Arduino
                                    |    d    d               s        |
                                    |_______________________|
« Last Edit: May 24, 2011, 07:58:08 pm by chumann » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16540
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well that wiring plan looks OK to me. Do you have a link to the sensors datasheet? Possible things you can try to troubleshoot:

Measure the current in the loop when you apply 100% humity to the sensor. If it doesn't reach 20ma, and the sensor is not at fault, then you need to either increase the loop voltage or lower the resistor value until you can reach a 20ma = 100% condition. Most loop powered sensors are designed to work with a 24vdc loop voltage and below that there are resistrictions on the total amount of loop resistance allowed (wire length + sensing resistor).

Lefty

Logged

0
Offline Offline
Shannon Member
****
Karma: 162
Posts: 10456
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If it is designed for 24V it is very likely the current output doesn't have enough voltage compliance to work from 5V.   If it can be powered from 9V say (but the analog pin protected by a 4v7 zener) the full voltage range might be achievable - again the datasheet would be useful
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: