stupidly simple problem but in need of help :(

sim_carp

New Member
hi there everyone

im pretty new to PICAXE and im having a few problems with my first proper project. i am using a PICAXE18 and using the new YENKA PICS software made by good old crocodile clips to generate code and program the hardware. I am also using a standard 18 pin project board supplied by tech-supplies.co.uk

my problems are with a water level sensor design. I have code which i am confident of. whereby 3 switches are turned on and as a result, for each switch that is connected 2 seconds are added to a delay between the flash of an LED....... planned result being that when all switches are closed more delays are added and the LED flash is less frequent..... when all connections are broked no extra delay is added and the LED output flashes much quicker.

My hopes were to use the water itself as a conductive path to "close the switch" on the inputs as it were, but this doesnt seem to work in real life. bridging the wire manually does however bring the desired effect

My conclusion is that the resistivity of the water is causing the problem.... incidentally i did discover tipping a load of salt into the water (lot more impurities) made the system work perfectly!

any suggestions as to how i might make this work would be really greatful.

last thing to mention... this project is due in 8 days !!!!! aarrrrghhhh!

thanks in advance for your help and advice.
 

manuka

Senior Member
Any code for us? You don't say if this is rain water (which usually has higher resistance), nor what the sensors are,nor how they're positioned in the "tank". How are you powering this setup? Tell us MORE PLEASE, especially your budget!

Water level sensing is a traditional need "down under", especially in our present parched conditions, & all manner of approaches have emerged. (Come in Dr_A ?) Often RELIABILITY is crucial, & bullet proof float switches,capacitance sensors or level floats may be preferred over plain resistance changes (which can be fooled by water residues,damp leaves,algae etc). Accidentally having the tanks run dry due to a faulty sensor can be agonising,COSTLY,& even LETHAL- especially in the Oz. outbacks where the nearest top up water may be 100s of km away...

There are diverse PICAXE techniques that should respond to resistances in the MegOhm range, perhaps using READADC & the likes of the sensor shown (which may already be close to your approach) => http://www.siliconchip.com.au/cms/A_30607/article.html

Maybe even consider a redesign to exploit optical or magnetic changes with level?

THOUGHT: If it works OK with salt water you could always re-brand it as a tide level indicator for sea water? (Just teasing!)
 
Last edited:

sim_carp

New Member
more details

oaky more details....

the device is for monitoring water levels in a pets water bottle. it will be used with regular tap water. the sensors are literally two wires within the bottle, my thought being no water means switch open and water present switch closed.. evidently not correct. there are 3 levels within the bottle, at aproximatel 1/2, 1/3 and 1/4 way up the bottle. the prototype i'm building is powered by 4 x AA cells.] as for budget.... cheap. This is nothing spectacular or particularly inteligent. i just need a switch over when the water drops below certain points.

i didnt mention in my initial post but i am using te 2 ADC inputs for other functions of the circuit and so at the moment i am just left with 3 digital inputs

hope this helps.

Simon
 

inglewoodpete

Senior Member
The high impedance of a FET could be used as an input conditioner.

470kohms (or 1Mohm) from the Gate to +5v would hold any N-channel FET (Eg 2N5485 or 2N7000) 'on' and the water would pull the gate low. Use a 10k pullup between the drain and +5v too.
 

moxhamj

New Member
Is this a project that is due for school/uni and is for marks? Or is it something you want to work long term for yourself? The reason I ask is that practically any metal you put into water will corrode. Copper in particular will corrode and produce toxic water which could well kill a pet. You might get away with gold or platinum but the gold needs to be high purity and not alloyed with other metals.

There are lots of solutions. Thinking about the complexity of sensors I wonder about putting the water bottle on some scales and measuring the weight. Maybe you can hack into the display of a commercial unit or build your own load cell, or just go simple and have a wooden platform on a spring that operates microswitches and adjust some weights so it all works at the correct trip points.

Then there are pressure sensors, but I doubt you will get one shipped to you and debugged in 8 days.

If you are not actually going to ever give the water to a real pet, then the wires in water will work. Simple experiment - stick the black and red multimeter leads in some water and measure the resistance. Might be over a meg if the water is pure. Then choose a resistor of the same value and use a simple voltage divider where the water is the other resistor. You might even get away with feeding this directly into a picaxe pin.
 

papaof2

Senior Member
The quickest system I can think of (because parts are probably available at any electronics shop) would be a ring magnet on a round float (plastic, varnished wood, whatever) that is held in place by a vertical plastic tube through the hole in the magnet (and float) - this will require some creative engineering to install the vertical tube inside the bottle. The detectors would be reed switches placed at the proper levels either inside the tube or on the outside of the bottle. If the switches are inside the tube, the wiring would exit the end of the tube where it exits the end of the bottle.

There's nothing unique about the design - GEMS makes a number of level switches using floating ring magnets around a tube that contains one or more reed switches which is operated when the magnet is at the proper level.

John
 

ingeer

New Member
Try using a 40106 Schmitt trigger (about 80 cents, Aussie). These has six inverting triggers on the chip.

Connect the chip negative supply to your -5V supply Terminal 7) and to a probe in the bottom of your tank, Bare the end of your bottom probe (conductor) about 10mm.

Connect your +5v to the chip + input (terminal 14) and to one of the chip inpits via a 3megohm resistor. This will give you an inverted output from the trigger. You can use a second trigger to re-invert the output (daisy chain two triggers).

With the high resistance there is no electrolysis, and I have used the same pair of bare wired for over three years on my hydroponics (no, I'm not growing that stuff!), - 18 operations per day times 265 days = a few operations.

Great funn, and not a great learning curve to handle.

Good luck.

Ingeer.
 
Top