Having discovered some less than ideal historical settings in ESP-GO, today I’ve removed all commands which could OUTPUT to GPIO0. a throwback to the old ESP-01 days. I’ve also updated some default input bounce settings and improved the little-documented DEBUG2 command which lets you see the state of inputs on the serial terminal (I abandoned my own serial terminal some time ago in favour of the excellent and free YAT). The current software will be parked and esp-go-3 will appear, with GPIO 4 and 5 correctly used as boards with incorrect markings are by now likely out of circulation. While working on using SDK 3.1 (without success as the SDK appears to use more space than before) I’ve actually GAINED plenty of RAM to continue to expand with SDK 2.1 (which works a treat).
Coincidentally, Aidan’s new boards are already into revision 2 to cater for the changes and to make some clearance improvements. Here are some pics. The board will be “revision 2” but this one will serve the purpose of demo.
We had these 2-sided boards made from Aidan’s design and Gerbers at JLCPCB and I must say the price and quality were just right.
The things to note about this board: mains power supply is included – note the connector at the bottom of the image above: The final board will differ slightly with N N L L SW SW in that order. Note the uncommitted contacts and the optional break-off LED board, used to provide a pretty display in the box and using one GPIO only (four WS2812b 5v LEDS).
The board is meant to go hand-in-hand with ESP-GO but of courses could be used with any software in the hands of a whiz as its brain is an ESP-12 board. The power supply provides easily enough 3v3 power to run the board and sensors like BME280 etc., the 3v3 relay and the internal LEDs. NOTE however that revision 2 is on the way – so there will be some delay before this goes any further -partly as Aidan wants to send off an order order comprising other designs as well and partly as I’m off on hols in the USA for 3 weeks (during which time I will be quietly working on ESP-GO-3 – shown working in the image below but not yet 100% tested – hey, I’m getting ready for my hols).
The current layout needs changes including a big capacitor as I noted a slight wiggle in the LED output, a pull-down for the input of the MOSFET driving the relay, greater earth clearances around pads and track clearance on the mains side. All of this has been added to the artwork and will go into the next set of boards which JLCPCB will hopefully produce and ship pronto. Thanks to readers for pointing out (almost to be expected)prototype issues.
I tend to use these 10 amp relays up to a maximum of 1KW (a tad over 4 amps on 220v mains) for inductive loads – so 4 amps AC or less (for inductive loads) makes sense. This applies also to the likes of Sonoff boards and similar with 10 amp relays. Of course track width and relay quality are also important. Anyone contemplating using this design may (or may not) care to consult the regulations in their country.
The board is a perfect fit for the smaller (and cheaper) of the two boxes described here – https://tech.scargill.net/box-nirvana/
Note the connections – GPIO4 and 5 are brought out with 3v3 I2c-compatible pull-ups. GPIO 2 and 14 are available as inputs for buttons (short to 0v for pressed).
Above, I’m testing the board serially… I use YAT.
The board will use GPIO15 to power the relay via a MOSFET and GPIO16 for indicator RGB LEDs (GPIO16 is no good as an input so unless you’re planning ultra-low power stuff it is as good a choice as any).
So GPIO16 on this board is powering the nifty WS2812b display LEDs from a single port. I can’t show you this at it’s best without video so you’ll have to accept that this is a fairly smooth fade with full RGB colour control, primarily to make the box look like it is doing something.. I am of course using Node-Red to control this (along with my house and other experiments on the same Raspberry Pi 3 that is also running PIHOLE and PIVPN without breaking a sweat).
A note for those who like to worry… no we’re not going into production. Aidan will likely make the Gerbers available and even provide boards at a reasonable price for interested parties. Under no circumstances do either of us accept any responsibility if you blow yourself up – be warned.
This stuff is meant for experienced experimenters and in this case involves working with dangerous mains wiring. Be warned. The power supply is of the insulated type but best to avoid touching anything when mains is connected. When programming I use an FTDI, but as this board runs on 3v3 and FTDI 3v3 output is often low, I use a 3v3 supply to provide power to the board when testing, not mains – I value my hands.
This is quite exciting. More capable than a Sonoff and uncommitted contacts, too.