by ControlBits

Environmental Monitoring for the Internet of Things

View all updates Aug 25, 2020

Getting Started

by Jon Luke

A Guided Tour of EMIT’s Features

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.

30-pin ESP32 DevKit1 Socket

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.

Temperature & Humidity Sensor

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
Resolution0.1° 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 Frequency2 seconds max
Humidity Sensor Specification
Range0 to 99.9 %RH
Resolution0.1 %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 Frequency2 seconds max

MicroSD Card Socket

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.

5A SPDT Relay & FET Relay Driver

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.

GPIO Expansion Connector

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:

  • 8x digital inputs/outputs
  • 4x analog inputs (12-bit resolution)
  • 1x I²C serial port
  • 1x Serial UART

The full interface connector layout is shown in the table below:

Programmable LEDs

To provide visual indicators for for users, the EMIT board includes two user-programmable LEDs:

  • A RED LED is connected to the ESP32s GPIO16 pin, and
  • A GREEN LED is connected to the ESP32s GPIO17 pin.

These LEDs are ideal for confirming connection to Wi-Fi, receipt of communication, or sensor-read status.

Optional Enclosure

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.

Development Support

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:

  • Use of a free MQTT broker;
  • Sample MQTT client application samples, written in python; and
  • An online support forum.

All product support, documentation, sample code, and firmware are available from the ControlBits.com website.

About the Author

Jon Luke

ControlBits-Jon  ·   United Kingdom

$3,180 raised

of $3,000 goal

106% Funded! Order Below

Product Choices


EMIT - Board Only

A dev board with a socket for a 30-pin DOIT ESP32 DEVKIT V1 (not included), an integrated temperature and humidity sensor, a microSD slot, an I/O expansion socket, and an 5 A SPST relay.


EMIT - Full Kit

A Wi-Fi- and Bluetooth-enabled ESP32-based dev board with an integrated temperature and humidity sensor, a microSD slot, an I/O expansion socket, and an 5 A SPST relay. Includes a 30-pin DOIT ESP32 DEVKIT V1, a custom enclosure, an 8 GB microSD card, and a USB cable.



At Control Bits we're dedicated to building great IoT products that are open to everyone through education, hardware development kits, and open source software. Along the way we aim to build an open and vibrant community.

Jonathan Luke

See Also

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects: