1

Dear Stackexchange Raspberry Pi community,

I hope somebody can help me get started with my first Raspberry project..

It seems doable except this is my first project and I do have sufficient programming / computer skills but no electrical knowledge.

I hoped somebody could help me get this simple project started, let me start with explaining some background information ;

I moved to an other house 6 months ago and I have some people helping me in the house and garden. They all come in through the big automated port at my home.

The idea is to make a logger whenever this port opens (in a later stadium I will add a camera to take a picture..)

The board which controls the port has a TLS contact which means in English it’s contact dry contact.

Everytime the port opens it gives a pulse (can be set anywhere from 1 sec till 240 sec). I want to log this pulse.

The question is how I can connect the Raspberry PI to my board ? Can I connect it directly to the GPIO pins or do I need some sort of circuit ? About the software part I don't worry, but as I said I don't know where to start with the hardware part.

Thanks for all your help !

  • What's the amplitude of the pulse? as long as it's within 3.3V you could connect the output of the contact directly to the pi GPIO, and take it in as a digital input. – LecauseAndThePi Oct 9 '17 at 11:44
  • Please register an account and ask the question again; this can then be closed as a duplicate. Note this is not a discussion forum and it is inappropriate to ask a string of follow up questions in comments. Either get what you want to ask about in the original, or ask a whole new question. – goldilocks Oct 9 '17 at 14:33
1

Okay so, i've only just realized i should have asked what model of pi you are using. I've already drawn this out with reference to rpi2/rpi3 pins layout, however if you are using a different model it should be pretty easy for you to change the connections accordingly. For reference, here is the pin layout for this model https://docs.microsoft.com/en-us/windows/iot-core/media/pinmappingsrpi/rp2_pinout.png.

And here is how you should connect your dry contact to the pi:

https://imgur.com/a/R1Am9

Notice that in this example i'm using GPIO 18, but you could use any GPIO, and set it up as an input programmatically. Also you should set this GPIO with an initial internal pull-down resistor, so that it's not floating when the dry contact is open. You can do this pretty easily programmatically, let me know if you need any help on this too.

So to wrap it up, when the dry switch is open you should see a LOW input at the GPIO, and when is closed, you should see 3.3V, hence HIGH at the GPIO.

protected by goldilocks Oct 9 '17 at 14:33

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.