Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: esp8266-01 and GPIO2 for 5v rele activation

esp8266-01 and GPIO2 for 5v rele activation 1 month 3 weeks ago #3833

  • fsitios
  • fsitios's Avatar
  • Offline
  • New Member
  • Posts: 4
  • Karma: 0
HI, I want to control a single channel 5v relay (see photo) of an ESP8266-01 to turn on and off a mini 3V water pump (see picture). To control the relay I have to use the GPIO0 port of the ESP because the GPIO2 I am using it to measure soil moisture. The general idea is to watering the flowerpot when the soil is dry.

I have everything connected according to the attached diagram (sorry I did it by hand but I am not an electronic). So, when the pump starts(the relay is acticated) the whole circuit hungs (all the lights of all the components goes on). I also have another problem, to boot the ESP I have to disconnect the GPIO0 so that it drops in normal mode and then reconnect it to make the scheme work.

My questions are, what should I do to stabilize the circuit and make it work?, and what can I do to avoid disconnect and connect manually the GPIO0 all the time to start in "normal" mode?

Here are the details of the water pump:

DC Voltage:2.5-6V
Maximum lift:40-110cm / 15.75"-43.4"
Flow rate:80-120L/H
Outside diameter of water outlet: 7.5mm / 0.3"
Inside diameter of water outlet: 4.7mm / 0.18"
Diameter:Approx. 24mm / 0.95"
Length:Approx. 45mm / 1.8"
Height:Approx. 33mm / 1.30"
Material:engineering plastic
Driving mode: brushless dc design, magnetic driving
Continuous working life of 500 hours

Relay details:
Modulo Rele 5V - Simple Inversor - 250V 10A

Thanks in advance!!
Fernando





The administrator has disabled public write access.

esp8266-01 and GPIO2 for 5v rele activation 1 month 3 weeks ago #3834

  • EasyIoT
  • EasyIoT's Avatar
  • Offline
  • Administrator
  • Posts: 833
  • Thank you received: 258
  • Karma: 24
fsitios wrote:
HI, I want to control a single channel 5v relay (see photo) of an ESP8266-01 to turn on and off a mini 3V water pump (see picture). To control the relay I have to use the GPIO0 port of the ESP because the GPIO2 I am using it to measure soil moisture. The general idea is to watering the flowerpot when the soil is dry.

I have everything connected according to the attached diagram (sorry I did it by hand but I am not an electronic). So, when the pump starts(the relay is acticated) the whole circuit hungs (all the lights of all the components goes on). I also have another problem, to boot the ESP I have to disconnect the GPIO0 so that it drops in normal mode and then reconnect it to make the scheme work.

My questions are, what should I do to stabilize the circuit and make it work?, and what can I do to avoid disconnect and connect manually the GPIO0 all the time to start in "normal" mode?

Here are the details of the water pump:

DC Voltage:2.5-6V
Maximum lift:40-110cm / 15.75"-43.4"
Flow rate:80-120L/H
Outside diameter of water outlet: 7.5mm / 0.3"
Inside diameter of water outlet: 4.7mm / 0.18"
Diameter:Approx. 24mm / 0.95"
Length:Approx. 45mm / 1.8"
Height:Approx. 33mm / 1.30"
Material:engineering plastic
Driving mode: brushless dc design, magnetic driving
Continuous working life of 500 hours

Relay details:
Modulo Rele 5V - Simple Inversor - 250V 10A

Thanks in advance!!
Fernando






ESP8266-01 are very unpractical, because pin limitations. I suggest you to use different ESP8266 - ESP8266-12 for example.
The administrator has disabled public write access.
The following user(s) said Thank You: fsitios

esp8266-01 and GPIO2 for 5v rele activation 1 month 2 weeks ago #3837

  • fsitios
  • fsitios's Avatar
  • Offline
  • New Member
  • Posts: 4
  • Karma: 0
Thank you for the tip about the ESP8266-12.

What about the second issue?. I am using a P2N2222 transistor to switch off and on the DC, but I am getting this stuff in the debug terminal when the DC is turned on or off. I connected the GPIO0 to the transistor Base pin. Is this a correct circuit, isnt it?. Or what am I missing here?
ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld



Regards,
Fernando
The administrator has disabled public write access.

esp8266-01 and GPIO2 for 5v rele activation 1 month 2 weeks ago #3843

  • btidey
  • btidey's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Thank you received: 3
  • Karma: 1
Main reason for getting these wdt resets is power supply issues.

You need to have a good well decoupled stable 3.3V supply for the ESP8266. You may well be getting a significant spike when the relay switches which is getting through to the ESP8266 supply.

According to schematic you are deriving the 3.3V from 5V via converter which is OK but you should put a decoupling capacitor at the ESP8266 end. I typically use a 220uF 6.3V one.
The administrator has disabled public write access.
The following user(s) said Thank You: EasyIoT, fsitios

esp8266-01 and GPIO2 for 5v rele activation 1 month 1 week ago #3844

  • EasyIoT
  • EasyIoT's Avatar
  • Offline
  • Administrator
  • Posts: 833
  • Thank you received: 258
  • Karma: 24
fsitios wrote:
Thank you for the tip about the ESP8266-12.

What about the second issue?. I am using a P2N2222 transistor to switch off and on the DC, but I am getting this stuff in the debug terminal when the DC is turned on or off. I connected the GPIO0 to the transistor Base pin. Is this a correct circuit, isnt it?. Or what am I missing here?
ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld



Regards,
Fernando

Debug mode is for ESP8266 NODE MCU boards. You can not use DEBUG together with ESP8266-01 and this circuit. And power supply is important as @btidey mention.
The administrator has disabled public write access.
The following user(s) said Thank You: fsitios

esp8266-01 and GPIO2 for 5v rele activation 1 month 1 week ago #3847

  • fsitios
  • fsitios's Avatar
  • Offline
  • New Member
  • Posts: 4
  • Karma: 0
Thank you so much for your answer. Only one question, Which is "the end" of the ESP8266 you are mentioning?.

Thanks!
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.093 seconds
Powered by Kunena Forum