ในโปรเจกต์นี้ ESP8266 จะทำหน้าที่เป็นตัวกลางสื่อสารระหว่าง Arduino สองตัวที่ใช้อยู่ฝั่ง Remote และฝั่ง Bot ตัวมันเอง
ESP8266 ฝั่งบอทจะปล่อยสัญญาณ Wi-Fi ออกมา โดยเปิดใช้งานโปรโตคอล TCP ไว้ ส่วน ESP8266 ฝั่งรีโมทจะเชื่อมต่อเข้ากับสัญญาณ Wi-Fi นั้นแล้วส่งข้อมูล Serial ไปหาเพื่อนฝั่งตรงข้ามตามที่ผู้ใช้สั่ง
Arduino shield ที่เราออกแบบเองบนฝั่งรีโมทจะรับอินพุต แล้วส่งข้อมูลที่ตรงกันไปให้ ESP8266 เพื่อส่งต่อไปยังบอท จากนั้น ESP8266 ฝั่งบอทก็จะส่งข้อมูลต่อให้ Arduino ฝั่งบอทเพื่อตีความข้อมูลและทำตามคำสั่งนั้นๆ
มาดูวิดีโอการทำงานของโปรเจกต์กัน! :
รายละเอียดเทคนิคเพิ่มเติม
ขับเคลื่อนไร้สายแบบเนียนๆ
หุ่นยนต์เคลื่อนที่ตัวนี้ใช้ ESP8266 หรือ ESP32 เพื่อให้เราควบคุมมันได้ระยะไกลผ่านเครือข่าย WiFi ในพื้นที่
- สแต็กคำสั่งไร้สาย: ตัวบอทโฮสต์เว็บเพจที่ใช้งานง่ายบนมือถือ พร้อมปุ่มเดินหน้า, ซ้าย, ขวา, ถอยหลัง Arduino จะประมวลผลคำขอ HTTP GET ที่เข้ามาเป็นคำสั่งการเคลื่อนที่
- การควบคุมมอเตอร์: ขับเคลื่อนด้วย L298P motor shield ทำให้เราควบคุมความเร็วของล้อทั้งสองข้างแยกจากกันได้ผ่าน PWM
ฟีเจอร์ความน่าเชื่อถือ
- สัญญาณ Watchdog: เฟิร์มแวร์ของเรามีการตรวจสอบ "สัญญาณหัวใจ" ถ้าเชื่อมต่อ WiFi แล้วเงียบเกิน 500ms ตัวบอทจะหยุดมอเตอร์ทั้งหมดอัตโนมัติ เพื่อป้องกันกรณี "บอทหนีหาย" เวลาสัญญาณขาด
ข้อมูล Frontmatter ดั้งเดิม
title: "Wi-Fi Controlled Bot"
description: "This bot implements the addition of ESP8266 for establishing a Wi-Fi communication between the Arduino on the remote side and the bot side."
author: "devansh_tangri"
category: ""
tags:
- "toys"
- "cars"
- "remote control"
- "robots"
views: 2376
likes: 2
price: 699
difficulty: "Intermediate"
components:
- "1x Jumper wires (generic)"
- "4x Tactile Switch, SPST-NO"
- "1x SparkFun Breadboard Power Supply 5V/3.3V"
- "1x Dual H-Bridge motor drivers L298"
- "2x DC motor (generic)"
- "1x Breadboard (generic)"
- "2x Arduino UNO"
- "1x Soldering iron (generic)"
- "2x ESP8266 ESP-01"
tools: []
apps:
- "1x Arduino IDE"
downloadableFiles:
- "https://projects.arduinocontent.cc/ea1c462f-df4f-4e7f-8295-ce37aeaedb0b.ino"
- "https://projects.arduinocontent.cc/2913a9cf-d576-44e3-88bc-7d50494e6187.ino"
- "https://projects.arduinocontent.cc/1ce55e53-2cfd-4e2b-a600-1e7d27877585.ino"
- "https://projects.arduinocontent.cc/1ce55e53-2cfd-4e2b-a600-1e7d27877585.ino"
- "https://projects.arduinocontent.cc/e8aa4874-8bb1-45a6-aed7-15cdff082610.ino"
- "https://projects.arduinocontent.cc/ea1c462f-df4f-4e7f-8295-ce37aeaedb0b.ino"
- "https://projects.arduinocontent.cc/2913a9cf-d576-44e3-88bc-7d50494e6187.ino"
documentationLinks: []
passwordHash: "0468b3ff36334cb1ce578cc98259ceca1b9ec1add84f7936d6cbe914e5a7fec7"
encryptedPayload: "U2FsdGVkX18FPrZDbTsBeoPw1TOl27LeRdLg0eYtykwAVijRsp9oj18RI+N8if/GfMkj+VLZDNZtsDWE6j/JVrsHVQMQTO9+QV8aC0bVjGw="
seoDescription: "Build a Wi-Fi Controlled Bot using Arduino and ESP8266 for wireless remote communication."
videoLinks:
- "https://www.youtube.com/embed/XZsYwclE3fI"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/wi-fi-controlled-bot-e1ba19_cover.jpg"
lang: "th"