controlling RAW songle relay using 3v ESP-12f

my purpose is to be able to control the songle 5v relay (raw component - no board attached) from ESP-12f (no breakout board) which has output of 3v. i'm using the circuit seen in the diagram.
it basically works, i can control the relay by HIGH/LOW of GPIO13, but from time to time i notice that the relay might turn on due to some other electrical device near it being turned on.
is this set up correct? anything that needs to be done to fix/imrove it?
Thanks

Hi,

Can you please do a circuit diagram, a picture of a hand drawn circuit will be fine.
Your image does not label pins or component numbers.

Tom.. :slight_smile:

Sorry to say this, but that "circuit" is complete nonsense - it does not "work" at all! :roll_eyes:

Even if you did wire the components shown in a meaningful fashion, a PNP transistor is wrong, you show no critically essential base resistor and no "back-emf" diode across the relay.

You need to get a ready-built relay module. :grinning:

TomGeorge:
Hi,
OPs diagram.

Can you please do a circuit diagram, a picture of a hand drawn circuit will be fine.
Your image does not label pins or component numbers.

Tom.. :slight_smile:

sorry not really good at such drawings but - which component numbers are you refering? the transistor, relay and ESP components are shown with numbers... resistors are 10k each.
i made a mistake in the picture though - the relay red wire is wrong it should have been connected to the yellow one - sorry for that

Paul__B:
Sorry to say this, but that "circuit" is complete nonsense - it does not "work" at all! :roll_eyes:

Even if you did wire the components shown in a meaningful fashion, a PNP transistor is wrong, you show no critically essential base resistor and no "back-emf" diode across the relay.

You need to get a ready-built relay module. :grinning:

sorry had a mistake. which transistor is right then? which base resistor to use? which diode? connected to base?

thanks for the great help guys - found my answers - https://www.instructables.com/id/Driving-a-Relay-With-an-Arduino/

impeham:
thanks for the great help guys - found my answers - https://www.instructables.com/id/Driving-a-Relay-With-an-Arduino/

What was your actual solution?
Tom.... :slight_smile:

(deleted)

smarts-jb:
Rather annoying diagram in that Instructable:

Hey, it is after all an "Instructable". :cold_sweat:

"Instructables" have a reputation to uphold. :grinning:

impeham:
thanks for the great help guys - found my answers - https://www.instructables.com/id/Driving-a-Relay-With-an-Arduino/

From the link:

Finally, in the loop section we are going to turn on and off the relay after every 500 CPU cycles by setting the Relay pin to HIGH and LOW respectively.

Switching a mechanical relay at close to 16kHz is going to give interesting results!

I love Instructables!