Noob question about flashing chip

djmason9
Posts: 4
Joined: Sat Aug 25, 2018 5:18 pm

Noob question about flashing chip

Postby djmason9 » Sat Aug 25, 2018 5:27 pm

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.
Attachments
schematic.png
schematic.png (21.88 KiB) Viewed 9082 times

bobtidey
Posts: 43
Joined: Mon Jun 18, 2018 2:24 pm

Re: Noob question about flashing chip

Postby bobtidey » Sat Aug 25, 2018 8:49 pm

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.

djmason9
Posts: 4
Joined: Sat Aug 25, 2018 5:18 pm

Re: Noob question about flashing chip

Postby djmason9 » Sun Aug 26, 2018 1:33 am

awesome thanks so much for that advice ill look into doing that.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Noob question about flashing chip

Postby WiFive » Sun Aug 26, 2018 1:55 am

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.

djmason9
Posts: 4
Joined: Sat Aug 25, 2018 5:18 pm

Re: Noob question about flashing chip

Postby djmason9 » Sun Aug 26, 2018 5:24 am

I updated my schematic to use a mosfet.. does this look better?
Attachments
Screen Shot 2018-08-25 at 10.21.43 PM.png
Screen Shot 2018-08-25 at 10.21.43 PM.png (52.76 KiB) Viewed 9012 times

djmason9
Posts: 4
Joined: Sat Aug 25, 2018 5:18 pm

Re: Noob question about flashing chip

Postby djmason9 » Sun Aug 26, 2018 5:26 am

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.

bobtidey
Posts: 43
Joined: Mon Jun 18, 2018 2:24 pm

Re: Noob question about flashing chip

Postby bobtidey » Mon Aug 27, 2018 8:17 pm

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.

ESP_Sprite
Posts: 9725
Joined: Thu Nov 26, 2015 4:08 am

Re: Noob question about flashing chip

Postby ESP_Sprite » Tue Aug 28, 2018 2:44 am

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: Bing [Bot] and 52 guests