Reed switch: can I/O pin (high) be used as a +5v source?
Says it all!
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!