1
\$\begingroup\$

I am trying to switch an IC on/off via the DTR signal pin on an FTDI232 USB/TTL Serial converter. Basically during the flashing of my ESP8266, I need to be able to power the IC off and then on again. The FTDI adapter can power the ESP8266 without any issues while directly connected to it (this is the normal way to program these IC's). The circuit I have made is : ESP8266 Power control

R1 -> 1k

Q1 -> B772 PNP

The circuit works fine without the ESP connected (switching the DTR pin (P1) between Hi and Low causes the output (P2) to switch on and off). The issue I am having is once i connect the ESP to P2 the FTDI resets every time i try and switch the ESP on. Whole circuit runs on 3.3v. I presume my issue may be drawing to much power from the FTDI DTR pin, but i am not sure why I get 3.3v at P2 without the ESP connected. From what i can tell the transistor is acting as a switch and therefore shouldn't draw any more power from DTR if the ESP is plugged in or not. The whole circuit has been made up on breadboard. The transistor datasheet can been found : https://www.st.com/resource/en/datasheet/cd00062866.pdf

FTDI USB/Serial adapter is just a generic one with a chip marked as FTDI 1612-G FT232-RL

Any pointers on what i have got wrong?

\$\endgroup\$
  • \$\begingroup\$ 1) The FTDI's internal regulator is not really meant to power external loads that draw as much as an ESP8266 can; you really should be using a distinct 3v3 regulator 2) You don't need to depower the ESP8266, merely reset it. 3) If you did depower it you would also need to remove all signals. While depowering is a bad approach you could accomplish it using a 3v3 regulator with an enable input. \$\endgroup\$ – Chris Stratton Dec 13 '18 at 5:18
  • \$\begingroup\$ Hi Chris, thanks for that, will try and setup a 3.3v external supply to test that, but when using the FTDI without the power switching, then it powers the ESPs without any issue.Was wanting to be able to switch off the supply voltage as the ESPs are pushed against pogo pins for programming, so idea is, startup script, prompt for inserting the ESP, power on and program, power off, then power on and test. Also would like to use the same circuit later for the ESP32 chips, which i believe can detect the difference between reset and power cycle. Why do you say the data lines should be disconected? \$\endgroup\$ – Marl Dec 14 '18 at 13:54
  • \$\begingroup\$ ESP boot current is well beyond what an FTDI can provide, if you keep violating specs the consequences are unreliability. Most devices must not have voltage present on any I/O pin when they are unpowered, this may not be easy to achieve without putting the FTDI in a special GPIO mode which will complicate drivers, you may need to use another IC to gate signals. \$\endgroup\$ – Chris Stratton Dec 14 '18 at 14:06
  • \$\begingroup\$ FTDI powered from 5V is only good for 50mA of 3.3V output current. Having seperate 3.3V supply would seem to be needed to feed into Q1. \$\endgroup\$ – CrossRoads Jul 23 at 14:07
0
\$\begingroup\$

Maybe you connected the transistor the wrong way?

Instead of the ESP, insert a light resistive load R (e.g. 100 Ohms) between P4 and P2. Then switch this load on/off with DTR and check if the voltage at P2 is changing from 3.3V to 0V with a multimeter.

Please also make sure that you provide some capacitance C to the ESP VCC input in the final design.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.