Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 12-06-2021, 16:39   #1
Registered User
 
BigAl.NZ's Avatar

Join Date: Sep 2008
Location: Auckland, NZ
Boat: Hood 38 - Wauquiez
Posts: 578
Hatch Reed Switch

Hi,

My electronics is a bit rusty, so I am seeking advice on the following. I want to setup a magnetic reed switch on the hatch and then monitor its state with a modem on my boat which has a digital IO and can report on the state of a 5V signal (High/Low).

Initally I though a circuit like this would do the trick:
https://tutorials-raspberrypi.com/ra...#comment-49241

It takes 3.3v from the RaspPi and then can switch high/low on the output depending on the state of the Reed switch. This however is more complicated than I really would like.

Firstly to implement it on my boat which is a 12v system would require a DC-DC converted from 12v to 5V. A bit of a pain.

Is there a component, or small board can be 12v powered, but report High/Low (5v) depending on the status of the reed?

Hope this makes sense.
BigAl.NZ is online now   Reply With Quote
Old 12-06-2021, 17:54   #2
Registered User

Join Date: Mar 2021
Location: Costa del Sol
Posts: 555
Re: Hatch Reed Switch

You always could use a voltage divider and add the reed-switch between the power source and the resistor R1. The main question is to limit the current to what you need. So for example, if you want something around 0.1 mA current you could choose R1 = 68k Ohm and R2 = 33k Ohm. That gives you at 14V around 4.6Vm at 12V still 3.9, which should be ok for the modem to detect a high value.
Joh.Ghurt is offline   Reply With Quote
Old 12-06-2021, 18:29   #3
Registered User
 
BigAl.NZ's Avatar

Join Date: Sep 2008
Location: Auckland, NZ
Boat: Hood 38 - Wauquiez
Posts: 578
Re: Hatch Reed Switch

Quote:
Originally Posted by Joh.Ghurt View Post
You always could use a voltage divider and add the reed-switch between the power source and the resistor R1. The main question is to limit the current to what you need. So for example, if you want something around 0.1 mA current you could choose R1 = 68k Ohm and R2 = 33k Ohm. That gives you at 14V around 4.6Vm at 12V still 3.9, which should be ok for the modem to detect a high value.
I have no issue using a buck converter to get 5v from 12v, but it would be all the better if there was something on one circuit board that did the whole show - reed switch with 5v out depending on state of switch.
BigAl.NZ is online now   Reply With Quote
Old 13-06-2021, 02:38   #4
Certifiable Refitter/Senior Wannbe
 
Wotname's Avatar

Join Date: Jan 2008
Location: South of 43 S, Australia
Boat: C.L.O.D.
Posts: 12,762
Re: Hatch Reed Switch

Quote:
Originally Posted by BigAl.NZ View Post
Hi,

My electronics is a bit rusty, so I am seeking advice on the following. I want to setup a magnetic reed switch on the hatch and then monitor its state with a modem on my boat which has a digital IO and can report on the state of a 5V signal (High/Low).

Initally I though a circuit like this would do the trick:
https://tutorials-raspberrypi.com/ra...#comment-49241

It takes 3.3v from the RaspPi and then can switch high/low on the output depending on the state of the Reed switch. This however is more complicated than I really would like.

Firstly to implement it on my boat which is a 12v system would require a DC-DC converted from 12v to 5V. A bit of a pain.

Is there a component, or small board can be 12v powered, but report High/Low (5v) depending on the status of the reed?

Hope this makes sense.
Easy peasy - use a 5V regulator ie LM7805, a three legged chip costing less than $1. Stick ships battery (12V) in and get 5V out.

Push that 5V output through your reed switch.

https://www.robotgear.com.au/Product...yABEgL_ofD_BwE
https://www.robotgear.com.au/Cache/F...109_LM7805.pdf
Attached Thumbnails
Click image for larger version

Name:	488_LM7805 5V Regulator.jpg
Views:	13
Size:	4.8 KB
ID:	240257  
__________________
All men dream: but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find it was vanity: but the dreamers of the day are dangereous men, for they may act their dreams with open eyes, to make it possible. T.E. Lawrence
Wotname is online now   Reply With Quote
Old 19-06-2021, 08:16   #5
Registered User

Join Date: Apr 2018
Location: Bethesda, MD USA
Boat: Grand Banks Eastbay 47
Posts: 54
Re: Hatch Reed Switch

If you have the Pi onboard to act as your monitoring/logging 'brain' then just use a DC-DC power supply to provide it with the 5V it needs. There's lots of simple DC-DC buck transformers to do this, for around $10-15 to handle the variable boat DC voltage and provide stable power via USB to the Pi.

You might also consider wireless sensors, like the kind intended for home automation. That'd let you put sensors in places without having to run wires from all of them. There's zigbee and zwave sensors that could do this, along with an RF receiver for the pi. Software like homeassistant and others could be employed to do quite a lot more than just simple monitoring.
wkearney99 is offline   Reply With Quote
Old 19-06-2021, 12:11   #6
Registered User

Join Date: Dec 2010
Location: W Carib
Boat: Wildcat 35, Hobie 33
Posts: 13,080
Re: Hatch Reed Switch

Quote:
Originally Posted by BigAl.NZ View Post
I have no issue using a buck converter to get 5v from 12v, but it would be all the better if there was something on one circuit board that did the whole show - reed switch with 5v out depending on state of switch.
A voltage divider is normally just a circuit built of resistors that ARE on the circuit board. Very simple to build.

But its simplicity of course comes with limitations. Esp: the output voltage varies based on input voltage, so if your 12V input climbs to 14V (like during charging) then the output will be more than 5V. If the 5V device you are driving requires exactly 5V then you may have a problem.
belizesailor is offline   Reply With Quote
Old 21-06-2021, 05:32   #7
Registered User

Join Date: Apr 2018
Location: Bethesda, MD USA
Boat: Grand Banks Eastbay 47
Posts: 54
Re: Hatch Reed Switch

Quote:
Originally Posted by belizesailor View Post
If the 5V device you are driving requires exactly 5V then you may have a problem.
THIS.

A raspberry pi or most other devices on USB expect stable 5vdc, not fluctuations. A DC-DC power supply that accepts a range of voltages helps avoid that. That and often has a heat sink case to shed any heat necessary to deal with it.
wkearney99 is offline   Reply With Quote
Old 21-06-2021, 07:00   #8
Registered User

Join Date: Dec 2006
Location: Seattle
Boat: Cal 40
Posts: 2,766
Images: 7
Re: Hatch Reed Switch

1. Most devices that do digital i/o have a pin to supply the appropriate voltage. Is there a 5 V power pin? What is the exact make model of your modem and do you have a link to a manual?

2. Does a Raspberry Pi have anything to do with this other than the example transistor circuit that is connected to it?

3. Digital inputs have a range of voltage that they interpret as high or low. Using ancient TTL as an example, below 0.8 V is low, above 2 is high. A 1k/2k resistor voltage divider will provide 5 V at the input, nominal max input V, with the battery at 15 volts, and will provide 2 volts, minimum reliable on state, when the battery is down to 6 volts. (CMOS is different, 2/3rds supply V for min on.)
Your manual should provide what the minimal reliable on voltage to the digital input is.

4. Most digital inputs have diode protection to provide over and under voltage protection, not that you want to design to provide over voltage. (Raspberry Pi does not.)
cal40john is offline   Reply With Quote
Old 21-06-2021, 10:19   #9
Registered User
 
BigAl.NZ's Avatar

Join Date: Sep 2008
Location: Auckland, NZ
Boat: Hood 38 - Wauquiez
Posts: 578
Re: Hatch Reed Switch

Thanks for all the helpful replies. I should have made it clear that I am (a) not using a RaspPi to monitor the 5v state - but this was simply provided as an example. It also does not need to be exactly 5v.

The voltage divider idea is ok - but I think the regulator is better as it will handle the differences in input without affecting the output?
BigAl.NZ is online now   Reply With Quote
Old 21-06-2021, 11:03   #10
JBP
Registered User
 
JBP's Avatar

Join Date: Sep 2016
Location: PA
Boat: Jeanneau Tonic 23
Posts: 63
Re: Hatch Reed Switch

Any USB port provides regulated 5V power up to an Amp or two. Those little cigarette plug adapters are unregulated 12V to regulated 5V converters.
JBP is offline   Reply With Quote
Old 21-06-2021, 11:29   #11
Registered User

Join Date: Dec 2010
Location: W Carib
Boat: Wildcat 35, Hobie 33
Posts: 13,080
Re: Hatch Reed Switch

Quote:
Originally Posted by BigAl.NZ View Post
Thanks for all the helpful replies. I should have made it clear that I am (a) not using a RaspPi to monitor the 5v state - but this was simply provided as an example. It also does not need to be exactly 5v.

The voltage divider idea is ok - but I think the regulator is better as it will handle the differences in input without affecting the output?
Yes, a power supply/DC-DC converter/regulator should reliably provide constant 5V output from 12V.

If you dont need exactly 5V then a voltage divider circuit should work.
belizesailor is offline   Reply With Quote
Old 22-06-2021, 16:21   #12
Senior Cruiser
 
bstreep's Avatar

Cruisers Forum Supporter

Join Date: Oct 2007
Location: San Antonio, TX/Port Aransas, TX
Boat: 1990 Macintosh 47, "Merlin"
Posts: 2,593
Re: Hatch Reed Switch

We've been using these for years. We LOVE knowing exactly what is going on, on our boat. It DOES require a WiFi connection, but it uses very little data, and there is NO monthly charge. You buy the tags, they are yours. We use their reed sensor for intrusion. https://wirelesstags.net/


Just some additional notes: I can tell what the temperature is in our freezer and our fridge, as well as storage spaces (where we keep wine and beer that won't fit in the fridge), as well as the temperature of our battery charger compartment, our engine room, and our HVAC units. We turn on the A/C remotely, when we head to the boat on weekends. They also have a sensor for the bilge that tells you when your bilge pump isn't operating correctly. We've really enjoyed these.
__________________
Bill Streep
San Antonio/Port Aransas, TX
bstreep is offline   Reply With Quote
Old 22-06-2021, 17:02   #13
Registered User

Join Date: Feb 2013
Location: S.E. Pennsylvania
Boat: Catalina 28 MK I
Posts: 102
Images: 1
Re: Hatch Reed Switch

Take a look at the Shelly 1, or maybe the new Uni that they offer (shelly.cloud). It operates on 12 volts and wifi, it is inexpensive, seems robust so far and can certainly tell you the state of a reed switch or allow you to switch other items a number of ways.
I found mention of it here -
https://pysselilivet.blogspot.com/20...tall.html#more
brazenarticle is offline   Reply With Quote
Reply

Tags
hatch

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
For Sale: Hatch Master hatch screens gsr Classifieds Archive 6 12-05-2014 15:57
float switch far away from pump... should I use the neg side for the float switch? felipe Electrical: Batteries, Generators & Solar 13 02-02-2014 14:20
Outdoor Magnetic Reed Switch ? saben Electrical: Batteries, Generators & Solar 6 20-09-2011 08:52
BlueSea Dual Switch w/ ACR v. 1-2-B Switch Maddog Electrical: Batteries, Generators & Solar 0 13-07-2009 14:56
Companionway Hatch Turtle Conversion - Lexan/Acrlic Hatch blahman Construction, Maintenance & Refit 8 07-01-2009 06:31

Advertise Here


All times are GMT -7. The time now is 16:58.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2021, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.