Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By VikingCode
#32542 In the other topic, i found a reply of "steves " with a link to his blog where he did a bit the same as i'm trying to do. He run in to a similar problem and his solutions was to use a npn in conjunction with a pnp transistor. (i'm talking about connecting a relay to esp8266)

So i was wondering if i'm doing it wrong all together and should use an extra pnp transistor ?
User avatar
By lethe
#32585
VikingCode wrote:R1 & R3 are pull up resistors and are in place to ensure the logical 1 on the pins on boot up.
- Sparkfun article suggests that i can use 10k resistor "almost" by default if i need a pull up. Do i understand it correctly ?

Yes, the actual value of a pull-up is usually not that important.
In a circuit design you usually want to avoid using to many different resistor values (so you can buy more of the same values, get better prices and simplify manufacturing), so engineers try to use common values for all pull-ups. 10k works for most applications and has a reasonably low current limit, so it is a popular choice.

PS: @ lethe : i moved my VCC line to top but couldn't find a good way to get my GND line underneath the transistor.

You would flip the transistor symbol in this case (the little arrow still identifies the emitter, so you can flip & rotate the symbol as needed).

In the other topic, i found a reply of "steves " with a link to his blog where he did a bit the same as i'm trying to do. He run in to a similar problem and his solutions was to use a npn in conjunction with a pnp transistor. (i'm talking about connecting a relay to esp8266)

So i was wondering if i'm doing it wrong all together and should use an extra pnp transistor ?

That circuit avoids, that the relais switches on during power-up or reset. The PNP acts as inverter, so the NPN will switch on, when the GPIO pin goes low. A single PNP should work as well, as long as it provides enough gain.
If switching the relais on during power-up is not an issue for you, your circuit should work as well.
User avatar
By Bee Gee
#91327 Though this post is old, I'm having similar issues. I am new to this forum, and don't know how to view the images from this post. It appears they are not available.

A picture is worth a thousand words. Is there am image for the solution showing the components which were used?

Thanks
User avatar
By QuickFix
#91346 Image in first post:
Image1.jpg


Image in second post:
Image2.jpg


Though I think it would be better if you'd just simply start a new thread (it's free :D ), because "Similar" <> "Equal". :idea:
You do not have the required permissions to view the files attached to this post.