Posted on

ESPEverythyng – 885

ESPEveryThyng

885 Board

ESPEveryThyng-885 User Manual (4829 downloads)
ESPEveryThyng 885 Schematic (4509 downloads)

Executive Summary

The 885 is an all-purpose feature-rich data acquisition and control board with onboard power conditioning, data processing, and wifi connectivity.  Measuring 6.00” x 5.00”, it has provisions for eight relay outputs, eight digital inputs, and five analog inputs complete with signal scaling and filtering. The 885 also has generous expansion capability and provisions for 315mHz key-fob receiver.

Available as a complete assembly, a kit, or the board only, the 885 is a powerful platform for those wanting to monitor and control a lot of channels.

ESPEveryThyng 885 Labeled

Technical Discussion

Onboard Processor

The 885 has an ESP8266 chip running IoThyngs’ proprietary firmware, although customers are free to reflash with the firmware of their choice. Communication to the ESP8266 is normally via 2.4 GHz WiFi, although it can also be accessed thru a micro USB connection for firmware updates or serial line monitoring.

The ESPEverything 885 is compatible with the following firmware:

  • Arduino IDE
  • ESPEasy
  • ESP Lua
  • ESP8266 Basic
  • ESP8266 AT command set
  • And More

Two different versions of the ESP8266 are compatible with the board: The ESP8266-07 and ESP8266-12.

Using the -12 provides access to 4096 KB of memory.

Using the -07 provides access to 1024 KB of memory which is sufficient for most applications. The WiFi antenna is suitable for most WiFi networks, however a u.FL connector is available on the -07 which permits the use of an external antenna in case of poor signal coverage.

All normal I/O is handled via the I²C bus, however thru holes are provided granting direct access to the GPIO pins.

Analog Inputs

The board provides access to the internal 10 bit ADC on the ESP8266 and in addition provides an ADS1115, 4 channel 16 bit ADC chip.

A 10-pin header provides access to the five analog inputs. All inputs run thru an LMV324 Quad Op Amp and have provisions for scaling resistors, gain resistors and a simple low-pass filter. Various voltage divider resistors are provided to permit a wide range of signal input levels. Scaling resistors and RC filter resistors and capacitors are chosen for unity gain and a 100 Hz cutoff frequency, although these can be changed at the customer’s request.

The Analog inputs can easily be setup for 0-5V, 0-10V, 0-3.3V and 4-20ma signals.

An LM336Z25 precision voltage regulator provides 2.50 VDC reference to the LMV324.

Channel 1 goes from the signal conditioner section straight into the ESP8266 10 bit on-board ADC, so the scaling must be selected to 1VDC Max. Channels 2 thru 5 are directed to an ADS1115 16-bit A/D converter, which communicates to the ESP8266 via the I²C bus. These channels should be scaled to provide 5VDC Max.

Digital Inputs

Eight PCB 2-wire screw terminals provide access to eight digital inputs. Each input is protected by a LTV354T Opto Isolator, which accepts input signals ranging from 3.3 volts to 220 volts, both AC and DC, and further means it’s impossible to wire an input backwards.

All eight digital inputs are routed to a MCP23017 I²C port expander.

Relay Outputs

Eight PCB 3-wire screw terminals provide access to eight relays. Each relay location can be populated with either a G3MB-202P solid state relay or an SRD-5VDC-SL-C mechanical relay. Alternatively, through the addition of two jumpers, one could omit the on-board relays and instead connect discrete relays to the relay control points. This would allow control of large relays or contactors.

Each relay location has an LED to indicate when the relay is energized.

Temperature/Humidity

There are thru holes to directly solder a DHT11 or DHT22 Temperature and Humidity sensor or attach one remotely with wires. There are also four sets of thru holes to wire in remote DS18B20 1-wire digital temperature sensors. In addition there are four I2C expansion ports.

Power Module

A Power Module PCBA is soldered directly to the 885. This module accepts up to 40 volts, both AC and DC, and outputs 5 VDC and 3.3 VDC up to 2 amps. Since the input is bridge rectified, it’s impossible to wire the input voltage backwards. This also allows the board to be powered by inexpensive AC transformers used to power irrigation valves or low voltage lighting. Minimum input is 9 volts.

315 mHz Receiver Module

A header is provided to install an optional 315 mHz radio receiver module. This allows a remote control radio key-fob to activate up to 4 GPIO. This is useful to implement gate controllers, garage door controllers, timer overrides for irrigation systems, manual operation of pool lights, grounds lighting etc.

Prototyping Area

An on-board prototyping area is provided with a roughly rectangular 10 x 22 array of thru-hole soldering pads. There is also a 2 x 20 pattern at the edge of the array that coincides with the edge of the board so that one could attach a 2-row header or connectors. Pads are provided to access three unused Op-amps to simplify any analog prototype design. The prototyping area is in close proximity to the GPIO access header and pads are provided for +5V, +3.3V, +2.5V Vref and Gnd as well as the analog outputs for the five analog channels.

Other features

  • Test points are provided at each analog signal between the S/C and A/D as well as +5V, 2.5VREF, +3.3V, and GND at the LM336Z25 precision voltage regulator.
  • Four available I²C connection points to connect other I²C devices
  • Access to three unused Op Amp channels (can be put to use along with Prototyping Area circuits)
Posted on

ThingSpeak – Apps

As promised, here’s a bit more information from our pals at ThingSpeak.

One of the visualizations you can add are Gauges.  Below are two gauges, one showing realtime pump pressure, the other realtime pool temperature:


Bear in mind, as of this writing the temperature can only be trusted if the pump is running. That’s because when the pump stops, the water in the pipes stop too, and the temperature starts to change based on ambient air temperature, sunlight, etc. I’ll be looking at ways to keep the last “good” temperature displayed while the pump is off.

Okay, how it’s done:

  1. ThingSpeak Configuration
    1. Select Apps from the menu at the top of the page
    2. Click on Plugins, New
    3. Select Google Gauge from the selection of radio buttons, then hit Create
    4. There are four windows containing customization elements
        1. In the Name window, enter what you want the gauge called
        2. Leave the HTML window alone
        3. I found the default gauges to be too small, so in the CSS window I changed #gauge_div width from 120px to 220px
        4. I changed a lot in the JavaScript window, so I’m just going to copy and paste what I have for the Pressure Gauge:
          <script type=’text/javascript’ src=’https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js’></script>
          <script type=’text/javascript’ src=’https://www.google.com/jsapi’></script>
          <script type=’text/javascript’>// set your channel id here
          var channel_id = 123456;
          // set your channel’s read api key here if necessary
          var api_key = ’96LKJWOM0EVM3IJS’;
          // maximum value for the gauge
          var max_gauge_value = 100;
          // name of the gauge
          var gauge_name = ‘psi’;// global variables
          var chart, charts, data;// load the google gauge visualization
          google.load(‘visualization’, ‘1’, {packages:[‘gauge’]});
          google.setOnLoadCallback(initChart);// display the data
          function displayData(point) {
          data.setValue(0, 0, gauge_name);
          data.setValue(0, 1, point);
          chart.draw(data,options);
          }

          // load the data
          function loadData() {
          // variable for the data point
          var p;

          // get the data from thingspeak
          $.getJSON(‘https://api.thingspeak.com/channels/’ + channel_id + ‘/feed/last.json?api_key=’ + api_key, function(data) {

          // get the data point
          p = data.field2;

          // if there is a data point display it
          if (p) {
          //     p = Math.round((p / max_gauge_value) * 100);
          displayData(p);
          }

          });
          }

          // initialize the chart
          function initChart() {

          data = new google.visualization.DataTable();
          data.addColumn(‘string’, ‘Label’);
          data.addColumn(‘number’, ‘Value’);
          data.addRows(2);

          chart = new google.visualization.Gauge(document.getElementById(‘gauge_div’));
          options = {
          title: ‘Pump Pressure’,
          width: 220,
          height: 220,
          min: 0,
          max: 50,
          redFrom: 40,
          redTo: 50,
          yellowFrom:30,
          yellowTo: 40,
          majorTicks: [“0″,”10″,”20″,”30″,”40″,”50”],
          minorTicks: 5
          };

          loadData();

          // load new data every 15 seconds
          setInterval(‘loadData()’, 15000);
          }

          </script>

    5. Click the check box for the channel you want the gauge to display and hit Save
    6. Go to your channel and hit Refresh.  You may get a blank window at first, but it’s just waiting for some data.  Once it gets some (should be within 15 seconds), your gauge will display!

I’ve seen some really nice dashboards that use Google Gauges, and I’m anxious to put something together that combines all the data I want to see in an easy to understand dashboard.  I’ll post that up once I’ve got it figured out!

Posted on

ThingSpeak

I’m experimenting with ThingSpeak, a service that allows you to upload, analyze, manipulate, and display data in charts.  You can then copy the chart code and paste it into your own website.

I’ve got my Pool Controller ESP8266 logging Pool Water Temperature.  Below is the chart:

Here’s how to do it:

  1. ThingSpeak Configuration
    1. Sign up with ThingSpeak
    2. Create a channel
    3. Create a chart for each ESP8266 output you want to record
    4. Write down the Write API key
  2. ESPEasy – Configuration
    1. Set Protocol to ThingSpeak
    2. Enter 184.106.153.149 as the Controller IP
    3. Enter the Write API key from above into the Controller Password field
  3. ESPEasy – Devices
    1. Set the IDX/Variable for each task to the corresponding chart number in ThingSpeak.  For instance, I have 1 entered for the Uptime task.  This is how the data is routed to the correct chart.
    2. If you have two readings for a given sensor, Temp will go the chart that matches the DHT IDX/Variable and Humidity will go to the IDX+1 chart. For instance, I have DHT11 set as IDX 5. In ThingSpeak, Temperature is displayed on chart 5 and Humidity on chart 6.
  4. ESPEasy – Tools|Advanced
    1. Set Message Delay (ms) to 15000

ThingSpeak offers many other tools and apps, all of which I’ll be exploring in the coming weeks.  In the meantime, thanks for letting me share this cool service with you.

Posted on

Different ESP8266 Development Boards

First Board

At the beginning of January I ordered an ESP8266-12 from BangGood, and pictured below is the board I received.

DOIT Devkit

It’s branded as a DOIT.AM Devkit measuring 1.00″ x 1.90″.  On my computer it connects as a USB device on COM4 at 9600 baud, N-8-1.  Many tutorials have you connect via a terminal server program (I use putty) and issue an AT command, which should return OK.  This board responds to the AT command with an error.  It does connect however, so it’s already got some firmware loaded.  If you type print("Hello World") it returns Hello World.

DOIT.AM Terminal Session
DOIT.AM Terminal Session

It appears as a wireless unsecured network called DoitWiFi and wants password 12345678.  It has IP address 192.168.1.1.  It has a web server in place, and navigating to that IP address brings up a screen called “NodeMCU Doit Version GPIO DEMO” with two toggle switches, one labeled D0 and the other labeled D1.  Turning D0 on illuminates a blue LED on the board, and turning it off extinguishes the LED.  D1 doesn’t seem to do anything.

Next Boards

About a week later I placed an order with a Chinese company for two similar Dev boards for comparison; one uses the CH340 chip and the other a CP2102.  When pressed for the difference between these chips the vendor stated “the CP2102 is more secure”.  My research leads me to believe they’re similar.  The CH340 is widespread, found on many Arduino clones.

These boards all have network names beginning with AI-THINKER_ and then terminating in a six-digit hexadecimal identifier.

CP102

Below is the CP2102 variant.

CP2102
ESP8266-12 Dev Board w/ CP2102

It also measures 1.00″ x 1.90″, but connects as a Silicon Labs CP210x USB to UART Bridge on COM5 at 115200 baud, N-8-1.  When connected, issue AT, then Return followed by ctrl-j returns OK.  Unlike the DOIT board, it returns an error if you try to issue the print command.

CP2102 Screenshot

This one appears as a wireless unsecured network called AI-THINKER_0BEE98 with IP address 192.168.4.2.  There is no web server in place, so navigating to that IP address brings up nothing.

CH340

Below is the CH340 variant.

CH340
ESP8266-12 Dev Board w/ CH340

It is a larger board measuring 1.20″ x 2.30″.  Like the DOIT board, it connects on COM4, but wants 115200 baud, 8-1-N.  Like the CP2102 version, it responds to the AT command as expected and does not understand the print command.

CH340 Terminal Session
CH340 Terminal Session

This one appears as a wireless unsecured network called AI-THINKER_D5CBFF with IP address 192.168.4.2.  As above, there is no web server in place, so navigating to that IP address brings up nothing.

Of the three, I prefer the CP2102 version.  I like the small form factor and I can purchase these in bulk quantities.  Next up – flash the boards and put them to use!