0
\$\begingroup\$

I want to make an application/PCB with a microcontroller circuit. The board containing the MCU will be placed inside the door lock, in one like that:

A side:

enter image description here

At the door frame on the wall, we have this:

B side:

enter image description here

I want my circuit to know if A is very near from B or not, that is, if the door is closed or open.

The picture below is a common way to make such sensor, but this idea will not be accepted for my project, I need something that will required none of sensor installation. I need a sensor that could be placed only on "A side", nothing on B side or other places. In "A side" I will be able to make openings on the metal of the lock. As can seen, B side has a free space at the middle. Is that possible in a simple way?

The picture below shows something that I want to avoid, avoid any kind of external installation.

enter image description here

Would something like this work? It is TCRT5000 of Vishay: http://www.vishay.com/docs/83760/tcrt5000.pdf

enter image description here

\$\endgroup\$
8
  • 1
    \$\begingroup\$ "Would something like this work?" Maybe, you need to give us a link to what "this" is... For all I know it's just two indicator LED's. I assume that security is a concern here? If that's an infrared detector, it would easily be bypassed with a piece of plastic. In fact the door latch is also very vulnerable to being opened with something like a small piece of plastic. \$\endgroup\$
    – Ron Beyer
    May 4, 2020 at 14:22
  • 3
    \$\begingroup\$ How does the sensor receive power if it is fitted in the door? How will it communicate with the outside world? \$\endgroup\$
    – Andy aka
    May 4, 2020 at 14:33
  • 1
    \$\begingroup\$ The sensor requires a flat mirror to be installed on the other side, otherwise it may not trigger. You should also answer the other questions that we have... \$\endgroup\$
    – Ron Beyer
    May 4, 2020 at 14:34
  • 1
    \$\begingroup\$ Theoretically it would work if that sensor can output a low or high state when object is close or not close to sensor. Since this sensor works well with reflective surfaces (indicated in Datasheet and it’s test circuit), it would be advised to place a reflective surface across from it (placed inside door frame, far enough inside to not get scratched). Such could be a mirror, reflective film, plastic, paper, etc. Only thing is how you plan on placing an MCU, sensor, and battery inside that door. \$\endgroup\$
    – Leoman12
    May 4, 2020 at 15:13
  • 1
    \$\begingroup\$ The problem you are going to have without placing the reflector is distance. It may work in plastic at 4-5cm (about 2 inches), but when mounted in the door frame you are going to be very close (5mm or less). You may not get enough of the light from one side to the other. It would help if you polish the metal plate on the other side. \$\endgroup\$
    – Ron Beyer
    May 4, 2020 at 15:15

1 Answer 1

2
\$\begingroup\$

If you can't modify the "B side" at all, then you have to rely on detecting something that's already there.

  • An optical sensor can detect the painted surface, but can easily be fooled by something passing by the edge of the open door, or by light shining on it.

  • A metal detector might be more reliable, and have fewer false positives when open. This will be more complicated to implement if the jamb plate is non-ferrous.

  • A simple mechanical switch might be your best bet. This type could be located either on the latch side or the hinge side of the door.

\$\endgroup\$
6
  • 1
    \$\begingroup\$ I was also going to mention using a switch too. You just have read my mind. \$\endgroup\$
    – Leoman12
    May 4, 2020 at 15:31
  • 1
    \$\begingroup\$ I’m surprised nobody mentioned a reed switch yet. \$\endgroup\$
    – StarCat
    May 4, 2020 at 16:07
  • 2
    \$\begingroup\$ @StarCat: A reed switch requires a magnet on the "B side", which the OP is ruling out. But that is by far the most common type of door/window switch on the market. \$\endgroup\$
    – Dave Tweed
    May 4, 2020 at 16:11
  • 1
    \$\begingroup\$ @StarCat Reed switches aren't magical, they require a magnetic trigger (Dave's second point) \$\endgroup\$
    – Ron Beyer
    May 4, 2020 at 16:11
  • 1
    \$\begingroup\$ Ok, my thinking was a small reed switch+magnet might be fitted into the side of the door and the inside of the frame (invisible from the outside). That would be the solution I would go for. \$\endgroup\$
    – StarCat
    May 4, 2020 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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