I am trying to control my garage door using a microcontroller connected to WiFi. (Esp8266, nodemcu).

The model of the garage door is steel-line sd800, I have found a diagram of my garage door and how to control it using a aftermarket 3rd party device. I have attached a screenshot of the diagram to give a better idea.enter image description here

Now there is 2 terminals on my garage door that is relevant, com and receiver. You can see based on the above image, I have found when I connect these two together using hookup wires, and then touch the leads for atleast 100ms, it will activate the garage.

If it is down, it'll make the door open up, if it is in the process of moving up it'll stop it, if you tap the leads together again, it'll now make it go down. Etc

I thought I can hookup a microcontroller and then use a NPN transistor as a switch, therefore when I send a digital high signal to the transmitter for 200ms, it'll close the switch and is effectively like me tapping the jumper wires together.

The transistor i am using is the 2N222A.

Keep in mind, this is the first time using a transistor ever so I'm a newbie.

Now when I am trying to control the garage door using the microcontroller and the transistor as a switch, it doesn't really work.

Does anyone have any idea what i am doing wrong and is this even the right approach? I just thought a transistor can be used as a switch.


I have added a photo of my schematic below.

enter image description here

EDIT 2 I have measured the voltage from COM to RECEIVER with a multimeter and it is +0.7V.

  • 1
    \$\begingroup\$ The transistor has no path for the base current to return to your circuit. Without knowing the voltage and current on the Receive and Com pins (have you measured this?) it would be a lot easier to use a relay instead. \$\endgroup\$
    – Finbarr
    Aug 4, 2023 at 8:24

1 Answer 1


A 2N2222 transistor needs a resistor on the base (~1k) to stop it conducting too much current and burning out. Also, when its active, it only allows current to flow in one direction. You could check with a multimeter what the voltage on the contacts is when they are not connected together or anything else, to know which way round the emitter and collector on the transistor go. You could also check this by opening up the device and seeing if one of the terminals is connected to COM, which means its the negative side and connects to the emitter. Having a common ground between the microcontroller and the device may be important too.

the simple solution that doesnt require any checking is to use a relay (or possibly an optocoupler, that just need to have the direction of its phototransistor correct)

  • \$\begingroup\$ Thank you, I will do that to check. I also realize they don't share a common ground as you can see in my schematic \$\endgroup\$
    – zorodluffy
    Aug 4, 2023 at 4:17
  • \$\begingroup\$ I have used a multimeter, and the COM is +0.7V. \$\endgroup\$
    – zorodluffy
    Aug 4, 2023 at 4:40
  • \$\begingroup\$ "The COM is +0.7V" - with respect to what? Voltage is a potential difference between two points. \$\endgroup\$
    – Finbarr
    Aug 4, 2023 at 11:39
  • \$\begingroup\$ Between the com and the receiver, I measured 0.7v \$\endgroup\$
    – zorodluffy
    Aug 4, 2023 at 19:04

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.