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.

[ARM] Detect 2 PWMs in water

Status
Not open for further replies.

pivic

Newbie
Joined
Oct 15, 2014
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
52
Hello,

I am trying to detect the presence of water at two different places. To do so I designed a circuit interfacing a microncontroller to the water. Two PWMs at different frequencies are generated and immersed in water. Two PWM inputs are "hanging" waiting for the level of water to rise. Note that water in both tanks can be in contact.

See image:
PWM detection.jpg

Using a STM32f051 I can detect PWM1 on PWM input 1 OR PWM2 on PWM input 2 but I can't detect anything useful if both PWM1 and PWM2 are in the same water at the same time.

I am looking for a good combination of frequency, duty cycle and phase to be able to read the 3 different possible states (PWM1 alone, PWM2 alone, PWM1 & 2 at the same time).

The schematic:
Fill_decctor_ctl and Leak_detector_ctl are both PWM1 and PWM2.
Fill_decctor and Leak_detectol are both PWM input 1 and PWM input 2.
schematic.jpg


Can anyone please help me to make it work?

Thanks,
Pivic
 

I don't see why multiple level switches in a tank (or multiple connected tanks) would use different frequencies. They are essentially impedance probes. You have an indifferent/ground electrode which can be the tank body if it's conductive and one or multiple electrodes driven by an AC source through resistors. If the electrode is immersed, it's voltage against ground falls below a threshold level.
 

Use Ultarsonic sensor module like US 020 to detect fluid level without contact to fluid.
 

Your suggestion may work, but it is far simpler to have an electrode pair immersed in each tank in close proximity to make each pair a capacitor. Then use a constant current source at some f to measure V proportional to depth.

Then using the properties of water with a dielectric constant of ~60 you can measure capacitance or impedance at different sinewave frequencies for depth. Using PWM can work but also can fail with more EMI.

To choose two pulses not harmonically related is difficult as harmonics overlap. But Dual Sinewaves are used for impedance measurement of Eddy Currents in metal. Then the vector impedance is measured for each.
 

Thanks for all your answers!

I used different frequencies in order to differentiate which sensor is immersed. Using only the continuity would not work because they share the same ground and the water can be connected.
Originally I wanted to detect the level with a no-contact technology but unfortunately the casing/enclosure of the whole system is already made and can't be changed (out of my control).

The four electrodes are already moulded in plastic and cant be moved either :(

I should have written water in quotes as it can be very dirty (e.g. sewer)

One way I thought would be to have both PWMs at the same frequency, opposite phase and different duty cycle. I can detect each thanks to the duty cycle and the both together should create a frequency twice the original?
 

As previously said, I don't understand your reservation about using multiple electrodes with common ground. Commercial conductive level switches don't have it.
 

Can you consider piezo echo in air remaining in vessel to compute fluid height or speaker resonant frequency to compute volume of air by resonant frequency using detect peak of sweep. Dual tanks can use non-coherent sweeps with tracking filter and peak measurement frequency to compute air volume and thus subtract from vessel,volume. This might be in sub-sonic range for large vessels.

Otherwise Piezo echo transponders for depth detection using senders at bottom pointing up to detect reflection from surface. aka fish finder.

- transponders might be epoxied to vessel under tank for up view of fluid height.
 

Update on the project.

The technology to be used is to be kept by all means.... was not up to me...

So for the next version I change "PWM1" and "PWM2" as inputs (of NAND gates) connected to a microcontroler. Both "PWM input 1 & 2" are now connected to the board's ground (which is isolated from the outside world through isolated DC/DC).
To avoid false positive I'll multiplex the readings.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top