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

User avatar
By rudy
#63763
sean_intez wrote:
btidey wrote:Original post says that external pull down didn't work. That sounds strange to me.

I find that pull ups are around 36K as measured on an ESP-12. An external pull down of 3.3K gives a default voltage of 0.27V before the sense of the pin is defined which is well below threshold turn on of any relay driver.

This is borne out by check measurements I took. I also checked with a scope and there were no unexpected transients.

How did you measure internal resistors? did you just put your ohm meter between the pin and vcc pin while esp is not in circuit?

also how did you measure your relay driver threshold? I am using SEMICONDUCTOR MBT3904DW1T1G transistor array and here is my schematic
Image


What are the current requirement on the relay you are using for this? If it is under 100mA then you are probably OK. But I think the 1K resistor on the base is not allowing enough current to saturate the transistor. I tend to design for worst case situations, including cold temperature. And the Beta for transistors falls with temperature.

I think using 3.3 volts for relays is a bad idea. You have to supply a lot more current. Harder for the transistor to saturate.
User avatar
By rudy
#63764 I agree with Sean that a relatively low value resistance will short out output of the internal pull up. I would use a separate resistor from the port pin to ground. I would not rely on the transistor base current being low to not turn on the relay.

Edit:

I just tried a 1K resistor to ground and it killed the voltage. It was less that 1/10th of a volt.
User avatar
By btidey
#63775 I measured the pull up resistance just by powering the circuit with a pull down resistor on GPIO13 and measuring the voltage. With a 10K resistor I got 0.7V. Ohms law then gives pull up as (3.3 -0.7)/0.7*10K or 37K. Lower value pull downs gave proportionally lower voltages showing the pull up is effectively a pure resistance. I also double checked with a scope during power up to see if there was any high glitches. There weren't.

A pull down of 3.3K ensures voltage is well below turn on of bjt or mosfet driver. If the relay is turned on by active high voltage as in schematics shown then it will be off until GPIO is set to be output and written high.

If relay is turned on by an active low then one can use an external pull up to ensure it is off until GPIO set to be output and written low.
User avatar
By rudy
#63781
A pull down of 3.3K ensures voltage is well below turn on of bjt or mosfet driver.


For a bjt I would use 1K resistor. 0.7V would turn on a transistor. (this is assuming no resistor from the base to ground) Sure there is insufficient current to turn on a relay but it could be enough to keep it on and not be able to turn it off. Once energized a relay does not need nearly as much current to hold it on.