Issues with IR Led and ESP-01 GPIO2

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
alfonso
New user
Posts: 6
Joined: 24 Oct 2018, 19:03

Issues with IR Led and ESP-01 GPIO2

#1 Post by alfonso » 15 Nov 2018, 13:02

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?

User avatar
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

#2 Post by grovkillen » 15 Nov 2018, 13:13

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 :idea: :idea: :idea:

alfonso
New user
Posts: 6
Joined: 24 Oct 2018, 19:03

Re: Issues with IR Led and ESP-01 GPIO2

#3 Post by alfonso » 15 Nov 2018, 13:20

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.

User avatar
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

#4 Post by grovkillen » 15 Nov 2018, 14:13

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 :idea: :idea: :idea:

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Issues with IR Led and ESP-01 GPIO2

#5 Post by Shardan » 15 Nov 2018, 14:30

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.
Regards
Shardan

alfonso
New user
Posts: 6
Joined: 24 Oct 2018, 19:03

Re: Issues with IR Led and ESP-01 GPIO2

#6 Post by alfonso » 15 Nov 2018, 15:30

Great!

Thanks yor for your explaination!


I will test With a transistor (2N2222) or upgrade my board.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Issues with IR Led and ESP-01 GPIO2

#7 Post by Shardan » 15 Nov 2018, 19:48

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.
Regards
Shardan

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 40 guests