Yes I did search google for an hour before i asked this. But i'm not even sure how to ask or what to search for so...
Ok I'm pretty new to hardware programming and I am not sure how to do this. I'm not able to flash my chip unless i unplug the IR LED from the the RXD (34) pin of the ESP32. This no big deal on a bread board but if i solder all this together that becomes impossible. So my question is how can i temporarily disable the pin of the IR LED while I''m flashing the chip?
NOTE: Moving the pin is not an option as the lib I am using requires it to be on GPIO 3 (RXD) not sure why. I have uploaded my schematic as well so if you see any other issues in it please do tell. Like I said I'm learning.
Noob question about flashing chip
Noob question about flashing chip
- Attachments
-
- schematic.png (21.88 KiB) Viewed 9084 times
Re: Noob question about flashing chip
Driving the IR LED directly through a low value resistor from a GPIO pin is not a good idea. I would put a buffer transistor or MOSFET to drive the IR LED. That can also allow a higher current through the LED to improve its range.
You can for example connect the LED to the +5V through a resistor (47 to 100R) to the drain of a MOSFET. The gate goes to the GPIO pin, and the source to GND. It can also be a good idea to put a resistor like 10K from gate to GND to ensure the default state of the MOSFET is off. The MOSFET needs to be a low gate threshold device so that it turns on OK with the 3.3V logic levels. Something like a AO3400
This will probably also solve the flash problem as now the RXD pin will be able to receive data OK as the buffer islates the pin from the LED.
You can for example connect the LED to the +5V through a resistor (47 to 100R) to the drain of a MOSFET. The gate goes to the GPIO pin, and the source to GND. It can also be a good idea to put a resistor like 10K from gate to GND to ensure the default state of the MOSFET is off. The MOSFET needs to be a low gate threshold device so that it turns on OK with the 3.3V logic levels. Something like a AO3400
This will probably also solve the flash problem as now the RXD pin will be able to receive data OK as the buffer islates the pin from the LED.
Re: Noob question about flashing chip
awesome thanks so much for that advice ill look into doing that.
Re: Noob question about flashing chip
Driving it from the esp32 is probably ok since the current is set to ~18mA but driving it from the USB-UART chip especially at high baudrates is another issue. Surely the easiest way is to edit the library and choose another pin.
Re: Noob question about flashing chip
I updated my schematic to use a mosfet.. does this look better?
- Attachments
-
- Screen Shot 2018-08-25 at 10.21.43 PM.png (52.76 KiB) Viewed 9014 times
Re: Noob question about flashing chip
I just don't know enough about the library and why they have chosen that pin. I think it has to do with the frequency that the IR LED needs to send a signal but im just guessing.
Re: Noob question about flashing chip
mosfet schematic looks good.
The driver allows increased current for more range. 100R will give about 30mA. 47R will give about 60mA. 33R will give about 100mA.
Most IR LEDS allow 100mA continuous. I tend to use 47R but 100R will give good range.
The driver allows increased current for more range. 100R will give about 30mA. 47R will give about 60mA. 33R will give about 100mA.
Most IR LEDS allow 100mA continuous. I tend to use 47R but 100R will give good range.
-
- Posts: 9725
- Joined: Thu Nov 26, 2015 4:08 am
Re: Noob question about flashing chip
What specific library are you using? As far as I can see, there's nothing special to the RxD pin that cannot be moved to another pin.
Who is online
Users browsing this forum: No registered users and 58 guests