As the title says... Chat on...

User avatar
By Toshi Bass
#9121 My little project to switch 2 relays via esp 12 is running stable, however I notice on the attached diagram a 10k resistor and 0.1uf capacitor connected to the rest pin, can anyone explain what that is for ? is there any advantage to connect the rest pin with this resistor capacitor combination considering my project is stable ? could it give me a way to do a remote reboot for instance ? thanks for any response.
Attachments
ESP-12.JPG
User avatar
By quantalume
#9130 The capacitor holds the reset line low briefly during power up, in order to make sure the SoC performs a proper reset. If your module consistently starts up properly without the reset circuit, then I wouldn't worry about it.
User avatar
By alon24
#9589 Can please post the schemtic for controlling the realy (I iamgine its 5v )with esp12 (3.3v)
lua code would be nice too
User avatar
By Toshi Bass
#9643 Its all very basic stuff, but here its is, I am using 12v dc supply because the item I am switching has the same 12v supply, if you were wanting to switch 5v then no need for the LM2596 I guess.

relay=0
srv=net.createServer(net.TCP)
srv:listen(8080,function(conn)
conn:on("receive",function(conn,pl)
gpio.mode(5,gpio.OUTPUT)
if string.find(pl,"gpio5=0") then gpio.write(5,0) relay=0 end
if string.find(pl,"gpio5=1") then gpio.write(5,1) relay=1 end
conn:send(relay)
conn:on("sent",function(conn) conn:close() end)
end)
end)
Attachments
Capture.JPG