Reed switch: can I/O pin (high) be used as a +5v source?

Reed switch: can I/O pin (high) be used as a +5v source?

Says it all! :slight_smile:

So I have an existing pcb.. that has some I/O pins broken out to some pads.. and each one has a GND pad next to it..

which is fine for normal switches, .. but I was asked about using a reed switch.

  • the only reed switch I have it this reed switch 'module' & I believe it also needs a V+ source as well..??

-current reed switch module:

  • (I have read some tuts where it says you can use I/O pin and GND.. and some have it where you need V+, GND and I/O pin?.... this pcb reed switch module has all 3 pins as well, and 4th if you want to check analog I guess as well, but I'm just doing digital hi/low)

but I as mentioned I have read articles where just reed switch uses GND and I/O pin only..

example:
https://learn.sparkfun.com/tutorials/reed-switch-hookup-guide/all

Question 1 of 2:
Why do some tuts require both V+ and GND lines? and some just require GND?

  • in hind sight there probably should have been some +5v pads implemented/broken out as well...... but trying 'salvage' a working PCB so it can be used with a reed switch & magnet for input/trigger as well if needed...

Question 2 of 2:
I'm not sure if a 'regular' (free floating, no pcb) reed switch will be used in the end.. or one of the 'modules' types will be used in the end.. so I wanted to ask for clairification

  • If regular (free floating) reed switch is used.. can you just use GND and I/O pin? (I see some using resistors [between I/O and GND] and some without as well?, which wouldnt be a problem to do in this case)

  • If one of the module reed switches is used... can one of the I/O pins/pads be set to HIGH and used as the V+ source for the reed switch?

Thanks! :slight_smile:

Question: How much current does the module require?
Question: How much current can your output pin supply?

Answer: I’m not sure on either one. Perhaps you know with certainty.

Would I use an output pin for a sensor source? Only under duress. Only if it was a exceeding low current load and the supply impedance wouldn’t be an issue and I needed to switch the supply on and off. With a bare reed switch, the current is so low that switching on and off makes no sense.

The only case in which you need GND is for one of those modules with active device(s) and/or LED’s or something that requires a supply current return path. A pull down or noise suppression cap would be a few examples were it would be needed. It all depends. On things not defined in your questions.

Reed switch has two positions - Opened and Closed. Using a special module with comparator and analog output sounds ridiculous. Take a standalone reed switch and connect it as a regular button.

PS Looks like Chinese inventors took a Hall sensor module (where comparator has a sense) and used it with reed switch.

I'll second that!

That module is total nonsense! Makes no sense whatsoever. :astonished:

Maybe "common sensor interfacing board"? All sensors look the same, simple for the user.

@WattsThat

Good questions.. I should have supplied more info (at least what I have available)

The 'pin' source is a from a Arduino Pro-Mini... so I'm guessing roughly 40mA give or take..
I am not sure what that 'module' thing needs as a current requirement..

This is more of after thought.. (was supposed to be used with a simple momentary button, which works fine as expected)

When someone wanted to use a 'reed' switch, and asked about it.... this was the only one I have, and went to test it.. and that is when I discovered the 'flaw' of not having any + 5v pads broken out to the PCB (just GND pads) :frowning:

Question: Why would you need to toggle the power/pin source?.....
"................and I needed to switch the supply on and off"

Quote: "The only case in which you need GND......."

Sorry I'm confused again... So your saying normally you WOULD NOT NEED a GND pin????? And it just be done using the V+ and I/O pin?? (the other simple wiring diagrams I saw ONLY uses GND and I/O pin??) So I'm not clear now.. (and even more confused?)

@alesam
"Take a standalone reed switch and connect it as a regular button"

Thank you.. so just follow the normal I/O pin and GND pins.. set internal_pullup and life is good!

  • Of course.. this just for a regular reed switch?

I agree.. these boards are a bit overkill.. and not very straightforward.

My understanding is that you can do Digital (simple hi/lo) to trigger it...
OR
Analog.. where you set the pot to a 'level/threshold' and when it reaches that point.. it triggers as well? (not sure.. never messed with that type of usage)

So in the end.. just regular reed witches will work.. and should just be used like a regular switch (no resistor to be used?.. I have looked at so many diagrams.. and none of them seem to be the same.. Some use this damn module, but needs V+... some use a bare reed switch but then also use the V+ pin.... some are bare reed switch that just use I/O and GND... and some use I/O and GND, WITH A resistor! LOL) I'm not sure the appropriate way to wire it up is anymore... but if your saying just a regular switch (which I use internal pullup and GND connection..I'll follow that)

Last open item.. back this damn module thing again. :slight_smile:
Since its the only one I have available at the moment (same with one of those modules kits off ebay of wherever)..

I'm not clear.. it CAN or CAN NOT be used with an I/O pin set to high for the V+ reference?

(I tested it.. worked... but I'm not sure if its practical? or dangerous to do so?) I searched and I can NOT find any info on how much current that module draws though? I only have a cheapie DMM.. :frowning:

Happy turkey day everyone!

Update:

Now I'm curious.. how does one test a modules current draw? (doesnt seem that easy?)

xl97:
@WattsThat
Now I'm curious.. how does one test a modules current draw? (doesnt seem that easy?)

Connect the meter in series with the module power supply. High side or low side since current will be the same either way.

Start with the meter at the highest current setting and work down. I started at a lower current setting on mine and blew an expen$ive internal fuse.

Cheap DMMs include cheap fuses (if any). Another advantage.

It's a total and utter waste of time.

A reed switch has no threshold, it is either on or off.

De-solder the reed switch from the module. Connect it between a pin and ground, using INPUT_PULLUP.

Then you can later attach to the module, something that is in some way analog, such as a LDR, Hall sensor (which is what it was supposed to be - I ordered a couple while researching it :grinning: ), phototransistor, thermistor or just a couple of touch pads.