Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Replace Hall sensor with switch in Tuya door/window sensor

georgedb

New Member
Hi all,

I need to alter one of these Tuya door/window sensors. They used to use a reed relay, but all current models seems to use a Hall effect sensor. For my project, I need to replace the reed relay with a real switch (that's easy), but for the door/windows sensor with a Hall sensor, I need to find a solution.

Used is a VCS2373S Hall sensor. It has a Vcc connection and a ground connection and the 3rd pin, I guess, will be some voltage between Vcc (5V? 3V3?) and ground, which will be fed to some integrated microcontroller (unknown type) as a measure of the strength of the magnetic field.

Scheme-it-export-Door-window-sensor-Hall-effect-sensor-2024-07-25-09-59.png


  1. Would the above solution work?
  2. And what would be the difference, other then default high versus default low (things will be solved in the software anyway), when I would swap Vcc and GND in the above?
  3. No resistor needed in the Vcc to uC connection, or maybe only there and not where I currently drew it?
  4. And how to determine the value for the resistor?

Cheers,
George
 
Last edited:
From the datsheet table 8 on page 4 shows that the output can source and sink 10 mA. the output is a change of state rather than a voltage proportional to the magnetic field strength. I doubt that the microcontroller input will require 10 mA so I would choose a pull up / down resistor to pass 10 mA (330 ohms for 3.3 volts 500 ohms for 5 volts.) And the same value resitor in series with the connection with the micro controller. This could provide up to 10 mA when the switch is closed or 5 mA when open. If I was doing the conversion I would break the connection to the existing hall sensor output and measure the current with the door open and closed. That will also tell you if the switch contacts need to go to ground or Vcc.

Les.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top