dWXREerVh

Low-cost remote pet feeding prototype

 
Overview
This system is a low-cost prototype for remote pet feeding, designed to enable remote pet feeding control through various communication methods. The core technologies of the system include:


ESP32-S3 Gateway: As the central gateway of the system, it handles various communication tasks. It communicates with the Bluetooth service module via BLE (Bluetooth Low Energy) through a serial port, transmitting data to the STM32 module.


STM32 Module: This module uses a custom message protocol to parse the serial port data and control the rotation of the servo motor, thereby achieving precise food dispensing to the pet. The STM32 module also supports one-click feeding, simplifying the operation process.


MQTT Protocol: The remote client transmits feeding commands to the gateway via the MQTT protocol, and the gateway then transmits these commands to the STM32 module, enabling remote pet feeding control.


SU-03T Offline Voice Recognition Module: This voice recognition module communicates with the gateway via a serial port, processes voice commands using offline voice recognition technology, and transmits the data to the STM32 module via Bluetooth, enabling voice-controlled feeding.


I. Bluetooth Technology:
Through this project, I learned the following:
1. Bluetooth is divided into Classic Bluetooth and BLE (Low Power). 2. BLE can act as a server, a client, or both. Servers are typically used to provide services (e.g., sensor data acquisition), while clients consume services (the client reads sensor data from the server or sends data to the server to control the sensor to perform actions). 3. In the BLE protocol, the server role provides GATT. GATT contains multiple services, each containing multiple characters. Whether data is read or written is determined by these characters. The BLE server provides the following services, implemented through the `service` property:
 II. ESP32 network configuration and MQTT subscription communication
. Having worked on ESP8266 technical solutions, these two aspects were naturally implemented in this project: AP network configuration and MQTT message subscription and publication.
1. Implementing the `WEBService`: This service is used for network

configuration, configuring the homepage to scan surrounding network SSIDs
, configuring a page service to connect to the SSID, and enabling ESP32 to connect to the corresponding network via the SSID

. 2. MQTT

: Creating an MQTT server connection and
specifying the subscription subject.

Note that MQTT client IDs are unique; multiple clients using the same ID will cause them to exclude each other.
3. BLE

network : Through the `WEBService` configuration page, the scanned surrounding BLE devices are printed to the page
configuration page `/bleconfig`. The page receives the MAC address of the BLE module and enables the ESP32's Bluetooth to connect to that MAC address.

Building upon the understanding of networks discussed in points 1 and 3 above, we can delve deeper: As wireless modules, their network configuration process uses specified MAC address parameters, broadcasting across multiple channels. If the target device receives the corresponding broadcast data, it sends corresponding broadcast data in response and negotiation.
Thirdly, the STM32 
uses the temperature and humidity sensor module from the previous training camp. From the initial design, technical and reuse issues were considered, and its redundant pins were brought out for direct use by other modules later.
1. The BLE module is connected to its GPIOA2 and GPIOA3 via a serial port, because this BLE module will perform serial port data pass-through after Bluetooth connection.
2. A custom serial port data protocol is implemented based on the serial port: A5 5A length dataType data CRC16, parsing the serial port data and removing unknown data. This ensures that it can correctly execute instructions.

Unknown data is discarded to ensure that it does not occupy buffer space and affect execution efficiency.
1. Circular data writing ensures that buffered data is not continuously removed due to protocol bugs or incorrect data formats.

2. One-click feeding, servo motor start-up via I/O interrupt.
3. The SU-03T
module is an offline voice recognition module produced by SmartPark, supporting no-code programming, serial input, serial output, and custom variables. It enables voice control to transmit serial data to the STM32 via Bluetooth
 
. Example diagrams:





Wi-Fi configuration interface ,
Bluetooth configuration,
MQTT feeding,



 
ugly framework,





 
JLCPCB's cardboard box, not to be wasted.



 
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-28 02:45:36

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号