0
\$\begingroup\$

i would like to connect a water level sensor* to gnd+pin on an mcp23017.

the pin need to be pulled-up with some resistor. the internal pullup of mcp23017 are 100k if i have read correctly the datasheet.

Now, after wiring everything correctly, the reads when the float switch its closed (so goes to gnd) are a little bit 'floating'.

i checked everything, twice, and ground pin with a jumper (reads are super stable).

my only guess it's that this kind of switch have some sort of wetting current, it's that possible?

i haven't find datasheet of this switches, nor of similar, speaking of wetting/minimum current. of course a 100k resistor limit current quite a lot.

Someone can point me in the right direction? 1) it's possible that i am seeing some 'wetting current'? 2) how much should be the min current for this kind of switch? 3) should i add a 4k resistor, disable internal pullup and see how it goes?

*https://img.dxcdn.com/productimages/sku_436952_1.jpg

\$\endgroup\$
3
  • \$\begingroup\$ you posted a link to a picture of something that is like a cardboard box with unknown contents .... are we supposed to be guessing how the sensor operates? \$\endgroup\$
    – jsotola
    Sep 22, 2018 at 4:08
  • \$\begingroup\$ i posted a picture, because i can't find a datasheet of this item, i only know that there is a magnet inside of it, and when the floating part move, the magnet will open (pulling) a contact, but when it's not inline the contact fall back on the other making a connection. If you don't know this switch, i don't think you can help, let's hope someone it's more familiar with that! \$\endgroup\$ Sep 27, 2018 at 11:47
  • \$\begingroup\$ do not post a picture .... post a link to the web page where it is being sold ...... also the description that you just posted should have been in your question when you originally posted it ...... since there is a magnet, then the switch is most likely a reed switch .... en.wikipedia.org/wiki/Reed_switch ..... it is just a simple SPST switch .... electrically, it is just like a push button switch .... to confirm that the switch is not defective, use an ohmmeter to measure the resistance of the switch contacts \$\endgroup\$
    – jsotola
    Sep 27, 2018 at 15:33

1 Answer 1

1
\$\begingroup\$

The item shown at the link below looks exactly like your picture. The spec lists the contact resistance as 10 mohms. I would guess you have a bad switch.

https://www.aliexpress.com/item/Level-switches-Liquid-level-sensor-Liquid-level-controller-Plastic-ball-float/32224577746.html?spm=2114.10010108.1000013.3.140c68d8zovlJx&gps-id=pcDetailBottomMoreThisSeller&scm=1007.13339.90158.0&scm_id=1007.13339.90158.0&scm-url=1007.13339.90158.0&pvid=e8d5a85a-c807-4949-8658-7548639be20d

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.