กลับไปหน้ารวมไฟล์
turn-on-light-from-thindspeak-with-esp32-58fee0-en.md

In this tutorial, we will show you how to control lights over the Internet using an ESP32 and the ThingSpeak platform. Imagine being able to turn the lights in your home on or off from anywhere in the world with just a couple of clicks, or even automate the process based on real-time data. This is possible thanks to the combination of the ESP32, a powerful microcontroller with WiFi connectivity, and ThingSpeak, a cloud service that allows you to store and process data from sensors and other devices.

Throughout this tutorial, you will learn how to configure your ESP32 to connect to ThingSpeak, read data from a specific channel, and act on that data by turning lights on or off. This project is ideal for those who want to delve into the world of the Internet of Things (IoT) and explore how connected devices can interact with cloud services to create smart solutions.

Whether you're looking for a way to automate your home, create a remote lighting system, or just want to experiment with IoT, this tutorial will guide you step-by-step so you can do it easily and effectively.

An Esp32

undefined

Female pins

undefined

Dupont cables female male

undefined

PCB

undefined

undefined

Download gerber file –> Gerber_esp32

Relay Module

undefined

TECHNICAL SPECIFICATIONS

Operating Voltage: 5V DC

Control Signal: TTL (3.3V or 5V)

Number of Relays (channels): 1 CH

Max capacity: 10A/250VAC, 10A/30VDC

Max current: 10A (NO), 5A (NC)

Action time: 10 ms / 5 ms

To activate output NO: 0 Volts

EXPANDED TECHNICAL DETAILS

Cloud-to-Hardware Control

This project demonstrates the "Subscribe" aspect of IoT, where an ESP32 fetches commands from a cloud service to actuate physical devices.

  • ThingSpeak Integration: Instead of just sending data to the cloud, the ESP32 uses the ThingSpeak MQTT or REST API to read the latest value from a specific "Field."
  • Network Stack: Utilizes the ESP32's dual-core processor to maintain a stable WiFi connection while simultaneously polling the cloud server for updates.

Actuation Stage

  • Relay Logic: When the value in the ThingSpeak field changes (e.g., from 0 to 1), the ESP32 triggers a 5V/10A Relay Module. This allows the low-power microcontroller to safely switch high-voltage mains appliances like desk lamps or room lights.
  • Status Feedback: Once the light is toggled, the ESP32 can send a "Confirmation" byte back to another field, ensuring the user's dashboard accurately reflects the physical state of the room.

ข้อมูล Frontmatter ดั้งเดิม

title: "Turn on light from thindspeak with esp32"
description: "In this tutorial, we will show you how to control lights over the Internet using an ESP32 and the ThingSpeak platform."
author: "carlosvolt"
category: "Internet of Things, BT & Wireless"
tags:
  - "Internet Of Things"
  - "Remote Control"
views: 1214
likes: 0
price: 699
difficulty: "Intermediate"
components:
  - "1x ESP32"
tools: []
apps:
  - "1x rogerbit."
downloadableFiles: []
documentationLinks: []
passwordHash: "5423649cfb5ab05353045bc85d03e892a45f335f55e4c5da9d9f7080d8482fee"
encryptedPayload: "U2FsdGVkX1/alKSZ5A/y99pGpIPxawU4Oq6XmaBK2VTXOZDH5eckDPa6PuVHqfbPIUIaaoY6bqqDdwTVsfdxA1d1gtKs7a0BilXpRStzD6U="
seoDescription: "Learn how to control lights over the Internet using ESP32 and ThingSpeak platform in this step-by-step tutorial."
videoLinks:
  - "https://youtu.be/Q8-XT-qfwhQ"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/turn-on-light-from-thindspeak-with-esp32-58fee0_cover.png"
lang: "en"