Close

N-MOSFET pull-down

A project log for IoT Household Plant Watering System

As I work the plants wither, possibly because of the solder fumes, but most probably because I keep forgetting to water them.

solenoidSolenoid 09/03/2017 at 18:170 Comments

The thing about the ESP8266 is that it's so versatile and cheap that any excuse is good to make an IoT device out of anything. But its usage is not always straight forward. For example both of the ESP8266-01 usable outputs (GPIO0 and GPIO2) must be pulled high in order for it to start the program.

This is a problem as an N-MOSFET Gate pin needs to be at 0V for the transistor to be off, I want to add a pull-down resistor to make sure it's off when the module starts or crashes for some obscure reason, but this also affects the pin it is attached to.

On the ESP8266-01 module there are technically 4 usable pins: GPIO0 and 2 and the UART TX and RX (pins 1 and 3 respectively). The TX and RX pins are used to program the device, but they can technically be used as any other GPIO pin during runtime.

I tried to use the TX for the MOSFET signal as it's a low impedance anyway (output), but it turns out that the module doesn't like to have its TX signal pulled low during boot either (the program doesn't start properly). Thus my last chance was the RX pin, fortunately it didn't complain this time and that's what I ended up using.

Discussions