Go Down

### Topic: wl705 arduino water level sensor (Read 539 times)previous topic - next topic

#### prodisoft

##### Feb 14, 2018, 05:36 am
somebody knows how can i implement this sensor in arduino to use in weather level measurement? I know i must use the sensor range vs mA, but i dont know where start. I appreciate your help.

Specifications:

Sensor Range: WL705-012 4" (.33') - 144" (12')
Supply Voltage: 10-30VDC (sensitivity reduced below 15 VDC)
Supply Current: 40mA
Averaging Time: 15 seconds
Temperature: -40º to +158º F Output Current:
4mA, maximum distance
20mA, minimum distance
Connections: Brown +15-30VDC
Blue Ground
Green 4-20mA output (WL705-048)
Black   4-20mA output (WL705-012 & WL705-003)

#### wvmarle

#1
##### Feb 14, 2018, 08:03 am
If I understand this correctly you have a 4-20 mA output. To read that output, connect it to a 125Ω resistor as load, then measure the resulting voltage over that resistor on an analog pin. 4 mA = 0.5V = ADC reading 102, 20 mA = 5V = ADC reading 1023.

Assuming 4 mA = 4", 20  mA = 144", use map() to convert ADC reading to height.

In code:

Code: [Select]
`float height = map(analogRead(sensorPin), 102, 1023, 40, 1440) / 10.0;`

Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

#### prodisoft

#2
##### Feb 15, 2018, 08:38 amLast Edit: Feb 15, 2018, 08:44 am by prodisoft
Thanks a lot, can i use this diagram?

#### wvmarle

#3
##### Feb 15, 2018, 09:04 am
Yes, that's the idea.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

#### prodisoft

#4
##### Feb 24, 2018, 02:24 am
how do you calculate the  / 10.0; value?

#5

Go Up