So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Maximize0987
#79114 Hey guys I have a PCF8574A connected to a esp8266. it is a 8 port gpio extender. I read the specs wrong thinking it could output high 10ma. It can only output 100ua. I am still hoping to make this work. Can someone help with what I need transistor, mosfet, darlington trans. I need about 2.5ma to signal this relay. I am brand new to transistors and not sure how to make it work. Currently I have 2n2222 on hand.

Thanks for your help!
User avatar
By btidey
#79161 Depends a bit on what voltage level high you need.

If you can tolerate the Vd - 0.6V (e.g. 2.7V) then you can use your 2n2222 in a darlington config; Collector to Vd, Base to PCF8547A pin, Emitter to load.

If you want maximum voltage high (e.g. 3.3V) then use a p-channel Mosfet (e.g. AO3401). Source to Vd, Gate to PCF8547A pin, Drain to load. Note that this will invert the sense of the logic. High means off. That might be good anyway as this would be the default PCF8547A power up state.

Personally I prefer Mosfets in switching applications.
User avatar
By rudy
#79163 I don't know what you are trying to drive (other than needing 2.5mA) but you can put an external pull up resistor on the port pin. For example, a 220 ohm resistor. This would be enough to drive most optocouplers. (led current) But if you need current plus a higher voltage then you would need something active.