Skip to the content
2 layers97 × 77.5 mmESPlant, the printed circuit board in 3D

Environmental Sensor Plant - solar WiFi gardening/meteorological sensor using ESP8266

Size
97 × 77.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
77
Nets
45
Pads
260
Tracks, vias
993, 149
Pours
2
Routed
Yes
KiCad
KiCad 4
Created
2 Nov 2015
Updated
24 Feb 2020

Overview

ESPlant is an open-source printed circuit board by CCHS-Melbourne, from the CCHS-Melbourne/ESPlant repository on GitHub. It is a 2-layer board of 97 × 77.5 mm with 77 parts on 45 nets, routed with 993 tracks and 149 vias.

It is built around the STM32F042F4P6, ESP-12E and BME280, with the MCP6002-I/P, ADXL345-EP and CN3063 among its other parts. Its parts include 22 resistors, 13 connectors, 12 capacitors, 6 ICs and 5 diodes. It belongs with the radio and wireless and sensors and measurement boards and the ESP8266 and STM32 boards of this library.

Main components

9

README

README.md

ESPlant - Environment Sensor Plant

Welcome to the linux.conf.au Open Hardware Project. You can see information about this and other MiniConfs at http://www.openhardwareconf.org/wiki/Main_Page

The ESPlant kit is designed to provide an open source platform to transmit environmental data to a central source using the power of wifi.

Assembled PCB:

ESPlant main board

Prototype board in action (before significant changes):

Prototype

Check out a video of pick-n-placing components of the boards you'll be getting at LCA 2016. https://www.youtube.com/watch?v=282qku2C4xo

FEATURES

  • ESP8266 WiFi enabled microcontroller. You can program it via the Arduino IDE, or alternatively Espressif SDK or esp-open-rtos.
  • Secondary microcontroller (STM32F042) acts as USB/Serial interface and i2c Analog to Digital Converter
  • Battery holder for 16340 sized 3.7V lithium cell
  • Lithium battery charger interface (solar input friendly)
  • Board automatically switches power source between solar input, battery, and USB power as applicable.

Onboard Sensors (on I2C bus)

  • BME280 Temperature/Humidity/Barometric Pressure sensor
  • ADXL345 accelerometer

External Sensors (all optional, connected to screw terminals)

  • 2x soil moisture sensors (via ADC pins)
  • DS18B20 connected to GPIO 12.
  • PIR (infrared motion) sensor connected to GPIO 15.
  • WS2812B LED strip connected to GPIO 13 (mislabelled as 15 on V1.3 PCB!)

The 3.3V "VSens" power rail is switchable on/off by the microcontroller. It defaults to unpowered (off). The GPIO to use is 14, and it is active low (ie driving the output low turns VSens on, driving it high turns it off).

Assembly Steps

Assembly guide on the wiki.

Using with Arduino

To add ESP8266 support to the Arduino IDE (1.6.6 or newer) we use the external ESP8266 Arduino project. We need the staging version not the stable version of the ESP8266 support package.

Follow these steps to install:

  • Install Arduino 1.6.6 or newer (1.6.7 is fine) from the Arduino website.
  • Start Arduino IDE and open Preferences window.
  • Enter http://arduino.esp8266.com/staging/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
  • From the Tools menu choose Board -> Board Manager
  • A window will open. Search for ESP8266.
  • Choose a version from the drop-down in the bottom right. There will probably only be one shown there.
  • Click Install

Connecting ESPLant to your computer

  • No drivers required on Linux, OS X, or Windows 10.
  • No manual reset or button pressing dance required to program.
  • In ESP8266 Arduino IDE, under Tools menu, set Board to "NodeMCU V1.0" (fully compatible).
  • Can set upload speed to 230400. 460800 works in most cases (you might get occasional failures at 460800)

Getting ESPlant

You need to clone the ESPlant repo from github, using the --recursive option to pick up submodules. If you download a zip file then the submodule parts will be missing, so we recommend using git to get it.

The command is:

text
git clone --recursive https://github.com/CCHS-Melbourne/ESPlant

Libraries you will need

Arduino uses libraries to work with additional hardware or software functionality in an easy way. Normally you can download and install libraries directly inside the Arduino IDE by choosing Sketch menu -> Include Library -> Manage Libraries.

One library that you should install this way is the OneWire library. Search for "OneWire" and then click the Install button to install it.

For the ESPlant the other required libraries are set up as "git submodules" inside the "Libraries" directory. If you did a "recursive" clone then you will have these, otherwise you can add them to a "normal" clone by running this command:

text
git submodule update --init

Inside the Libraries directory there is a script install_libraries.sh that you can run on Linux or OS X to symlink all of the libraries into your Arduino libraries directory so you can use them.

text
cd Libraries
./install_libraries.sh

On Windows you'll need to copy all the subdirectories of the libraries directory (copy them into the My Documents/Arduino/libraries directory).

The one Library here that is part of this repo (not a submodule) is the "ESP_Kwai" library that acts as a bridge to the peripheral hardware.

Don't forget OneWire as well (see above).

Upload your first program ("sketch")

After restarting Arduino IDE to pick up the new libraries, you're ready to upload your first program (Arduino calls them "sketches"):

  • Choose File->Open in Arduino and open the Firmware/ESPlant_serial_sensor from this repository. This is a simple sketch that outputs all the analog values read by the board.
  • Press the "Upload" button to send it to your board. Watch for messages indicating the upload was successful.
  • Open the serial monitor (under Tools) and set the baud rate to 115200 in order to watch the output from the sketch.

Other Sketches to Try

The repo includes the following sketches:

  • ESPlant_prodtest is the hardware production test. It tests all the sensors to confirm the hardware is good. There are instructions in a large comment at the top of the sketch. You can run this if you think you're having hardware problems, or to look at example code for any individual point.

  • ESPlant_MQTT_sensor uses MQTT to push data to a server. It includes easy provisioning mechanisms for connecting to the WiFi. It has other instructions in its README file for WiFi configuration.

Where to Now?

Check out (and contribute to) the wiki. There is a pinout summary, sensor summary, power information, etc.

Onboard STM32

There is an onboard STM32 microcontroller that acts as USB/Serial converter and an i2c connected ADC (Analog/Digital Converter) device.

For the i2c functionality, the ESP_Kwai library (under Libraries/ESP_Kwai) acts as a bridge (get it) to the i2c ADC peripherals on the ESPlant. It can automatically read all the values connected to the ADC and return them.

If you want more information on how the STM32 works internally, check out the README in the STM_Firmware directory.

CREDITS

This project was designed by the 2016 linux.conf.au Open Hardware Team!

Made at hackmelbourne.org!

SPECIAL THANKS

To the HackMelbourne (CCHS, http://hackmelbourne.org) community of Melbourne, Australia.

To all other open-source developers whose countless hours supported every other aspect of this design.

DISTRIBUTION

The specific terms of distribution of this project are governed by the license referenced below. Please contact the copyright owner if you wish to modify the board for distribution. Please utilize this design for personal or research projects. Please acknowledge all contributors.

LICENSE

Licensed under the TAPR Open Hardware License (www.tapr.org/OHL). The "license" sub-folder also contains a copy of this license in plain text format.

Copyright John Spencer, Angus Gratton, Andy Gelme, Jon Oxer 2015

Parts

77
QtyValueFootprintReferences
610KFT:0603R104, R105, R109, R111, R113, R114
51KFT:0603R101, R106, R112, R201, R202
4FDN340PFT:SOT23_FETQ101, Q201, Q202, Q203
4TEST_1PConnect:1pinMH101, MH102, MH103, MH104
3100K 1%FT:0603R102, R103, R108
3100nFFT:0603_CAPC101, C102, C107
310uF 16VFT:1210_CAPC103, C201, C204
3SS14FT:DIODE_SMAD101, D102, D201
2100KFT:0603R203, R206
2100uF 16V X5RFT:1210_CAPC106, C203
21uFFT:0603_CAPC301, C302
24.7KFT:0603R301, R302
27.15K 1%FT:0603R204, R205
2RESETFT:SW_PUSHBUTTON_PTHSW101, SW103
2VAL**Connect:1pin1pin, 1pin
1100nFFT:0603C104
1100nF 16VFT:0603_CAPC202
110K NTCFT:0603TH201
1121K 1%FT:0603R107
11A PTCFT:1210F101
14.7K DNPFT:0603R110
1ADXL345Plant:ADXL345U302
1BME280Plant:BME280U301
1BatteryPlant:CR123_HolderBT101
1CN3063Plant:CN3063_SOIC8_EPU201
1CONN_01X05FT:1X05P110
1CONN_ANALOGFT:1X06P102
1CONN_DIGITALFT:1X08P101
1CONN_I2CFT:1X02P104
1CONN_PWRFT:1X03P109
1CONN_SERIALFT:1X02P103
1ESP-12EESP:ESP-12EU103
1LED_GREENFT:LED-0805LED201
1LED_REDFT:LED-0805LED202
1LOGOPlant:lca2016_logoG***
1MCP6002FT:SO08_4mmU202
1NEOPIXELFT:SCREWTERMINAL-3.5MM-3P113
1PIRFT:SCREWTERMINAL-3.5MM-3P114
1PRGMFT:SW_PUSHBUTTON_PTHSW102
1SOILFT:SCREWTERMINAL-3.5MM-3P1
1SOLARFT:SCREWTERMINAL-3.5MM-2P105
1SPX3819M5-3.3FT:SOT23-5REG101
1SS12D00Plant:SS12D00SW104
1STM32F042FPlant:TSSOP20_4mmU101
1TEMPFT:SCREWTERMINAL-3.5MM-3P112
1USB_5PIN_SHELLFT:USB-MICRO-5pin_PTHMOUNTP106
1UVFT:SCREWTERMINAL-3.5MM-3P111

Similar boards

  • 2 layers33 × 33 mmDFR0264, the printed circuit board in 3D

    DFR0264

    fcl2002/Open-Ruche-Monitoring

    An intelligent beehive monitoring solution combining embedded AI, LoRaWAN communication, and solar power to help beekeepers protect their colonies and optimize hive management.

    15 parts1MIT
  • 2 layers99.3 × 53.9 mmKraky lite2, the printed circuit board in 3D

    Kraky lite2

    thesh4dows/kraky-lite2

    the second version of kraky-lite

    85 parts
  • 4 layers234 × 84 mmMain panel, the printed circuit board in 3D

    Main panel

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    234 parts3kApache-2.0
  • 2 layers95.5 × 68.3 mmWeight sensor pcb, the printed circuit board in 3D

    Weight sensor pcb

    Capstone-Group-C1/weight-sensor-pcb

    Converts Load Cell(s) analog signal into CAN signal.

    90 parts
  • 2 layers40 × 25.5 mmSF1X4GPS, the printed circuit board in 3D

    SF1X4GPS

    dwelch67/stm32_samples

    14 parts110
  • 4 layers61.2 × 38.9 mmLoRA board, the printed circuit board in 3D

    LoRA board

    SCFormulaElectric/USC-Electrical-Systems

    60 parts9

Questions

How big is the ESPlant PCB?

It measures 97 × 77.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the ESPlant use?

77 parts, built around the STM32F042F4P6, ESP-12E, BME280 and MCP6002-I/P. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the ESPlant KiCad files?

From the CCHS-Melbourne/ESPlant repository on GitHub, at the commit this page was made from: the board is Circuit/ESPlant.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the ESPlant design in my own project?

Its repository states no licence, so its author keeps all rights: ask CCHS-Melbourne before reusing the design.