Go Down

Topic: Help with transistor (Read 965 times) previous topic - next topic

raschemmel

Quote
on ESP8266 it's more tricky because you need to have GPIO0 pin low when reseting the board to be able to upload firmware.
esp8266-autoreset
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

rotarucosminleonard

so. there is no way you can control something with esp01.

this is the only way i see:
http://esp8266.ru/esp8266-esp-01-hacked/

To solder directly a wire to a specific pin.

How can know wich pin is pin number 1,2 and so on.

raschemmel

No idea.
This is an arduino forum.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Grumpy_Mike

Quote
so. there is no way you can control something with esp01.
Why not use a PNP transistor and current source the relay.

Paul__B

Why not use a PNP transistor and current source the relay.
Because it is only 3.3 Volts?

Grumpy_Mike

#20
May 24, 2016, 03:13 pm Last Edit: May 24, 2016, 03:21 pm by Grumpy_Mike
Because it is only 3.3 Volts?

Shouldn't make any difference, if you arrange the base resistors correctly. If not then follow it with a NPN.

Or use a FET then the pin will not be pulled down.

Paul__B

Shouldn't make any difference, if you arrange the base resistors correctly.
It will make all the difference if in fact, the relay is not running from 3.3 V and I am sure it is not in that diagram (though it is unclear).

TomGeorge

Hi,

Is your pin layout correct. 
You have    GND, GPIO2, GPIO0, RxD
But this image shows GND, GPIO0, GPIO2, RxD



Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Grumpy_Mike

#23
May 25, 2016, 11:26 am Last Edit: May 25, 2016, 11:26 am by Grumpy_Mike
It will make all the difference if in fact, the relay is not running from 3.3 V and I am sure it is not in that diagram (though it is unclear).

OK Paul, in the spirit of actually helping rather than sniping here is the circuit I would use:-

Paul__B

Two resistors of 1k with 2.3 V across them, half of that is 1.15 V, more than VBE of a transistor.

Transistor permanently turned on?

Without the 2.7 V Zener (haven't seen one of those!), 5 - 3.3 V is 1.7 V, half of that is 0.85, still turns the transistor on.

Have I missed something?

dlloyd

This is a really good optoisolator.  Datasheet

 The transistor side could directly control the relay. Connect the IRLED side anode to 3.3V, cathode to 180-220 ohm resistor (11.7mA-9.5mA LED current) and control the other end of the resistor with your GPIO pin.

When the GPIO pin is high impedance or logic 1 (HIGH), the transistor is off. When the GPIO pin is LOW, transistor is on (relay activates).

Grumpy_Mike

#26
May 25, 2016, 09:32 pm Last Edit: May 25, 2016, 09:37 pm by Grumpy_Mike
Quote
Without the 2.7 V Zener (haven't seen one of those!)
There are 71 to choose from here:-
2.7V Zener
However, I suspect in practice a 3V3 would work.

Quote
Transistor permanently turned on?
Yes you are right. Make the top 1K resistor 220R then you will get 0.4V on the base when the GPIO pin is an input. When it is an output and low then it turns on.
Amended diagram:-

rotarucosminleonard

Hello!
Thank you all for your help!
I made it to work by soldering a thin wire directly to pin 9(i think) . The mcu wil start ok with gpio14 low.

I did this because i didnt had the time to buy the hardware. I recovered the transistor from electronics.

Go Up