yaESP – A multipurpose ESP8266 peripheral board

2015 yaESP 0v32

The yaESP is an exploration of the the new low cost WiFi b/g/n ESP8266 modules and features a number of shared peripherals occupying the 9 available I/O. Programmable in C as well as LUA, the ESP8266 has a strong community building around it.  The peripheral features are as listed as per the I/O connection as follows (4 & 5 are reversed). Pins with suffix a/b/c are options depending on board population.


0PROGPRGButton & Connector & Auto Reset
1&3TX&RXUSBCH340G USB to serial converter
2DHTDHT11 - temperature and humidity sensor
4aOPTOISOConnector for isolated input by optocoupler
4bOPTOVS1838B - IR receiver for remote control
5LEDRGBWS2812B RGB LED & connector
12a1WIREKTCConnector for thermocouple by MAX31850
12b1WIRE1WRConnector for off board devices
13aAUDIOAmplified speaker by IS31AP4991
13bAUDIOSPKConnector with low side 5V switch by N-FET
14aRELAY1OTAConnector with one half of A3910 H-bridge
14bRELAY1OTAConnector with low side 5V switch by N-FET
15aRELAY2OTBConnector with one half of A3910 H-bridge
15bRELAY2OTBConnector with low side 5V switch by N-FET
16aBUTTONPhysical button for user interface
16bBUTTONWake from sleep by reset connection
16cBUTTONBTNConnector for off board function
ADCaADCMicrophone input amplified by MCP6L91
ADCbADCLight sensor ALS-PT19-315C in voltage divider
ADCcADCANAConnector for off board analog input



The schematic illustrates the connections.

yaESP 0v32 SCH


The enclosure is a three layer acyclic sandwich:

2015 yaESP 0v32 SK09 ENC

On Board Functions

Measuring temperature and humidity

The on board DHT11 can measure temperature to ±2°C and humidity to ±5?RH. Alternatively for better accuracy and resolution the DHT22/AMS2302 is also supported.

Receiving IR remote signals

Shared with the optocoupler input  on 4a/4b is a VS1838B infrared remote demodulator. This device will receive most TV remote control codes modulated at the standard 38kHz.

Listening for sounds

An amplified microphone is connected to the on board ADC. The amplifier is an MCP6L91 configured in inverting form. This input is shared with the light sensor ADCb as well as ADCc, the off board analog connector ANA.

Measuring light level

A phototransistor light sensor ALS-PT19-315C, in a voltage divider, is connected to the ADC input.  This input is shared with the microphone ADCa as well as ADCc, the off board analog connector ANA.

Audio playback

A speaker, amplified by IS31AP4991, is available for audio playback and PWM beeping. The amplifier (13a) is shared with a low side switch (13b).

Off Board Extensions

Measuring high temperatures

Thermocouples can be used to measure a wide temperature range, K-type probes are available for a few dollar that can measure up to 800°C.  Higher temperatures are possible with an upper limit of around 1300°C.  The thermocouple is polarized and connects to the pins labeled KTC, the negative pin on the PCB is marked with a negative symbol.  This option requires populating IC4, the MAX31850 thermocouple amplifier and a few discrete resistors and capacitors.

Measuring multiple temperatures

The 1Wire bus can be used to connect multiple devices simultaneously, it requires no additional on board hardware and does not conflict with the thermocouple amplifier. The common 1Wire temperature sensor is the DS18B20 by Maxim, which has a temperature range of -55°C to +125°C and is accurate to ±0.5°C over the range of -10°C to +85°C.

Switching a 120v AC load

An electromechanical relay or a solid state relay can be use to switch large AC voltages. The SSR-40DA is a common solid state relay that can switch up to 40 Amps and 150 volts. This relay can be controlled with options 14b, 15b or 13b, a low side 5v switch with off board connectors OTA, OTB or SPK.  An electromechanical relay can also be used with the same conenctions keeping in mind the coil should be rated for 5v.

Sensing an AC voltage

The connector labeled ISO provides an optically isolated input along with a few discrete components depending on the AC voltage to be sensed. The optoisolator is part SFH6186-2. For sensing a 24vAC signal, a diode is required for reverse protection along with a pair of 1k ohm series resistors for current limiting. Isolated DC sensing can also be implemented with suitable values parts.

Controlling a DC motor

A small DC motor, up to 5v and 500mA can be speed controlled in forward and reverse by the H bridge. This makes use of options 14a and 15a and requires IC1 and IC3 to be populated, the A3910 H-bridge and 74LVC2G04 level shifter. Motor connections are OTA and OTB and optionally have back EMF protection diodes.

Multiple single direction motor operation can also be implemented, see the next section on switching a DC load.

Switching a 5v DC load

Small DC loads up to 2 Amps can be switched directly by any of the low side N-channel MOSFET switches. These are options 14b, 15b and 13b, with off board connectors OTA, OTB and SPK respectively.  Back EMF protection diodes are optional for OTA and OTB. Current limiting resistors are optional for OTA, OTB and SPK.  Pulse width modulation can be applied to these switches as well.

Connecting more RGB LEDs

The yaESP board has a level shifted WS2812b RGB LED on board running from 5v. This is a serial shifted LED with the data out on the RGB connector. Additional WS2812B LEDs can be added for individual control. The level shifter is part 74LVC1T45.

Sensing a reed switch

A passive reed switch or active PIR sensor can be connected using the BTN connector. This interface has a 3.3 volt pullup resistor and is active low.

Measuring analog voltages

The ANA connector can feed the internal analog to digital converter thru a resistive divider. The range into the divider is 0 to 3 volts.



Leave a comment below if you have an interesting application in mind …

One Response to “yaESP – A multipurpose ESP8266 peripheral board

  • Looks like a nice board – any plans to make it available, in the shop or on github?

Leave a Reply

Your email address will not be published. Required fields are marked *