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

User avatar
By hdrut
#13985 Hi again,

I see what you are trying to achieve now.
For using transistors as switches, you need to bring them from full "on" state ( saturation) to full "off" state (cutoff).
Please see for example:

http://www.electronics-tutorials.ws/tra ... ran_4.html

According to BCP68 specs, these transistors have a minimum gain of aprox. 85 in the worst case, so @ 1100mA they will be taking:

1100/85=13 [mA]

from GPIOs output. To get the BCP68 to full saturation region (switch closed), you need to add a resistor at their base.
The value of this resistor can be computed as follows:

Rb = (3.3 - 0.7) / 0.013 = 200 [Ohm]

To be on the safe side, start with higher R values and measure current output from GPIO.
If you are careful there's no issue in driving the NPNs directly from GPIOs, but you should check if the load is reactive. What are you switching at NPNs output?

Any doubts please contact me.

Cheers.
User avatar
By hdrut
#13986
alonewolfx2 wrote:i found BCP56 (1.2A-80V-NPN)SMD this in my country. can it drive 1.5v?

I´m afraid the gain of these NPNs is too low, so for 1.1A they will be demanding aprox 45mA from GPIOs. It's too much, you're going to need another transistor stage to drive the BCP56. Use 2N3904 for example.

Or... you may consider using a driver like this:

http://www.ti.com/lit/ds/symlink/uln2803a.pdf

Each output has a 500mA current capacity. Connecting outputs in parallel will give you a higher driving current.
Also it only needs aprox. 1mA of GPIO current to drive them, plus it provides many protection features such as internal diodes for driving inductive loads.

I would definitely go for this IC if you can get it!
User avatar
By alonewolfx2
#14005
hdrut wrote:Hi again,

1100/85=13 [mA]

from GPIOs output. To get the BCP68 to full saturation region (switch closed), you need to add a resistor at their base.
The value of this resistor can be computed as follows:

Rb = (3.3 - 0.7) / 0.013 = 200 [Ohm]

To be on the safe side, start with higher R values and measure current output from GPIO.
If you are careful there's no issue in driving the NPNs directly from GPIOs, but you should check if the load is reactive.


esp8266 provide max 12ma per pin. soo it seems bcp68 cant provide min1.1a. maybe uln2803 good option. if i connect 3 output of uln than i have 1.5a output right? and i dont need diode for protection because uln have internal ? also can i use uln for pwm output?
What are you switching at NPNs output?

Any doubts please contact me.

Cheers.
for special heater. and its not reactive.

metalphreak wrote:Why not just use an N-ch mosfet? There are heaps available that will pass high currents with ease, and require virtually no current from the GPIO pin.

because i dont know n-ch mosfets how it work. can you explain a little bit more for n-ch with esp8266? i googled a little and i saw many example for direct n-ch mosfet usage and arduino usage but i dont know well.