Heeello,
i've got a weird problem which occupied my whole day without a solution. And now i am furious
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
Reed switch stays ON even without a magnet?!?
Moderators: grovkillen, Stuntteam, TD-er
Re: Reed switch stays ON even without a magnet?!?
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)
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 (PayPal.me)
Re: Reed switch stays ON even without a magnet?!?
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
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
Re: Reed switch stays ON even without a magnet?!?
If all things in life happened according to specs, what would be the fun of that?
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 (PayPal.me)
Re: Reed switch stays ON even without a magnet?!?
Yes.
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 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.
Re: Reed switch stays ON even without a magnet?!?
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.
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.
Re: Reed switch stays ON even without a magnet?!?
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.
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.
Re: Reed switch stays ON even without a magnet?!?
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
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
Who is online
Users browsing this forum: No registered users and 6 guests