Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Water monitoring using PIC.

Status
Not open for further replies.

Sajjadkhan

Full Member level 5
Joined
Sep 25, 2010
Messages
307
Helped
17
Reputation
34
Reaction score
16
Trophy points
1,298
Location
Rawalpindi,Pakistan
Activity points
4,199
Hey guys, i found a intresting project for water monitoring system.
https://www.practicalarduino.com/projects/water-tank-depth-sensor
Previously i was using Water proof POT acting as a float valve and sending that POT voltage to ADC, that Project didnt last long because in summer temperature is quite hot (40 degree )and the the tank was black in color, the POT gone mad after 3 months. any ways that was 2 years back, the tank was at 10 meter distance from the circuit.

Now in my recent home, tank is 40 meters away. 25 meter to the roof and 15 meters horizontal distance.

I am going to use the pressure sensor as in the link above( tank is now white in color by the way ). so if i am going to use PIC's ADC then what about the noise in that wire, sensor got 4 pins, so 4 pairs of wire is needed. 2nd option is to go fro RF module or Zigbee (haven't work on both of them ). a normal 4 paired telephone wire would be cheap but it got 1 ohms resistance per meter ( i think). So what option would be good?

Resolution would be 1, from 0 to 100 %.
 

hi,
RF modules will do , but they will increase a little the cost of your project and beside that you will need to spend a little time programming them ( i worked with PmodRF1 transceivers in the past, i think i could give some help if so ....).

Of course your first idea with wire would bee cheaper, so it worth to stick around this idea.
my suggestions :
-You can use cable to take the analog signal from sensor to pic mcu, ~40 ohms is not so much, but you have to consider that resistance is modified by temperature , if that does not affect to much your measurements , it's ok.
- instead of transmitting voltage signal thru cable you could transmit a frequency signal witch is proportional with the output voltage of the sensor. To do that you need to use a simple circuit to convert the voltage from the output of the sensor to frequency (i may have souch a circuit schematic using a 555 and 741 opamp, that i built in the past... if needed ) .Then you use the the pic mcu at the other end of the cable to process that signal . You could also build the voltage to frequency converter with a small PIC that has ADC ....
- ....or you could use 2 PIC's , both with UART (or USART) , and one with ADC . You just have to google about maximum length of serial cable

In principal as i see , your problem is about information transfer over 40 m distance , you can solve it easy in one way or other ....
 

Well I would really love to work on RF modules but as time restraints and cost ( for this project ) i was thinking sticking with the UART thing. i worked on it so it will be easily achieved. now 40 meters is long distance for UART, it can do about 15 meters i think. so is it good that from PIC to PIC i make 2 points and use MAx232 to maintain the digital signals, it will be like boosters. and keeping the baud rate slow, its ok because i would be updating my result after a minute. ( after all its a water tank, what can possibly go wrong).


Tank-->PIC------------------------->MAX232-------------------------------->MAX232---------------------------->PIC in my room

I think using MAX232, the noise effect on wire will be low, after all its a long wire and it would act as an antenna, but for digital signals, its no problem. but using adc over this much distance is stupid.
 

hi,
i like your idea, I made a rs232 serial connection between pic+max232 and pc with 25 m null modem cable that i made myself , and at 9600 baud rate it still works fine for me . I used simple CRC for handling data packetts.

Ps: https://www.lammertbies.nl/comm/info/RS-232_specs.html
RS232 cable length according to Texas Instruments 9600 baud / 500 ft = ~ 150 m
 
Thanks for the link. i like the CRC idea, i didn't thought of that (read that 4 years back in digital communications), but if i use 4 paired wire, like in telephone, i dont know the capacitance so i guess i will slow down the baud rate as in your link it suggest longer distance effect the wave shape (again because of capacitance, the voltage cant build upto specific level in that much time) but again it can be checked with function generator and oscilloscope.
 

hi again,
about post #3 , i don't think that using adc over that distance is so stupid. I know the output of your sensor is in mV and the 40m cable..... , but if you put a simple amplifier (with discrete components or ic's doesn't matter ...) at the sensors output ? For example you could build that amplifier with such gain that for max. water level you have lets say 20 V and for minimal water level o V. Then you apply that output to the cable (on the other 2 wires you could supply the sensor and amplifier ) . On the other end of cable you can put a resistor as a load and then measure the voltage on that resistor with your PIC's ADC . (You could put every time a measuring instrument in parallel with that resistor to measure directly in % the water level if you choose the resistor in souch way) . I still like the idea with the serial link between PIC's

best regards
z1
 

well for clear weather its ok, but i have experienced noise up to 50mv by sipmply putting the pototiometer outside connected to long wire, pot was 1k, and it was enclosed in a box, conneceted to long wire, i think its was 20 to 30 meters. step size of my adc was 5mv per bit so i was getting error of 10bits, but in clear weather the values were quite stable. in addition in areas where power lines are still distributed via poles rather than undergroung will also increase the noise.. even if u look at the rs232 standard, the voltages above -3 and +3v are considered as logics, because they think that noise can be up to this level.

any ways that pressure sensor is rejected by me because it does not have enough steps to fullfill my need. e.g. its sensitivity is 1mv per Kpa. 1Kpa = 0.145 Psi. my tank total pressure is 2.2 psi. so its a failure. i am thinking again of using a water poof pot but in such a way that it last long enough.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top