EMIT (Environmental Monitoring for IoT) is an IoT development kit for ESP32. The EMIT board contains everything you need to monitor and control your environment, making it the ideal starting point to learn new IoT skills and develop products like Internet-connected room thermostats, smart greenhouse controllers, or IoT weather stations.
In addition to hardware, the EMIT project also includes a full set of step-by-step tutorials, free access to MQTTHQ.com—a robust MQTT broker—and sample back-end and front-end applications.
In this first ‘Getting Started’ tutorial, we’ll start by exploring EMIT’s features and discussing how you can access them with Micropython running on your ESP32.
The picture below shows the various features of your EMIT board. We’ll walk through them here, one-by-one.
Processing power for the EMIT development board, is provided by a low-cost, 30-Pin ESP32 DevKit1 that includes the popular Espressif ESP32 wireless IoT module with an integrated, dual-mode antenna for Wi-Fi and Bluetooth. The ESP32 DevKit1 is not included with the board itself but is easy to find elsewhere (and does come as part of the full EMIT development kit).
EMIT’s ESP32 can be powered over USB (typically by your computer during development) or through a 2-way DC input screw-terminal connector (which is more convenient for most deployment scenarios). The DC input has diode protection, to protect your ESP32 if you accidently reverse the polarity of the power supply, and a pair of holes that allow you to add a cable tie for strain-relief. The 2-way screw-terminal connector faces ‘inward’ to allow easy connection when passing cables through the middle.
To measure the temperature and humidity of EMIT’s environment, the board includes an AM2302 temperature & humidity sensor. The sensor can measure temperatures from -40° C to +80° C and humidity from 0 %RH to 99.9 %RH.
The AM2302 uses a single pin serial protocol and is connected to the ESP32s GPIO14 pin. The standard Micropython distribution for the ESP32 includes a ‘dht’ library that makes using the AM2302 easy.
The sensor can be read by the ESP32 at a maximum frequency of 0.5 Hz (once every 2 seconds). The full specification of the Temperature & Humidity Sensor is shown below.
|Temperature Sensor Specification|
|Range||-40° to +80° C|
|Accuracy (Typical)||+/- 0.5° C (+10° C to +55° C)|
|+/- 1.5° C (< 10° C or > 55° C)|
|Max Error||+/- 2.0° C (at < 10° C or > 55° C)|
|Repeatability (Typical)||+/- 0.2° C|
|Read Frequency||2 seconds max|
|Humidity Sensor Specification|
|Range||0 to 99.9 %RH|
|Accuracy (Typical)||+/- 2 %RH (20% to 80%)|
|+/- 3 %RH (< 20% or > 80%)|
|Max Error||+/- 5 %RH (at < 20% or > 80%)|
|Repeatability (Typical)||+/- 1 %RH|
|Read Frequency||2 seconds max|
The EMIT development board includes a microSD card socket that provides a means of storing data locally. The microSD Card socket is connected to the ESP32s SPI port on ‘Slot 2’ (i.e. SCK = GPIO18, CS = GPIO5, MISO = GPIO19 & MOSI = GPIO23). There is also a hardware ‘Card Detect’ feature available on the GPIO4 pin.
The standard Micropython distribution for the ESP32 includes an ‘sdcard’ library that works in conjunction with the ‘machine’ and ‘os’ libraries to handle SPI port configuration, microSD card setup, and mounting onto the OS. Configuring and using the microSD card on EMIT will be covered in detail in its own tutorial.
The microSD card can is useful for storing temperature and humidity measurements in applications like temperature and/or humidity data logging, to buffer data while awaiting transmission via MQTT, or to store settings.
To provide a means of feedback and control, EMIT also includes a 5-Amp, Single-Pole, Single-Throw (SPST) also known as a ‘Normally Open’ (NO) relay.
The relay is driven by the ESP32s GPIO26 pin via a Field Effect Transistor (FET) to ensure sufficient operating current is available to the relay under all conditions.
There is also an orange ‘Relay Status’ LED. Which is lit when the relay contacts are closed.
The relay contacts are made available on a 2-way screw terminal which faces ‘inward’ to allow easy connection when passing cables through the center of the PCB. A pair of holes are provided to allow you to add a cable tie for strain-relief.
To enable further expansion, the EMIT development board includes a GPIO Expansion Connector. This connector is ideal for interfacing to additional sensors such as a soil moisture probe or an ambient light sensor.
The GPIO Expansion Connector has 8x GPIO pins plus 1x 3V3 power supply and 2x GND pins. The VIN supply is also available on the connector.
The GPIO Interface pins can be configured to provide:
The full interface connector layout is shown in the table below:
To provide visual indicators for for users, the EMIT board includes two user-programmable LEDs:
These LEDs are ideal for confirming connection to Wi-Fi, receipt of communication, or sensor-read status.
The EMIT development board has been designed to fit a wall-mounted, CamdenBoss CBRS01VWHvented enclosure. This enclosure is widely available from electronics suppliers and one is included as part of the full EMIT development kit.
We provide step-by-step tutorials on programming the EMIT development board with Micropython. All sample code will be available on the ControlBits GitHub repo.
To support EMIT users, ControlBits is also providing:
All product support, documentation, sample code, and firmware are available from the ControlBits.com website.
A single, maker-friendly, platform designed for IoT application and development.
An ESP8266-powered, open source, Wi-Fi dev board for monitoring air quality and detecting dangerous gases.
A wireless, wearable, open source vital signs monitor powered by ESP32