Skip to content

A Guided Tour Of EMIT's Features

ControlBits edited this page Nov 9, 2020 · 14 revisions
Clone this wiki locally

A Guided Tour of EMITs Features

The EMIT (Environmental Monitoring IoT) development kit is an IoT development kit for the 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 such as an internet connected room thermostat, smart greenhouse controller or an IoT Weather Station.

In addition to the hardware, the EMIT project also includes a full set of step-by-step tutorials, free access to – a robust MQTT broker and example back-end and front-end applications.

In this first ‘Getting Started’ tutorial we’ll start by exploring EMIT’s features and how to access each of them on your ESP32 using micropython.

The picture below, shows the different features of your EMIT board, we’ll walk through them here, one-by-one.

EMIT board features labeled

30-pin ESP32 DevKit1 Socket

The processing power of the EMIT development board, is provided by a low-cost, 30-Pin ESP32 DevKit1 that includes the popular Espressif ESP32 wireless IoT module with integrated dual-mode Wi-Fi and Bluetooth antenna. The ESP32 DevKit1 is not included with the board but is commonly available separately or as part of the full EMIT development kit.

The ESP32 can be powered from your computer via the USB (typically during development) or via the 2-way DC input screw-terminal connector on the EMIT board (usually the most convenient method in the final application environment). The DC input also has diode protection to prevent damaging your ESP32 if you accidently reverse the polarity of the power supply and a pair of holes to allow you to add a cable-tie for strain-relief. The 2-way screw-terminal connector ‘faces in’ to the centre of the PCB to allow easy connection when passing cables through the centre of the PCB.

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 -40oC to +80oC 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 +80oC
Resolution: 0.1oC
Accuracy: +/- 0.5oC
Repeatability: +/- 0.2oC
Read Frequency: 2 seconds max

Humidity Sensor Specification

Range: 0 to 99.9 %RH
Resolution: 0.1 %RH
Accuracy: +/- 2 %RH
Repeatability: +/- 1 %RH
Read Frequency: 2 seconds max

microSD Card Socket

The EMIT development board, includes a microSD card socket to provide a means of local data storage. 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 such as temperature and/or humidity data logging, to buffer data while awaiting transmission via MQTT or to store settings.

5 Amp 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.

IMPORTANT SAFETY NOTICE: EMIT has been designed for a maximum working voltage of 12 Volts. DO NOT directly connect any voltage higher than 12 volts to the relay or any part of the EMIT board.

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 in’ to the centre of the PCB to allow easy connection when passing cables through the centre of the PCB. A pair of holes are provided to allow you to add a cable-tie for strain-relief.

Programmable LEDs

To provide a means of visual status feedback 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 communications or sensor read status.

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 any combination of:

  • 6x digital inputs/outputs
  • 4x analogue inputs (12-bit resolution)
  • 1x I2C serial port
  • 1x Serial UART

The full expansion connector layout is shown in the table below: EMIT expansion connector layout

Optional Enclosure

The EMIT development board has been designed to fit a wall-mounted, vented enclosure (CamdenBoss Part No. CBRS01VWH). This enclosure is widely available from electrical component suppliers and one is included as part of the full EMIT development kit.

Development Support

The EMIT IoT development board is fully supported by step-by-step tutorials for programming EMIT with MicroPython and Arduino/C++

All code examples will be available on the ControlBits GitHub repro at:

To help EMIT users, ControlBits is also providing:

  • use of a free MQTT broker at:
  • sample MQTT client application examples, written in python, and
  • an online support forum

All product support, documentation and example software and firmware are available from the website: