Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By aegiacometti
#45193 Hi community, i need help on this...
i have read a lot of posts, but i still can´t figure out how to solve this problem that i have. I am trying to learn electronics by building things with arduino and now esp8266.
In this proyect i have:
- a web page hosted at the ESP-01
- mDNS support
- DHT22 for temp/hum readings
- an IR receiver to read the IR codes from my AirConditioner remote controller (using IRremoteESP8266.h)
- then i save the Raw data in EPRROM
- and finnaly using a button at the web page, the ESP transmit the IR-Raw codes trough an IR led of course.
- for increase the IR range i have an NPN transistor (MPSA13)

I finally learned how to make all of this to run.

But the big problem is GPIO at boot for the IR led. ESP wont boot since NPN gets GPIO to ground (i dont know if i tell this correctly)

I cant find the way to get over this matter, i've tried to use a resistor between GPIO and NPN (base), despite this allow the ESP to boot OK, it is no the solution to the system, because the IR signal drop againg in reach.
Also, I think i can not inverse the logic, because i could affect the logic of the transmition of the IR pulses/protocol.

what else? Any ideas? i could add/change any electronic component?

Here a simple schematic about what iam trying to explain


Thanks in advance guys!!!
You do not have the required permissions to view the files attached to this post.
User avatar
By martinayotte
#45219 Since GPIO2/GPIO0 need to be HIGH at reset or powerup to boot properly, you need this HIGH level to be the idle state.
You simply need to add another NPN between the GPIO and the base of your MPSA13 along with a pullup on this base.
Also, to provide safety to GPIO, add a serie resistor to the base of this new NPN, something like 1K, as well as the usual GPIO2/GPIO0 pullups, which are not shown in your schematic.
Then, in the firmware, every places where there is a digitalWrite() need to have inverted state, this means HIGH is the OFF state and LOW the ON state.
User avatar
By aegiacometti
#45836 Hi there, thanks for your time Martin!
Just today i had the time to work on this again.
I was worried about using the pullUP, because of the logic inversión in IR library, , but i have tried that, and finnaly it wasn´t so hard, it was pretty ease in fact. So i'am sending the diagram of that just to share with the community.
Also a friend has give me this other option. Using as i think a "astable?" or "monoestable" maybe? circuit.
It was interesting because with that circuit i learn new things... about delays... i also share that diagram.
I will keep the pullUP option, that you recomend, because the astable circuit is a waste of resource by now, since it can be solved with only one resistor and programming.
Also, i had to remove resistors in IR led and collector of NPN, because the power of the LED was going to low, i've tried adding another NPN in serie as you recomend, but as i add resitors in the circuit the power goes down again. There is a new subject that i know i add to learn now... operational amplifiers :)
Thanks again, regards
You do not have the required permissions to view the files attached to this post.