user26278: I'm using an ESP-01 to control a load (SSR), which is connected to IO pin 2. This pin needs to be HIGH at boot time, otherwise the module won't boot. I've tried driving the load with an optocoupler to avoid driving the pin LOW while booting, but it's not working. Do you know of any solution to make it boot correctly without changing the IO pin? (there's only two GPIO pins, both ocuppied, plus serial port pins).

user4143: Simply invert the logic - so that LOW turns the SSR on and HIGH turns it off.
Try something like this:

simulate this circuit – Schematic created using CircuitLab
The P-channel FET will invert the logic. Pull GPIO2 LOW and it will turn on the FET which will enable the SSR. The 10KΩ resistor keeps the GPIO pin (and the gate of the FET) HIGH at other times.
If the GPIO pin can sink enough current to directly drive the SSR you can leave out the FET:

simulate this circuit
Again the logic is inverted. Pull GPIO2 LOW to sink current through the SSR to turn it on. The resistor keeps the GPIO pin held HIGH when booting.

26278: <p>I'm using an ESP-01 to control a load (SSR), which is connected to IO pin 2. This pin needs to be <code>HIGH</code> at boot time, otherwise the module won't boot. I've tried driving the load with an optocoupler to avoid driving the pin <code>LOW</code> while booting, but it's not working. Do you know of any solution to make it boot correctly without changing the IO pin? (there's only two GPIO pins, both ocuppied, plus serial port pins).</p>
 4143: <p>Simply invert the logic - so that LOW turns the SSR on and HIGH turns it off.</p>

<p>Try something like this:</p>



<p><img src="https://i.stack.imgur.com/O7p3m.png" alt="schematic"></p>



<p><sup><a href="/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fO7p3m.png">simulate this circuit</a> &ndash; Schematic created using <a href="https://www.circuitlab.com/" rel="nofollow">CircuitLab</a></sup></p>

<p>The P-channel FET will invert the logic. Pull GPIO2 LOW and it will turn on the FET which will enable the SSR. The 10KΩ resistor keeps the GPIO pin (and the gate of the FET) HIGH at other times.</p>

<p>If the GPIO pin can sink enough current to directly drive the SSR you can leave out the FET:</p>



<p><img src="https://i.stack.imgur.com/JRkHs.png" alt="schematic"></p>



<p><sup><a href="/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fJRkHs.png">simulate this circuit</a></sup></p>

<p>Again the logic is inverted. Pull GPIO2 LOW to sink current through the SSR to turn it on. The resistor keeps the GPIO pin held HIGH when booting.</p>
