Hi all!
I need to build a simple sensor for water. The classic method with one transistor with the probe in it`s base is not viable, the probe is "vanish" in time because of the electrolysis phenomenon .
I did a sketch with an ADC input and one output. The problem is that I want to disable the ADC an re enable only for the time to measure level and in that way I can drastically reduce the probe corrosion.
My problem is:
How to disable and re enable the ADC?
This is my Flowchart
Thank you!
Puiu,
Water level tank
Moderator: Benj
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: Water level tank
Hi Piui!
Maybe you can use this.
Best regard
Jorgen
Maybe you can use this.
Best regard
Jorgen
- Attachments
-
- WATER_LEVEL_1.fcfx
- (7.3 KiB) Downloaded 366 times
-
- Posts: 161
- Joined: Sun Feb 25, 2007 10:56 am
- Location: bucharest, romania
- Has thanked: 90 times
- Been thanked: 34 times
- Contact:
Re: Water level tank
Nope, it`s not working... Like mine, your`s It does not measure anything...
If I disable macros RAW enable/disable it`does measuring good but still have tension on the probes...
If I disable macros RAW enable/disable it`does measuring good but still have tension on the probes...
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: Water level tank
If you use the 'ADC base component' or one of its children listed at the help page and use the GetByte or GetInt macro this will be done automatically. These macros enable ADC when called and disable it before returning the measurement. Do not use the macros with 'Raw' in the name as they leave ADC enabled for faster sampling.
ADC is an input, it is only measuring the signal level present on the pin. The load generated by ADC is 10-1000 micro Ampere (10 e-5 to 10 e-3 Ampere) so hardly any load at all.
What is the circuit you are using? Can you post circuit diagram?
ADC is an input, it is only measuring the signal level present on the pin. The load generated by ADC is 10-1000 micro Ampere (10 e-5 to 10 e-3 Ampere) so hardly any load at all.
What is the circuit you are using? Can you post circuit diagram?
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 161
- Joined: Sun Feb 25, 2007 10:56 am
- Location: bucharest, romania
- Has thanked: 90 times
- Been thanked: 34 times
- Contact:
Re: Water level tank
GetByte was the fist attempt...
I found mistake! After ADC, I have to put output in 1 (+5v), not in 0 (ground)...
In that way, after ADC measurement the 2 probe are on the same potential (no flow current between them).
Here are the schematic and the flowchart.
Thank you for the help!
Puiu
I found mistake! After ADC, I have to put output in 1 (+5v), not in 0 (ground)...
In that way, after ADC measurement the 2 probe are on the same potential (no flow current between them).
Here are the schematic and the flowchart.
Thank you for the help!
Puiu
- Attachments
-
- water_level_sch.png
- (50.44 KiB) Downloaded 5913 times
-
- WATER_LEVEL.fcfx
- (5.94 KiB) Downloaded 341 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Water level tank
What I did with my level detector (probably over-kill but wanted to make sure) is one probe is connected to an output pin (E.g B0) instead of +5V, the other probe to a 1Meg pull-down resistor and ADC.
Every second:
Output B0 high
Delay 2ms
Read ADC (value determined by water level).
Output B0 low
2ms along with very low current should not be enough time to allow electrolysis to take place.
Every second:
Output B0 high
Delay 2ms
Read ADC (value determined by water level).
Output B0 low
2ms along with very low current should not be enough time to allow electrolysis to take place.
Martin
-
- Posts: 161
- Joined: Sun Feb 25, 2007 10:56 am
- Location: bucharest, romania
- Has thanked: 90 times
- Been thanked: 34 times
- Contact:
Re: Water level tank
Brilliant idea!
I made the modification and it`s working like a charm.
Thank you!
Edit schematic:
I made the modification and it`s working like a charm.
Thank you!
Edit schematic:
- Attachments
-
- WATER_LEVEL.fcfx
- (6.92 KiB) Downloaded 360 times
-
- water_level_sch.png
- (47.92 KiB) Downloaded 5886 times
- Steve001
- Valued Contributor
- Posts: 1189
- Joined: Wed Dec 31, 2008 3:37 pm
- Has thanked: 460 times
- Been thanked: 523 times
- Contact:
Re: Water level tank
Hi,
Have you thought of ultrasonic water level sensor ? when i was an apprentice the company i worked for made one, for detecting the level of sewage in a tank / weir.
This environment was too aggressive for probes and they used to melt in no time
If there is a risk of high water level reaching the sensor, you need to put a pipe with a perspex end cap or something similar so you still get a reading say 300mm
if the sensor is submerged you loose your echo, with the pipe over the heads you can still record a high level without a loss of echo .
Maybe a thought i know you wanted to keep it simple
Steve
Have you thought of ultrasonic water level sensor ? when i was an apprentice the company i worked for made one, for detecting the level of sewage in a tank / weir.
This environment was too aggressive for probes and they used to melt in no time
If there is a risk of high water level reaching the sensor, you need to put a pipe with a perspex end cap or something similar so you still get a reading say 300mm
if the sensor is submerged you loose your echo, with the pipe over the heads you can still record a high level without a loss of echo .
Maybe a thought i know you wanted to keep it simple
Steve
Success always occurs in private and failure in full view.
- Steve001
- Valued Contributor
- Posts: 1189
- Joined: Wed Dec 31, 2008 3:37 pm
- Has thanked: 460 times
- Been thanked: 523 times
- Contact:
Re: Water level tank
found this whilst looking on internet for something else
http://www.analog.com/library/analogdia ... ONE_AL_MQL
Steve
http://www.analog.com/library/analogdia ... ONE_AL_MQL
Steve
Success always occurs in private and failure in full view.