Tag Archives: ESP8266


Tutorial 9: ESP8266 and WS2812B RGB LED (or NeoPixel) ring

This tutorial describes how to interface a WS2812B RGB LED ring or Adafruit’s NeoPixel ring to ESP8266. The WS2812B is a smart RGB LED with a control circuit integrated in a 5050 SMD package. The RGB data transfer occurs through a single data input line using single NZR communication mode.

EasyESP-1 driving NeoPixel ring

EasyESP-1 driving NeoPixel ring

Connection between the NeoPixel ring and ESP8266 is through a single data wire. I am using EasyESP-1 here for illustration. The Data In (DI) line of the NeoPixel ring connects to D1 pin of EasyESP-1. VCC and GND pins go to 3.3V and GND terminals of EasyESP-1. I used a 40 RGB LED NeoPixel-compatible LED ring from Elecrow for this experiment.

setup

Wiring RGB LED ring to EasyESP-1

wiring

Power supply and data input pins on the back of Elecrow’s RGB LED ring

For programming the ESP8266 to drive the RGB ring, you will need to install Adafruit’s NeoPixel Library. The library comes with several examples which can be tested with the current setup with a very little modification in the code. Once the library is installed, open RGBWstrandtest example and modify the following two lines as follows:

#define PIN D1
#define NUM_LEDS 40

That’s all you need to change to run this example with the current setup of the EasyESP-1 and RGB LED ring.

Note that you must have your Arduino IDE setup to program ESP8266 according to the instructions posted in Tutorial 1: Setting up the Arduino IDE for EasyESP-1 prior to run this example.

Then upload the modified example code and see the output.

v

RGBWstrandtest output

Buy EasyESP-1 board

More tutorials

EASYESP-1: A RAPID PROTOTYPING AND DEVELOPMENT BOARD FOR ESP8266
TUTORIAL 1: SETTING UP THE ARDUINO IDE FOR EASYESP-1
TUTORIAL 2: EASYESP-1 “HELLO WORLD” EXAMPLE
TUTORIAL 3: CONNECTING AN OLED DISPLAY TO ESP8266
TUTORIAL 4: WORKING WITH ESP8266 WIFI SCAN CLASS
TUTORIAL 5: SETTING UP AN ESP8266 WEB SERVER
TUTORIAL 6: ESP8266 AND BME280 MAKE A LOCAL/REMOTE WEATHER STATION
TUTORIAL 7: ESP8266 AND ILI9341 TFT LCD
TUTORIAL 8: ESP8266 INTERNET CLOCK

How to post data to Google sheets using ESP8266

In the past couple years, the ESP8266 platform has flourished dramatically and emerged as one of the most popular hardware tools among electronics hobbyists and IoT enthusiasts. Packed with a 32-bit RISC CPU running at 80 MHz, a fully integrated WiFi radio with TCP/IP protocol stack, serial peripherals (I2C, SPI, and UART), an ADC channel, and general purpose I/O pins, the ESP8266 is the most integrated and affordable WiFi solution available in the current IoT market space. An ESP8266 hardware, like NodeMCU and ESP-01, can directly interface with sensors using its peripherals and upload the sensor measurements to a local or a remote web server via internet. Right now, there are already quite a bit of cloud IoT platforms (ThingSpeak, thinger.io, TESPA.io, Xively, … the list is getting bigger everyday) that provides APIs and tools to allow the ESP8266 users to directly upload their sensor readings online for real-time visualization and global access. If you are a regular user of Google Drive, like me, you would find a Google sheet more approachable than all those IoT cloud platforms. In this tutorial, I will describe a method of connecting the ESP8266 device directly to a Google sheet for storing the sensor data without using any third party plugin. For illustration, I am using a NodeMCU board that reads the analog output from a soil moisture sensor inserted into one my flower pots and directly connects to a spreadsheet on my Google Drive for storing the data.

Soil Moisture to Google Sheets

ESP8266 data logging to Google spreadsheets

Related Posts

Check out How to send email and text messages using ESP8266.
Check out our weather web server project for local web hosting of the sensor readings using ESP8266.
Check out our ThingSpeak temperature and humidity logger project for remote server data logging example using ESP8266

Read more

ESP8266 powered DIY Geiger Counter

DIY Geiger counter projects are very popular among hobbyists. They all use a Geiger-Muller (GM) tube, which is filled with an inert gas such as helium, neon, or argon at low pressure, to which a high voltage is applied. The tube becomes electrically conductive when it is impacted by a high-energy particle or photon. Earlier, we have seen a very simple Geiger counter circuit using 555 timer, where the timer IC is configured as an astable multivibrator to drive a step-up transformer through a MOSFET in order to generate the high voltage required for the GM tube. This ESP8266-powered DIY Geiger counter by Hackaday user biemster, however, avoids the use of any step up transformer for the high-voltage generation; it rather achieves the same using a simple MOSFET switching circuit comprising of an inductor, a diode and a capacitor. The switching circuit is driven by a PWM waveform from an ESP8266 I/O pin. The use of ESP8266 also provides network connectivity to access the radiation and dose information via web interface, MQTT, or ICMP packets.

ESP8266 based Geiger counter

ESP8266 based Geiger counter

The high voltage output from the MOSFET switching circuit depends on the duty cycle of the PWM signal, which can be adjusted in the software. The complete code for this project can be downloaded from Github. LTspice simulation results showed that with a PWM frequency of 10 kHz, the output voltage has minimum ripple on it. The PWM generation, ESP8266 pin assignments, and calibration of the duty cycle to derive an optimal high-voltage output for the tube are all provided by the author in one MicroPython library.

Wifi enabled 8×64 pixel LED matrix display

This project is a modification of my previous Bluetooth-enabled LED matrix display project, which used 8×64 monochromatic LED matrix (total 512 LEDs) for displaying scrolling text message. The original project used Bluetooth for display data transfer from a smartphone, but this one now uses Wifi. The display message is sent through web browser to a ESP8266 module that is configured as a web-server. No Arduino or any other microcontroller is used. ESP8266 alone works as a WiFi server and drives the MAX7219-based LED matrices.

P_20160823_180645

Wifi-enabled scrolling led matrix display

Read more

Starling: A wifi enabled LED matrix display

Explore Embedded, a Banglore, India based startup has introduced a modular and wifi enabled LED matrix display named Starling, that can not only showcase text messages but also notifications from social networking websites, live scores from sports events websites, weather data from online weather services, and more. Starling comes in an easily cascadable modular design with one master module that features the ESP8266 device for Wifi connection and other slave modules to expand the display size horizontally. Each module is powered by Atmega8 microcontroller that stores fonts and custom characters LED patterns in a look up table, drives its own 8×8 LED matrix, and also communicates with other modules along the chain. In fact, the master module is smart enough to recognize the number of slave modules connected along the row and to receive the display data from anywhere using mobile and web apps. For those of you who would like to grab one of these displays in hands at discounted price, you may want to support their crowd-funding campaign. This project is only seeking $5000 on Crowd Supply. Also check out my portable bluetooth-enabled LED matrix display project that I build a while ago.

Starling: A Wifi enabled LED matrix display

Starling: A Wifi enabled LED matrix display

« Older Entries