I wanted to power a solenoid valve for a short pulse.  I used a 555 board & an SSR board.  It worked OK but not very convenient.  Once I'd hacked the 555 board with reasonable R & C values, the timing pot was pretty coarse & any bump would change it.  I needed to be able to set different pulse lengths for different uses and select between them instantly & reliably.  But most of all, I need the pulse to be on for a maximum - even if I've left my thumb on the button for longer than the pulse should be.  The 555 is fantastic for a couple of pulse scenarios but there are many useful pulse patterns that can't be done even with a 556. 

The ESP-01 (S or not) has at least 2 usable GPIO pins for the trigger & output and they are cheap and common like the 555.  It was easy to program a GUI full of simple & elaborate pulse pattern choices to use from any browser by WiFi.  There are a few different ESP-01 relay modules available cheaply but they seem to all have problems of some sort.  I've seen 3 slightly different designs which all glitch the relay during power-on or reset.  In some uses this could literally be fatal.  Another design uses a second micro-controller to avoid the glitch but is awkward to use and many fakes are sold unprogrammed.  To use these boards I also bought a breadboard break-out and a programmer (to which I had to add PRG & RST buttons).  But worst was that I had to move the ESP-01 from the relay module to the programmer every time I wanted to make a change. 

So I made a list of wants & needs and designed a better ESP-01 relay board with all the trimmings, optional wherever possible to enable the same PCB to be used in many different configurations.  I tested the proof-of-concept by modifying one of the other boards: cutting tracks & soldering new components onto the exposed pins of others.  As with the modification of the original 555 board, this was a time consuming & fiddly pain so I resolved to make my version as hackable / DIY-friendly as possible.  Hence the combination of SMT & THT with header pins, mounting holes and a less cramped size, all for user convenience. 

Preventing the boot glitch was the main issue to resolve.  A simple R-C low-pass filter driven by a buffer transistor inserted between the GPIO pin & the output switching FET was all that was needed.  I don't understand why other designs didn't already do this.  After testing & tweaking I found an R-C combination which works reliably and still allows a switching time of under 20mS - never an issue for a mechanical relay and even fast enough for rough PWM with an SSR.  The next biggest issue was GPIO pin choice.  Rather than go through all the considerations I'll just summarise the main points of my choices below. 

GPIO0 for the !TRIGGER input.  To allow in-situ programming, it needs a button to GND on GPIO0 anyway so as long as you understand the implications, it's perfectly OK to re-use that for run-time use too.  The "TRIGGER" signal is active low ("!" prefix) to match the program enable usage.  In the worst-case scenario where the board is booted while GPIO0 is unintentionally held low, no harm will come: The relay will not be energised & the program will not be erased.  Just power it off, remove whatever was holding GPIO low & power it on again - all will be fine.  In fact, it can even be used for an IR-receiver or 1-Wire bus sensors such as DS18B20 without interfering with the normal boot process.

GPIO2 for the !OUTPUT switching.  To allow full use of serial in both directions on GPIO1 & GPIO3, the only free pin left is GPIO2.  The "OUTPUT" signal is active low ("!" prefix) so that it is inactive on initial power-on for safety.  For 555 emulation this needs to be inverted by a push-pull "totem-pole" opto-isolator which is a good thing to have anyway. 

Keeping GPIO1 free for serial TX allows logging which makes development much easier & faster.  In deployment it can also be used for logging such as recording the time of each trigger, what browser device has connected etc.  Keeping GPIO3 free for serial RX allows control by another device such as Arduino or Raspberry Pi.  Either emulating the AT command set or using your own.  So this new board can now be controlled by WiFi, serial, GPIO signal & button - all at the same time.  And IR-receiver or 1-Wire bus in addition to that. 

Output switching hardware has been given as much choice as possible because sometimes I want to switch 100A and sometimes I want to switch faster & more often than a mechanical relay would cope with.  And sometimes I just want to do what a 555 would do.  So this design exposes the raw !OUTPUT signal on a pin header for driving other devices and on the board edge for directly driving a large external SSD.  The pin header also has the buffered OUTPUT from either a push-pull opto isolator or a power MOSFET.  In addition to these, there is also a space on the PCB for either a small mechanical relay (just like the other boards) or an in-line PCB SSR for fast & silent mains switching.  The PCB can switch at least 3A through the onboard relay / SSR, 2A through the MOSFET or 1A through the push-pull opto isolator.  The off-board SSR can be any FOTEK SSR-* D* or similar device, or even a bank of them.  

The pin headers are aligned to allow direct breadboard mounting while leaving a gap for the 35mm DIN-rail spaced mounting holes.  The first header exposes all of the pins from the ESP-01 in the same order.  This will be useful if you want to use the deep-sleep mode for example.  You would also use this if you wanted to control up to 3 other "agent" boards containing only the output components from a single main "controller" board with the ESP-01 & power components.  The second header exposes !TRIGGER, OUTPUT & power pins for 555-esque usage.  It also has the !OUTPUT because that doesn't belong on the first header. 

Multiple boards can be teamed in a number of ways.  In addition to the "controller/agents" arrangement above where the boards are wired together using the GPIO pins, you could also daisy-chain an unlimited number of them such as for automating complex model railway sequences with customised timings.  In another topology, you could team many of these boards using multi-drop serial or over WiFi so that each board's TRIGGER influences the OUTPUT of the other boards.  E.g. morse-code practice pair or multiple quiz-buzzers or a multi-point door-bell/chime/door-release set.  Please don't ever use these for hideous outdoor Xmas lighting extravaganzas ;-)

Other hardware features include an LED which can be configured by solder jumper to be the missing LED from an "ESP-01 S" variant or to follow either the OUTPUT or !OUTPUT.  More solder jumpers enable pull-up resistors which are missing from the "ESP-01" variant.  There are also solder jumpers to enable (or bypass) Schottky diodes on the GPIO0 & GPIO3 inputs which allow driving from 5V logic or 12-15V as found in automotive applications.  These solder jumpers allow great flexibility.  To use 1-Wire for example you would enable the pull-up resistor and bypass the Schottky diode on GPIO0.  The push-pull opto isolator is laid-out as an 8-pin device but can also accommodate a 6-pin device with another solder jumper.  Pin-outs vary so you must be careful if making your own substitutions.

Complimentary software maintains the focus on pulse control but takes it beyond what a 555 (or 556) can do.  In my first use case it outputs only the desired pulse length even if the trigger is held low.  Of course it can do any pulse pattern you can program such as for a  dual-pulse spot welder, or an induction motor soft-start using rough PWM.  Inching/toggle, follow, delay-on, delay-off, frequency sweeps, pulse bursts, random switching.  PID from a 1-Wire DS18B20 with local button toggle over-ride is another good use case.  My software for this will also have multiple aspects such as GPIO, serial, WebSockets, URL-GET etc. hopefully all concurrently but it's still a work in progress.  Meanwhile, this board design remains compatible with all existing software for similar boards, though you may need to change the output GPIO pin in the software.