rewqrewqrewrewre
New Member
I'm building a device to assist my disabled wife, part of which is the detection of water levels within a tank. I resorted to the RV (recreational vehicle) method of conductors through the tank wall as being simplistic. I'm controlling this with a raspberry pi, using GPIOs for each level, pulling them high, then grounding when the water reaches each conductor. I started having problems with this, not getting correct values after the first one or two input() calls. I've been using 3.3v, btw.
While troubleshooting, I wrote a very simple test program that configures a GPIO for input and then I manually grounded/ungrounded that GPIO with test leads, getting the same inconsistent results as when I was connected to the tank.
What happens with the tank is I get spurious reports of rising/falling edges on the pin, but no changes to the pin occurred, and I get the same value as before the interrupt. Without the tank, just manually grounding the pin, I don't get spurious events, but the data I read from the pin is random (unpredictable). I even issue two consecutive reads and sometimes get different values. I've done "tankless tests" with and without a 330 ohm resister.
I've performed all of my tests (with and without the tank, and without any hardware except two test leads) with two raspberry pi's, getting the same results.
Being a novice with circuits - Does this sound like the RPi is flaky or am I ignorant of basic circuit "design" (what I've done should not be considered a design)???
Update --- I should have mentioned that I used debounce values from 10 to 2000 ms, all with the same results, just slower with the longer debounce times.
While troubleshooting, I wrote a very simple test program that configures a GPIO for input and then I manually grounded/ungrounded that GPIO with test leads, getting the same inconsistent results as when I was connected to the tank.
What happens with the tank is I get spurious reports of rising/falling edges on the pin, but no changes to the pin occurred, and I get the same value as before the interrupt. Without the tank, just manually grounding the pin, I don't get spurious events, but the data I read from the pin is random (unpredictable). I even issue two consecutive reads and sometimes get different values. I've done "tankless tests" with and without a 330 ohm resister.
I've performed all of my tests (with and without the tank, and without any hardware except two test leads) with two raspberry pi's, getting the same results.
Being a novice with circuits - Does this sound like the RPi is flaky or am I ignorant of basic circuit "design" (what I've done should not be considered a design)???
Update --- I should have mentioned that I used debounce values from 10 to 2000 ms, all with the same results, just slower with the longer debounce times.
Last edited: