Using ESP32 to upload data into ThingSpeak

ESP32-Wrover does have SPI or SDMMC, that will require additional purchase of modules for the microSD or other SD physical card module.

The need to create proper data acquisition (DAQ) using ESP32-Wrover will be easier by leveraging free service offered by ThingSpeak from Mathlab.

From the previous project https://chow.karmeng.my/2025/03/28/programming-esp32-wrover-with-dht22-am2302-humidity-and-temperature-sensor/ , I am intent to make use of the light sensor. L1B01 light module to collect data of ambience light.

L1B01 light sensor
Using all the pins, from Analog(A0), Digital (D0), Ground and Volt
Making sure that that Analog pin from the light module are connected to the ESP32-Wrover analog Pin 34 and for digital output Pin 4

Hence, the data will be collected are :

  • temperature
  • humidity
  • analog read of L1B01 light sensor
  • digital read of L1B01 light sensor

The generated data from the DHT and L1B01 sensor that will be published into ThingSpeak are:

  • humidity
  • temperature
  • heat index
  • lightRaw
  • lightDigital
  • lightVoltage
  • lightLux

Coincidentally, ThingSpeak limits 8 data channels from a single channel allocated to a user ThingSpeak free account.

Channel setting for user account in ThingSpeak

The interesting aspect of ThingSpeak, is it allows uploaded data to be downloaded as CSV.

The export option will allow users to download data in CSV

The downloaded csv incorporates timestamp, hence there is no need to include timestamp in your controller programming if you are uploading the data dedicated into ThingSpeak. The only problem will be creating a script to automate renaming of fields from the downloaded csv. Or removal of other metadata for example latitude, longitude etc.

CSV downloaded from the ThingSpeak channel

With Deepseek as my copilot, in less than 1 hour I am able to start uploading data in my home environment into ThingSpeak.

Data are acquired and uploaded into ThingSpeak

Using DeepSeek as copilot, I have programmed the ESP32-Wrover to perform the following:

  • Collect data from DHT and lightSensor
  • Tabulate data into CSV on COM console
  • Send the tabulated data into ThingSpeak
  • WiFi switching function that recognize multiple WiFi AP

Many thanks to https://www.linkedin.com/in/ts-terrence-yen-7666252b/ for introducing me to ThingSpeak. This allows ESP32 data acquisition to be simpler and cost effective. At least this is simple for a person that are already exposed to web APIs rather than learning SPI or SDMMC.

ESP32-wrover deployed without connecting to any PC while sending DAQ to ThingSpeak

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.