Pocster Posted Thursday at 15:04 Posted Thursday at 15:04 (edited) Humans ! I’ve got a dry contact float switch . Works as it should . Stuck my meter on it for continuity test - all good . In Home assistant though ( via a Shelly uni ) it ‘latches ‘ I.e stays ‘on’ even when float physically reset . Chat ( my new best mate ) warbles on about a pull up resistor . This correct ? . If correct how do I know what value to use ? cheers peeps Edited Thursday at 15:05 by Pocster
SteamyTea Posted Thursday at 15:38 Posted Thursday at 15:38 32 minutes ago, Pocster said: how do I know what value to use ? Ohm's Laws.
Pocster Posted Thursday at 15:41 Author Posted Thursday at 15:41 2 minutes ago, SteamyTea said: Ohm's Laws. Yeah and ? . It’s a dry contact;
SteamyTea Posted Thursday at 16:02 Posted Thursday at 16:02 20 minutes ago, Pocster said: Yeah and ? . It’s a dry contact; Show us the circuit. Or try a 1 mega ohm.
-rick- Posted Thursday at 16:09 Posted Thursday at 16:09 If it's an active-high circuit. ie, when voltage is present home assistant reads 'on' then wouldn't a pull-down resistor be needed? ie, there is some stray signal pulling the signal up which you want to override. Would have thought a 10k resistor would be a better starting point than 1M 1
Pocster Posted Thursday at 16:15 Author Posted Thursday at 16:15 4 minutes ago, -rick- said: If it's an active-high circuit. ie, when voltage is present home assistant reads 'on' then wouldn't a pull-down resistor be needed? ie, there is some stray signal pulling the signal up which you want to override. Would have thought a 10k resistor would be a better starting point than 1M But why is it needed ? When the float is off - it’s fine . Activate float , Shelly uni shows ‘closed’ on dry contact . Which is correct . Why doesn’t resetting the float ( open circuit again ) not cause Shelly uni to see that ? as it’s a dry contact .
SteamyTea Posted Thursday at 16:19 Posted Thursday at 16:19 8 minutes ago, -rick- said: pull-down I thought that, then thought of @Pocster's trousers. It is probably ab ESP32 type board, so this may help. https://www.reddit.com/r/esp32/comments/1birg1q/design_question_internal_pullup_resistor_or/
ProDave Posted Thursday at 16:25 Posted Thursday at 16:25 Show us the circuit. Or just experiment. Start with 100K, measure the voltage it pulls up to when open. If that is nowhere near what it is trying to pull up to, try a bit lower. 1
-rick- Posted Thursday at 16:28 Posted Thursday at 16:28 9 minutes ago, Pocster said: But why is it needed ? When the float is off - it’s fine . Activate float , Shelly uni shows ‘closed’ on dry contact . Which is correct . Why doesn’t resetting the float ( open circuit again ) not cause Shelly uni to see that ? as it’s a dry contact . Have you got this switch connected via a relatively long wire? (Significantly more than the shelly was designed for - which I think is very short wires) Wire is probably picking up small current from somewhere thats not enough to change the shellys state but enough to hold the switch high once triggered (at least for a time - if you wait long enough it might reset). If a resistor works then you can play with the wiring and see if you can fix it. 1
Pocster Posted Thursday at 16:43 Author Posted Thursday at 16:43 (edited) 15 minutes ago, -rick- said: Have you got this switch connected via a relatively long wire? (Significantly more than the shelly was designed for - which I think is very short wires) Wire is probably picking up small current from somewhere thats not enough to change the shellys state but enough to hold the switch high once triggered (at least for a time - if you wait long enough it might reset). If a resistor works then you can play with the wiring and see if you can fix it. Nah . Wire on float is 20cm - but will need to be much longer in real use e.g 3meters . Guess I need to wire it with ‘real world’ wire lengths aswell to test . I could get around this with software I.e switch triggers , alarm goes off , then resets after a minute ; switch as latched on won’t trigger it again . So a manual reset required - probably a good idea after a critical flood event has occurred . Edited Thursday at 16:43 by Pocster
-rick- Posted Thursday at 17:06 Posted Thursday at 17:06 Alternatively the switch might just leak a bit of current even though its off. Measure the resistance of the switch in both on and off states with nothing else connected. 1
Alan Ambrose Posted Thursday at 17:20 Posted Thursday at 17:20 If it latches on, then maybe a pull-down resistor. 2.2K ohms is standard for a few interfaces. Not critical - at 3.3V that's 1.1 mA. 1
SteamyTea Posted Thursday at 17:26 Posted Thursday at 17:26 Is the Shelley used with a mechanical switch? Think you said something about an overflow. If so, could it be switch bounce causing a problem?
Temp Posted 22 hours ago Posted 22 hours ago (edited) 23 hours ago, Pocster said: In Home assistant though ( via a Shelly uni ) If the float switch is essentially just an un powered switch with two wires I believe it should be connected to pin 7 (or 8 ) and VCC (pin 1)... Edited 22 hours ago by Temp 1
Pocster Posted 21 hours ago Author Posted 21 hours ago 16 minutes ago, Temp said: If the float switch is essentially just an un powered switch with two wires I believe it should be connected to pin 7 (or 8 ) and VCC (pin 1)... Hmmmmm Not pin 7/8 and gnd ?
Temp Posted 21 hours ago Posted 21 hours ago (edited) 37 minutes ago, Pocster said: Hmmmmm Not pin 7/8 and gnd ? Not if you follow that diagram. One side of the switch is shown connected to pin 1 L. (Sorry I called it VCC earlier.) However that assumes the float switch is literally just that, a switch. It may not work if the float switch is a powered device. Sorry for editing this post a lot. I'm waiting for a train and hate typing on my phone. Edited 21 hours ago by Temp
Pocster Posted 21 hours ago Author Posted 21 hours ago (edited) 15 minutes ago, Temp said: Not if you follow that diagram. One side of the switch is shown connected to pin 1 L. (Sorry I called it VCC earlier.) However that assumes the float switch is literally just that, a switch. It may not work if the float switch is a powered. Yeah it is just an open or closed circuit ( the switch ) . Been fiddling and am indeed using pin 9 and pin 7 gnd and I think it works . Just noticed your diagram is different . Also just noticed I have the Shelly uni plus - so that could be the confusion Edited 21 hours ago by Pocster
MikeSharp01 Posted 20 hours ago Posted 20 hours ago 23 hours ago, Alan Ambrose said: maybe a pull-down resistor. 2.2K ohms is standard for a few interfaces. Not critical - at 3.3V that's 1.1 mA. Pull up / pull down will depend on the internals of the shelly. I haven't looked but I would expect some sort of opto isolation on the input for safety so could be leaky either way a dry contact will be active in someway or other on the inside! 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now