Reed switch stays ON even without a magnet?!?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
EDsteve
Normal user
Posts: 56
Joined: 11 May 2018, 21:13

Reed switch stays ON even without a magnet?!?

#1 Post by EDsteve » 17 May 2020, 15:43

Heeello,

i've got a weird problem which occupied my whole day without a solution. And now i am furious :o

Situation:
A Wemos D1 is powered directly to the 5V and GND from a 3,7V battery. And a reed switch is in between so i am able to turn the power on and off with a magnet. I unplugged everything else for testing.

Problem:
I come near with a magnet: The Wemos blinks and turns on. Perfect. Thats what i want. But when i remove the magnet. The reed switch stays ON and so does the Wemos.

Testing:
1. I tried four other reed switches. All with same results.
2. When i test the reed switch stand alone. Without connected to anything. It works as it should.
3. I moved to different places in my room (In case there is a magnetic field nearby) -> no change
4. I put the reed switch in the Plus side and the GND side. Same plroblems
5. Putting a 47 Ohm resistor in series with the reed switch solves the problem of the reed switch, but then there is not enough power to boot the wemos.

When i flick the reed switch it sometimes turns off. But mostly not.
What else can i try? Do i miss something here? How is it possible that the reed switch stays ON?

Hope that someone can help me out here :)
Cheeers
ED

These are the specs of my reed switches:
Total length: 44.7MM
Glass length: 14.2MM
Diameter: 2.3MM
Electric shock load: 10W
Maximum switching voltage: 100 VDC/VAC
Maximum switching current: 0.5A
Electric shock capacitor: 0.7PF
Operating temperature range: -60~ +155 degrees
Maximum humidity: 98% (max)
Maximum working frequency: 100HZ
Startup value: 10-15
Release value: 5
Contact resistance: 100m ohm

User avatar
Ath
Normal user
Posts: 272
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Reed switch stays ON even without a magnet?!?

#2 Post by Ath » 17 May 2020, 15:54

I suspect that the power that your Wemos is using is enough to make the reed-switch 'stick' once turned on.

You probably need a simple circuit using a relay board to turn your Wemos on and off, where the relay-circuitry (not just a simple relay!) will draw significantly less power than the Wemos.
Something similar to this: https://www.aliexpress.com/item/3301982 ... 4c4dalGZ02 (and better remove the LEDs to conserve power)
/Ton

User avatar
EDsteve
Normal user
Posts: 56
Joined: 11 May 2018, 21:13

Re: Reed switch stays ON even without a magnet?!?

#3 Post by EDsteve » 17 May 2020, 16:11

Ath wrote: 17 May 2020, 15:54 I suspect that the power that your Wemos is using is enough to make the reed-switch 'stick' once turned on.
According to the specs of the reed switch that should not happen. Or do i see that wrong?

I just want a simple and small switch. Adding a Relay is not really what i want :roll:
So i just figured out that when i add a 1 Ohm resistor in series to the reed. It all works as i wish. But still... Not 100% satisfied :D

User avatar
Ath
Normal user
Posts: 272
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Reed switch stays ON even without a magnet?!?

#4 Post by Ath » 17 May 2020, 17:12

EDsteve wrote: 17 May 2020, 16:11 According to the specs of the reed switch that should not happen. Or do i see that wrong?
If all things in life happened according to specs, what would be the fun of that? :D
EDsteve wrote: 17 May 2020, 16:11 So i just figured out that when i add a 1 Ohm resistor in series to the reed. It all works as i wish. But still... Not 100% satisfied :D
Well, what happens if you add 2 of those, either in series, or parallel to each other? Does it still turn off and on at will?
And does the Wemos boot up as expected?
/Ton

User avatar
EDsteve
Normal user
Posts: 56
Joined: 11 May 2018, 21:13

Re: Reed switch stays ON even without a magnet?!?

#5 Post by EDsteve » 17 May 2020, 17:45

Yes.
Ath wrote: 17 May 2020, 17:12 Well, what happens if you add 2 of those, either in series, or parallel to each other? Does it still turn off and on at will?
And does the Wemos boot up as expected?
The 1 Ohm i had for testing was from a trim potentiometer. Yes. the D1 boots up without issues.
So now i have a 7 Ohm resistor (smallest i have) in series with the reed switch. That works as expected. The Wemos boots up without issues.

It might not be ethical correct. But i also asked this question here where the reason for the "sticky reed" is explained as:
Source: https://forum.arduino.cc/index.php?topic=684906.0
...the reed switch is welding closed when the lithium battery is first connected to the discharged input capacitor on the WeMOS D1 which is apparently 100 µF - much the same consequence as shorting the same capacitor when it is charged.

Kind of "spot welding".

It appears that the reed switch is the wrong thing to use as a power switch - the one you cite is tiny, a much larger one (40+ mm glass length) would probably survive.

TD-er
Core team member
Posts: 3500
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Reed switch stays ON even without a magnet?!?

#6 Post by TD-er » 18 May 2020, 00:24

Yep, charging an empty capacitor is just a short circuit.
So makes sense the addition of a small resistor to limit the peak current to 'just a few amps' may be enough from this 'spot welding' to occur.

User avatar
EDsteve
Normal user
Posts: 56
Joined: 11 May 2018, 21:13

Re: Reed switch stays ON even without a magnet?!?

#7 Post by EDsteve » 20 May 2020, 16:37

WARNING: Turns out that my constellation messed up my Analog Input. 20% of the measured values are off.

So for example the capacitive soil sensor gives me sometimes readings which are 10% or 20% higher or lower. When i change the 7-Ohm-reed-switch combo to a normal switch. All works perfect again.

User avatar
ThomasB
Normal user
Posts: 770
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Reed switch stays ON even without a magnet?!?

#8 Post by ThomasB » 20 May 2020, 21:42

I suggest you use the reed to control a MOSFET High Side switch. Current through the reed switch would be close to zero (microAmps).

Good concepts explained here: https://hackaday.com/2015/09/16/learn-a ... de-switch/

The basic circuit is a P-channel MOSFET and high value bias resistor on the gate.

- Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests