Hello,
I am developing my first EspEasy project, to controll my bath heatpump with IR led and an ESP-01.
But I have a problem, when I boot the ESP-01 with a IR led attached to GPIO-2 it doen't boot. And if I attach the IR led to GPIO-0 the ESP-01 boot to flash mode.
Any ideas?
Issues with IR Led and ESP-01 GPIO2
Moderators: grovkillen, Stuntteam, TD-er
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Issues with IR Led and ESP-01 GPIO2
I would not use that board. https://www.letscontrolit.com/wiki/inde ... figuration
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Issues with IR Led and ESP-01 GPIO2
ops!
is it impossible to use a IR led with ESP-01?
I think the problems is the boot, because if I connect the led after boot it works.
is it impossible to use a IR led with ESP-01?
I think the problems is the boot, because if I connect the led after boot it works.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Issues with IR Led and ESP-01 GPIO2
Yes exactly it's the boot that will be causing problems. If you're steady on your hand you can solder directly on the MCU
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Issues with IR Led and ESP-01 GPIO2
Let's see if I can explain this a bit.
A GPIO usually can handle an electric current of around 20 mA.
A IR LED usually needs more. I know, some are listed in datasheets
and catalogues with 10 ma or 20 mA... just forget it.
Why?
Because IR data comes in very short pulses. To get a good range for IR commands
these pulses are much higher then the LED's "forward current" from the datasheet.
So a LED connected to a GPIO directly gives a high load to the GPIO pin.
Higher than the pin can take. This way you just "pull down" the pin,
it it set to a logical "low" value.
Logical "Low" on GPIO 0 says "flash mode"
Logical "Low" on GPIO 2 blocks booting.
This is the usual behaviour of the ESP8266!
There's the explanation for your results.
Best way to get out: Use a transistor or FET to drive the LED.
In the Wiki you can soo how to do an IR Transceiver with a ESP-01.
https://letscontrolit.com/wiki/index.ph ... ransceiver
But I agree with Grovkillen: The ESP-01 is pretty outdated and comes with a lot of problems nowadays.
I've set up a newer Version to the Wiki using the ESP-12 / 12E / 12F types:
https://letscontrolit.com/wiki/index.ph ... ransceiver
Both versions are proven to work.
A GPIO usually can handle an electric current of around 20 mA.
A IR LED usually needs more. I know, some are listed in datasheets
and catalogues with 10 ma or 20 mA... just forget it.
Why?
Because IR data comes in very short pulses. To get a good range for IR commands
these pulses are much higher then the LED's "forward current" from the datasheet.
So a LED connected to a GPIO directly gives a high load to the GPIO pin.
Higher than the pin can take. This way you just "pull down" the pin,
it it set to a logical "low" value.
Logical "Low" on GPIO 0 says "flash mode"
Logical "Low" on GPIO 2 blocks booting.
This is the usual behaviour of the ESP8266!
There's the explanation for your results.
Best way to get out: Use a transistor or FET to drive the LED.
In the Wiki you can soo how to do an IR Transceiver with a ESP-01.
https://letscontrolit.com/wiki/index.ph ... ransceiver
But I agree with Grovkillen: The ESP-01 is pretty outdated and comes with a lot of problems nowadays.
I've set up a newer Version to the Wiki using the ESP-12 / 12E / 12F types:
https://letscontrolit.com/wiki/index.ph ... ransceiver
Both versions are proven to work.
Regards
Shardan
Shardan
Re: Issues with IR Led and ESP-01 GPIO2
Great!
Thanks yor for your explaination!
I will test With a transistor (2N2222) or upgrade my board.
Thanks yor for your explaination!
I will test With a transistor (2N2222) or upgrade my board.
Re: Issues with IR Led and ESP-01 GPIO2
Hello again,
Please remember that a transistor in opposite to the FETs I've used
needs a resistor in series with base pin.
A good sample circuit is shown at https://letscontrolit.com/wiki/index.php?title=IRTX
Just as a Hint: Upgrading your board won't change the need for a transistor or FET.
The ESP is not able to give enough current to fully power IR LEDs.
Please remember that a transistor in opposite to the FETs I've used
needs a resistor in series with base pin.
A good sample circuit is shown at https://letscontrolit.com/wiki/index.php?title=IRTX
Just as a Hint: Upgrading your board won't change the need for a transistor or FET.
The ESP is not able to give enough current to fully power IR LEDs.
Regards
Shardan
Shardan
Who is online
Users browsing this forum: Google [Bot] and 40 guests