Tuya door sensor - external sensor

Hi everyone

I bought a tuya door sensor wifi. My goal is to modify it and connect two wires to it, to simulate the opening/closing of the sensor. Where should I connect them? I thought I’d find a magnetic contact but I don’t see it. I attach photos

The magnetic reed switch is probably on the other side of the PCB.



I soldered the circuit to get the magnetic switching sensor out. I attached the extension sensor to the keyhole to determine the lock status of the door.
I tried it for 1 week. There’s a problem: the sensor runs out of battery unusually quickly.
Has anyone tried it yet?

1 Like

So I got one and mapped out the circuit noting that my sensor is different to either of the above, mine also has the ZTU module as it is the zigbee variant, either way this is what I came to after beeping it out (excuse the messy scribble):

U1 - HM6207 is the hall effect sensor, the modern fancy reed switch type component, most likely considerably cheaper and more robust, as this hall effect sensor has extra componentry to make it act like a reed switch (binary) instead of a hall effect sensor (how much attraction is in the air… or for the less whimsical, magnetic strength)

A glance at the resistor selection shows where all the battery draining is coming from, R6 on my board, a little 31ohm resistor.
As I am tired and cant remember all the standard voltage drops over standard comments… and I had my multimeter out… I measured the voltage drop over R6 and R0 when ‘door’ was open and closed

R6 (31R)
Closed: 0V
Open: 2.6V
R0 (2M4)
Closed: 0.1mV
Open: 3.13V

Doing the maths to get the current:

R6 (31R)
Closed: 0V = 0A
Open: 2.6V = 84mA
R0 (2M4)
Closed: 0.1mV = 5/8 of sfa
Open: 3.13V = 1.3uA

Sooooo, this device was designed to sense a door, which in most cases is closed most of the time… so the 84mA expenditure when open is managable… buuut when you remove the magnet and use a reed switch to bring it low (closed), you are inverting that paradigm so it is using more current when your reed switch is open (for a normal reed switch, that would be the magnet not in range).
With the upper limit of AAA capacity at 1200mAh, this would give you 14hrs not factoring in the overheads like the MC and radio

lots of words to say that ‘of course your battery is running low quick’.

Looking back at the circuit, I will be removing the transistor (Q3) and connecting my reed switch between its pin 3 and ground which will give me between (effectively) 0A and 1.3uA.
Rough calculations gives this running for 105 years in its open state (not factoring in overheads of course)
I havent done mine yet… but it is on the list to do today… any minute now…

For anyone with a different board, beep yours out, it will most likely be the same overall circuit as I mapped out in the above pic, just with different labels and locations

To update:
removed the transistor and added the external reed switch.
has been on battery pretty much the last 6hrs while I was faffing about getting everything else setup

preliminary result:
Battery: 100%
I now have a sensor on my water meter!

No pics sorry, was in ‘just get it done before the kiddo gets home’ mode.

If I remember I will give a longer term battery update… maybe in a decade or two…

I have an older version, the PCB is similar and marked 2255. The board was designed with the hall sensor on the wrong edge and it had been bodged into the correct spot !! On this one R6 is 1K2.

With this mod I get 1.9uA when closed (D7 high) and 3.3uA when open (D7 pulled to Gnd) and using the max hold function on my meter I see 1mA every now and them which I assume is the transmit current.

Other things I found are that the pairing switch goes to D3 and B4 goes to Q2 to turn on the LED. Q1 is something to do with power switching as it controls the negative rail but now idea how that works.

I’ll be using it on the door of a storage container with a chunky spring loaded switch so I hope the de-bounce has been taken care of in the firmware.