back
139 comments
I built something like this but more special-purpose. It just switches a USB-A power source on/off. I wanted it to control my 5-volt fish-tank lights. I didn't want to use a 120VAC smart switch for each light because I prefer to use a single USB hub to power them all, and a bonus feature was being able to PWM the lights so the fish aren't freaked out when the lights suddenly turn on 100% in the morning.

I ordered PCBs from JLCPCB and components from LCSC. I think each one cost around $5 in parts, and I hand-assemble them as I need more around the house.

https://github.com/sowbug/smart-usb-switch

Picture: https://raw.githubusercontent.com/sowbug/smart-usb-switch/ma...

I made lights using ws2812b leds and simulated sunrise, sunset, and a dim blue throughout the night.

I used ws2812b leds, wemos d1, and a level translator since the d1 has 3.3v gpios but ws2812b technically requires a 5v signal.

>PWM the lights so the fish aren't freaked out

How certain are you the fish can't see the PWM?

I am sure this is something will be able to answer:

I need to build a custom board for an ESP32 which should support low-power deep sleep and which should contain some additional circuitry (is that what you call it?) to drive an Eink display.

Basically this[1] board, but a different shape and better low-power sleep properties.

If I wanted to design this board myself, how long would it take to learn this? Are there good resources?

If I were to pay somebody to do design this, what order of magnitude would the cost be in?

> https://eckstein-shop.de/Waveshare-Universal-e-Paper-Raw-Pan...

Cool - it looks like a well-designed board, although the timing is a bit unfortunate with the ESP32-S2 emerging as an ESP8266 replacement with USB.

A few questions:

* Should the relay have some sort of isolation, like an optocoupler?

* Is it FCC-certified?

* Like other people asked, any information on how the antenna was designed?

I like the old-school dome LEDs. And it's cool to see another project with a CH340 USB/USART bridge, even if they wouldn't need it with an ESP32-S2.

Regarding your first point, the relay has 2,000V of coil-to-contact isolation:

https://omronfs.omron.com/en_US/ecb/products/pdf/en-g5le.pdf

Though it does look like the clearance/creepage distances on the PCB to the low-voltage ground plane are not any wider than 2mm or so, which is acceptable for 120VAC, but not acceptable for 240VAC per IPC9592.

I wouldn't worry about sticking this in an enclosure and using it to turn a light on and off, but I wouldn't want to be handling it while it was live, either!

Regarding FCC/UL certification, a product is exempt from FCC certification requirements if it's "A digital device used exclusively as industrial, commercial, or medical test equipment", which most development boards are. I've got some dev boards from Microchip on my bench right now which aren't FCC or UL listed, either.

I don't see any benefit in using an optocoupler. Using a transistor with flyback diode for protection is acceptable. Both the relay and ESP8266 are powered from the same 5V source, adding an optocoupler is not really isolating anything.
> * Is it FCC-certified?

It would certainly appear to lack the FCC ID label/marking it is required to have if it is FCC certified. So probably not. Thus, it also appears doubtful whether it can legally be marketed or sold in the U.S.

One way to deal with high voltage is to use an external hockey puck solid state relay. Keeps the high voltage off the PCB and you don't have the kick from the relay coil finding it's way into the digital logic.
A decent heuristic for whether or not a wireless module has been FCC certified is whether or not the RF components are under a metal shield:

If it doesn't have a shield, it's almost certainly not FCC certified.

If it does, it's more likely to be certified.

Who has used RS232 voltage for serial in the last 10 years? I'd rather a few MOSFETs to cut the power to everything for lower power. I guess there is a specific market for this and it is not me. I have at least 20 of Esp8266 and esp32 boards around the house. A bit of fun to design and produce though. I would not bother with the ESP8266 anymore considering the marginal cost of the esp32 and it is a much better device, learnt from their mistakes. The new one with on chip USB looks great too.
Haha, we built this internally to use with Axiom scanners in our fulfillment centers which use RS232 interface, those scanners are 20 years old.

I convinced my boss to let me sell these as open source since we found many cool IOT uses for them around the office as well, that's why you are getting the RS232 on there but most people probably will not need that feature, but hey... it is there if you need it :)

Yeah, I'm regretting getting the esp8266 not knowing of the esp32. Besides being a better device for basically the same price, it has better tooling from espressif.
If the cable is longer than a few centimeters, the voltage makes sense.

rs232 can run quite long distances.

I have. Roboteq motor controllers use RS232 voltage levels :-/
Isn't the esp8266 much lower power than the esp32?
Nice. There's also a project called FEMU, which is an ESP32 Wi-Fi/Bluetooth board that fits in a USB port: https://hackaday.io/project/167005-femu-an-esp32-wi-fiblueto...
I recently created a board for the nrf8001 Bluetooth low energy chip. I see your antenna section isn't fully open since that LED is in the way, have you considered rearranging things so that PCB antenna has an unobstructed path on the left and right sides?
Pretty rad! I could see lots of applications. Available on amazon you say? 19.99 you say?

https://www.amazon.com/dp/B08GY2GTW5?ref=myi_title_dp

I'm curious about availability. Are they ready to ship? Awaiting preorders?

EDIT: Oh I see 18 in stock. Probably remains of a small run to gauge interest. I hope it takes off. I'm going to make it 17. :-)

we have more stock, just waiting to transfer to Amazon
Interesting. Seems fairly comparable to the Sonoff Basic (also ESP8266, retails around $5), but more DIY friendly.

Are you planning to sell a case to go with it?

Yes we probably design a case that you can 3D print and will add it to GitHub soon ish
Charles Lohr has done some neat projects with this board. Recently he made this post and I've never thought about this level of hand-holding interaction with the silicon itself.

https://twitter.com/cnlohr/status/1307890077041909760

Is the antenna open source? Is it characterized (bandwidth, efficiency, radiation pattern)?

Almost like one from here: https://www.ti.com/lit/an/swra351a/swra351a.pdf

Yeah the antenna footprint is actually that one provided by ti. I had created a footprint from that pdf but then I found a kicad footprint somewhere that looked a little nicer than my rudimentary skills. This was my first design with an antenna and I am certainly not a good rf engineer. I'd appreciate any tips and feed back.
I believe it's called a 'Meandered Inverted-F Antenna (MIFA) ' I used the footprint from https://github.com/prasad-dot-ws/ESP32_MIFA_PCB_ANTENNA recently, which is based on Espressif's gerbers for a sample pcb.
Looks interesting. How would I program it, do I need a FTDI board?

Also I wish it was available in Canada.

It says it can be programmed over the microUSB (just like an Arduino).
It has a CH340 USB-UART chip onboard, so it looks like no need for an FTDI board.
Just curious not really familiar with electronics but what can i build using this
Lots of things. The original design for this chip was to have a serial to WiFi bridge. I use one of these as exactly that: a WiFi connected serial console for one of my home servers so I can get into it even if for some reason it isn’t on the network.

But you can also do so much more: these chips have lots of GPIO pins so you could control anything that an Arduino or another microcontroller can control such as relays, displays, temperature/humidity/proximity/etc. sensors, LED strips, motors, heaters, and so on. But the kicker is that with built in WiFi so you can natively get it online. A lot of smart lights now have these chips in them for example and you could make your own. Or your own internet connected green house with vents you can open/close and sensor readings for temperature and humidity in the air and the soil. Or an RC car you control from your phone. Or shades that open and close based on time of day. Or a garage door opener. Basically if you need a gadget you control over a network, these probably should be your first potential solution. They are low power and physically small compared to something like Raspberry Pi’s or other single board computers and more powerful than Arduinos.

Given all the air quality issues in CA right now, I've been planning to put together an air quality + temp + humidity sensor that I can run off a battery and connect to my wifi. I already bought the sensors which I have connected to a Raspberry Pi just to play around with them, but of course a RPi won't last long on a battery. I really want something I can just toss in the corner of a room and easily move around.

I've mostly been looking at the ESP32, though (newer, also has bluetooth and 2 cores, and is lower power), and some of the ARM Cortex-M-based microcontrollers.

I combined an ESP8266 with a 4x20 LCD display.

As the device has onboard WiFi I can poll a remote site to get data and display it, updating every few minutes. I use that to show the next departure-times at the tram-stop round the corner from my house.

Sure I could use an app, or even walk there and wait, but it's nice to know when to leave - especially in winter-time!

Here is a few ideas:

Alexa enabled switch to turn on / off a TV using the IR blaster

my boss used 3 of these this to build a smart sprinkler system for his house.

Fun looking little board. Great to see people sharing these things!

It makes me wonder if there’s interest in more of these type ofESP* dev kit boards. One I haven’t seen is one with just Ethernet PHY but no Ethernet jack/magnetics. It’s been useful in my designs to have a ETH+/- that can be brought out to various Ethernet / PoE setups. Something like the wESP32 is handy for kits but not for integration.

Cnohlr did just this, although he strongly suggests using proper interfacing, but having the bare signal wires at hand can be useful for chip to chip communications on the same board. One could build a board with N ESP chips then connect them directly by daisy chaining their TX and RX pins, that is, passing packets in circle, or behind an Ethernet switch chip, de facto creating a board level local network. Might be interesting for some applications.

https://github.com/cnlohr/espthernet

Maybe I'm missing it but I wish there was an ESP8266 board with a proper JTAG connector.

I have hacked something on a protoboard for nodemcus before, but it ended up being pretty messy.

I too want to have this FCC certified.

$19.99 seems a bit expensive to me though.

the wifi stack onthe esp8266 is a mess. it also does not support the latest espressif sdk. so you should buy an esp32 module and dont bother with this. ( the price is 3 bucks instead of 20)
The biggest/best reason I know for using ESP8266 is the integrated WiFi module, but it seems that this doesn’t expose that or at least capitalize on it, which gives little incentive to use this over something like the Teensy.

Is there any intention to add WiFi support to the dev kit?

Yes ESP8266 has WiFi Built-in but thanks for the pointer, I will update the description to reflect that fact.
It appears that there is an antenna on the PCB so I believe WiFi is supported here. Outside of that, the ESP8266 is a pretty nifty CPU itself. Depending on what you want to do, a Teensy might be what you want. The ESP chips do not have an FPU for example.
From board picture it looks like a wifi antenna is on the board, maybe WifiClient.h would work?
Interesting project. By why no USB? Why does it have a Relay?
What do you mean by no USB? There is a CH340C uart to USB chip onboard and a micro usb port. Is there something specific you're looking for?

The relay would just be used as a switch to turn on/off an external device using higher voltages, AC or DC.

Cool board! The only thing I think would be a nice-to-have is an integrated wifi module.
doesn't esp8266 have wifi built in?
I have an interest in electronics and would call myself a "maker" (well, I have a growing box filled with various arduinos and microcontrollers)... but after scouring the repo and the website, I can't figure out what this is, or what I could do with it!

What is an "ESP8266 board"? Is that something that is so common it doesn't need explaining? Of course I will google it [and probably buy one], but just pointing out that it's not very clear from the website!

[EDIT: ok, after 10 minutes of googlin', it seems no one will explain what it is - it's just "an esp8266 system on a chip". It must be the first rule of ESP8266 club...]