专栏名称: IoT物联网技术
聊聊 云计算,IoT物联网。
目录
相关文章推荐
北京厚朴中医  ·  筑基十一期招生开启——学习中医、厚朴筑基 ·  3 天前  
北京厚朴中医  ·  厚朴电子日历 | 早 ·  4 天前  
北京厚朴中医  ·  樱花季,在厚朴汤河原学堂来一次身与心的对话 ·  4 天前  
北京厚朴中医  ·  今晚19:00直播 | 肩痛非药物攻略 ·  4 天前  
51好读  ›  专栏  ›  IoT物联网技术

告别手抖!IoT黑科技,Arduino 自制烟花爆竹点火神器!手机遥控,远程点火!

IoT物联网技术  · 公众号  ·  · 2025-01-26 08:12

正文

获取项目源码, 文末联系小编

春节燃放烟花爆竹是我国一项历史悠久的传统,寓意着幸福美好!但每年都有很多人因为燃放烟花爆竹而受伤,轻则受一些皮外伤之苦,重则炸断手指,炸伤眼睛,炸成耳聋等,造成终身性的残疾,更甚者可能造成死亡。

利用手机App和IoT物联网技术,基于Arduino 开发板自制烟花爆竹点火神器 点火器,可安全燃放烟花爆竹,实现手机遥 控,远程点火


烟花爆竹点火神器架构

智能烟花爆竹 点火神器 主控使用一款 专为IoT物联网 设计的 基于ESP-WROOM-32E双核芯片的主控板,它支持WIFI和蓝牙双模通信并具有体积小巧、超低功耗、板载充电电路、接口易用等特性。支持 Arduino 编程, 可灵活的用于家庭物联网改装、工业物联网改装、可穿戴设备等等。

烟花爆竹点火神器组件

脉冲高压包逆变器 是一种将 直流电转换为高频高压交流电 的电力电子设备。它通常用于需要高电压输出的应用场景,如打火机、电子仪器、负离子发生器等‌。

脉冲高压包逆变器模块分 输入端和输出端 ,红绿线是输入端,红正绿负,输出端是 两根一样颜色的高压线 ,输入端输入DC3.7V-6V电压后可在输出端得到几万伏左右的直流高压。


输入电源可以使用单节3.7V锂电池或两节并联,如18650电池。 高压模块应避免高压空载时通电使用,通电前必须调整好高压线端合适距离,高压线拉弧距离与使用的电池电压及容量成正比。 测试电弧距离时要由短向长实验,通电时严禁超出最长拉弧距离,由于高压能量无法释放,极易损坏模块。 模块的功率大,内部不宜散热,故不可长时间工作,一般10秒内是没问题的。


电磁继电器‌ 是一种利用电磁铁控制工作电路通断的开关。它通过低电压、弱电流的控制电路来间接控制高电压、强电流的工作电路,从而实现自动控制的功能。‌

通过电磁继电器控制高压电弧点火器电路通断。继电器最高可承受10A大电流,使用寿命可达100万次。板载一个红色的LED工作状态指示灯,当常开触点闭合时,LED点亮;常开触点断开时,LED熄灭。接线端设有常开触点接口 (NO) 和常闭触点接口 (NC),方便扩展使用。模块采用Gravity-3Pin接口,即插即用,无需焊接,非常方便。


Arduino开发板主控电源 采用一个2000mAh的棒状USB充电宝,可以反复充电。


烟花爆竹点火神器完整结构如下


烟花爆竹点火神器核心代码


Arduino主控程序 启动后, ESP32-E会自开热点Wi-Fi,供手机App客户端连接,进行远程点火控制。
#define LED_BUILTIN 2  
// Set these to your desired credentials.const char *ssid = "iot";const char *password = "123456";
WiFiServer server(80);
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200); Serial.println(); Serial.println("Configuring access point...");
// You can remove the password parameter if you want the AP to be open. WiFi.softAP(ssid, password);
IPAddress myIP = WiFi.softAPIP(); Serial.print("AP IP address: "); Serial.println(myIP); server.begin();
Serial.println("Server started");
}


void loop() {
WiFiClient client = server.available(); // listen for incoming clients
if (client) { // if you get a client,
Serial.println("New Client."); // print a message out the serial port
String currentLine = ""; // make a String to hold incoming data from the client
while (client.connected()) { // loop while the client's connected
if (client.available()) { // if there's bytes to read from the client,
char c = client.read(); // read a byte, then
Serial.write(c); // print it out the serial monitor
if (c == '\n') { // if the byte is a newline character
// if the current line is blank, you got two newline characters in a row. // that's the end of the client HTTP request, so send a response:
if (currentLine.length() == 0) {
// HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK) // and a content-type so the client knows what's coming, then a blank line:
client.println("HTTP/1.1 200 OK");
client.println("Content-type:text/html");
client.println();
// the content of the HTTP response follows the header:
            client.print("Click /H">here to turn ON the LED.");
            client.print("Click /L">here to turn OFF the LED.");
// The HTTP response ends with another blank line:
client.println();
// break out of the while loop:
break;
} else { // if you got a newline, then clear currentLine:
currentLine = "";
}
} else if (c != '\r') { // if you got anything else but a carriage return character,
currentLine += c; // add it to the end of the currentLine
}
// Check to see if the client request was "GET /H" or "GET /L":
if (currentLine.endsWith("GET /H")) {
digitalWrite(LED_BUILTIN, HIGH); // GET /H turns the LED on delay(1000); digitalWrite(LED_BUILTIN, LOW);
}
}
}
// close the connection: client.stop();
Serial.println("Client Disconnected.");
}
}

手机App程序 使用到WIFI扩展,用于自动连接FireBeetle Board ESP32-E热点AP,使用HTTP客户端,发送指令。

如有需求,请加小编微信:






请到「今天看啥」查看全文