An autonomous cyber-physical system simulating a contactless store environment using RFID technology, AWS cloud services, and computer vision. The AGV autonomously performs purchases on behalf of users, enabling real-time item tracking, cloud-based processing, and automated delivery within a simulated bakery environment.
โข Developed a cyber-physical system simulating a contactless store by integrating RFID technology and AWS cloud services with an AGV that autonomously performs purchases on behalf of the user. Enabled real-time item tracking, cloud-based processing, and automated delivery within the simulated environment.
โข Deployed low-level SSD object detection in C++ on a Raspberry Pi for real-time, resource-constrained inference.
โข Programmed an RFID module to read customer tags and verify item availability by sending requests through an AWS IoT Gateway. Triggered a AWS Lambda function to check inventory stored in S3 and update the list by removing items selected for purchase, enabling an automated shopping experience.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Control System (Keyboard Interface) โ
โ MQTT Client - Wireless Command Relay โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MQTT Broker (192.168.137.1)
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Main Orchestrator (main.py) โ
โ Process Manager & MQTT Router โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ
โ Motors โ โRekognitionโ โ RFID โ
โControl โ โ Detection โ โ Scanner โ
โโโโโโฌโโโโ โโโโโโโฌโโโโโ โโโโโโโฌโโโโโ
โ โ โ
โ โ โ
โผ โผ โผ
AGV Motion Face Detection AWS IoT
(Serial) + YOLOv4 Bread Core
โ
โผ
โโโโโโโโโโโโโโโโ
โ AWS Services โ
โ - DynamoDB โ
โ - Lambda โ
โ - S3 โ
โโโโโโโโโโโโโโโโ
- Platform: Raspberry Pi (primary compute module)
- Camera: OpenCV VideoCapture for real-time vision
- RFID Reader: RC522 MIFARE module (SPI interface)
- Motor Controller: Serial communication via
/dev/ttyS0(115200 baud) - GPIO: RPi.GPIO library for hardware interfacing
0b0001 = Forward (w)
0b0010 = Left (a)
0b0100 = Backward (s)
0b1000 = Right (d)
- Endpoint:
a1bo3h1pmj4c6m-ats.iot.us-east-2.amazonaws.com:8883 - Protocol: MQTT over TLS 1.2
- Authentication: X.509 certificates
- Purpose: Secure RFID data transmission from AGV to cloud
- Region: us-east-2
- Collection:
profesores(authorized personnel database) - Purpose: Real-time facial recognition for access control
- Features: Face indexing, matching, audio alerts
Tables:
profesores- Face recognition mapping (RekognitionId โ FullName)Compras- Transaction records (Pan, Timestamp, Precio, Fecha, Cantidad)Inventario- Real-time stock tracking (decremented per purchase)
- Bucket:
panaderia-equipo5 - Contents:
- Facial recognition training images
- Analytics graphs and reports
- Historical transaction data
- Rekognition Lambda: Indexes uploaded face images into collection
- RFID Lambda: Processes purchase transactions, generates analytics, updates inventory
- Model:
yolov4-tiny-opt.bin(23.5 MB optimized for Raspberry Pi) - Framework: NCNN (Tencent's neural network inference framework)
- Confidence Threshold: 80%
- Target Platform: ARM-based edge devices (resource-constrained inference)
| Class ID | Product | Description |
|---|---|---|
| 1, 4 | BOLILLO | Traditional Mexican roll |
| 2, 5 | CONCHA | Sweet shell-shaped bread |
| 3, 6 | DONA | Donut |
| 7, 9 | OREJITA | Ear-shaped pastry |
| 8, 10 | MUFFIN | Muffin |
AGV/Control - Main AGV commands (Start/Stop/DetectRFID)
AGV/Motores - Motor movement commands (4-bit control)
Camara/Deteccion - Camera/detection commands (Pan detection)
Fin - Process completion signals
iot/Pan - RFID data publishing to AWS IoT
Sim/Inicio - Simulation initialization
Sim/Reset - Simulation reset
Sim/Estacion[1-3] - Store location selection
- Control system publishes commands via MQTT
- Main orchestrator routes messages to appropriate subsystems
- Subsystems complete tasks and signal completion
- Cloud services process data and update databases
- AGV navigates to store location (1-3)
- RFID reader scans customer tag
- Reads blocks 4-18 containing purchase data
- Formats JSON payload:
{ "Compras": [ {"Pan": "CONCHA", "Precio": 15, "Fecha": "2025-01-16", "Can": 2} ], "Tienda": 1 } - Publishes to AWS IoT Core via TLS
- Lambda function validates inventory
- DynamoDB updated (transaction logged, inventory decremented)
- Analytics graphs generated and stored in S3
- Per-store daily quantity/price reports
- Historical cross-store analysis
- Inventory tracking graphs
- Timestamp-based trend analysis
- Store #3 visits trigger comprehensive historical analysis
- Matplotlib graphs saved to S3
- Accessible for business intelligence
python main.py # Start main orchestratori- Initialize simulationk- Trigger RFID detectionm- Start bread detection (YOLOv4)p- Pause/stopr- Reset simulationw/a/s/d- Motor control (forward/left/backward/right)
- Navigation: AGV moves between 3 store locations
- Recognition: Facial recognition greets authorized personnel
- Detection: YOLOv4 identifies bread products in camera feed
- Scanning: RFID reader captures purchase information
- Processing: Cloud Lambda validates and logs transaction
- Inventory: Real-time stock updates in DynamoDB
- Analytics: Historical data visualization in S3
AGVPanaderia/
โโโ main.py # Central MQTT orchestrator (70 lines)
โโโ ControlMotor/
โ โโโ comunicacion_serial.py # Motor serial interface (37 lines)
โโโ Rekognition/
โ โโโ deteccion_profes.py # Facial recognition system (176 lines)
โ โโโ Lambda.py # Face indexing Lambda (71 lines)
โโโ RFID/
โ โโโ read_block.py # RFID scanner (140 lines)
โ โโโ Lambda.py # Transaction processing (197 lines)
โ โโโ Certificates/ # AWS IoT TLS certificates
โ โโโ root-ca.pem
โ โโโ private.pem.key
โ โโโ certificate.pem.crt
โโโ YoloDetect/
โ โโโ yolov4.cpp # C++ object detection (261 lines)
โ โโโ yolov4 # Compiled binary
โ โโโ yolov4-tiny-opt.bin # Optimized model (23.5 MB)
โ โโโ yolov4-tiny-opt.param # Model parameters
โโโ Sistema_De_Control/
โโโ Sistema_Control.py # Keyboard control interface (90 lines)
- Python 3 - Primary development language (~1105 lines)
- C++ - YOLOv4 inference engine (~261 lines)
paho-mqtt # MQTT messaging
boto3 # AWS SDK (DynamoDB, S3, Rekognition)
AWSIoTPythonSDK # AWS IoT Core MQTT client
opencv-python (cv2) # Computer vision
mfrc522 # RFID RC522 module
RPi.GPIO # Raspberry Pi GPIO control
pynput # Keyboard input handling
pandas # Data analysis
numpy # Numerical operations
matplotlib # Graph generation
- NCNN - Neural network inference framework
- OpenCV - Computer vision library
- Face Detection Rate: 2 FPS (balanced accuracy/performance)
- RFID Scan Time: <2 seconds per tag
- Object Detection Inference: Real-time on Raspberry Pi
- MQTT Latency: <100ms local network
- AWS IoT Round Trip: <500ms (depends on network)
- TLS 1.2 Encryption: All AWS IoT communications
- X.509 Certificates: Device authentication
- Face Recognition: Access control for authorized personnel
- RFID Validation: Cloud-based inventory verification
The system recognizes the following authorized personnel:
- David Navarro
- Liz Machado
- Luis Yepez
- Adriana
- Rodrigo Regalado
Each recognized person triggers a personalized audio greeting.
- RFID Scans: Store/product/quantity/price information
- Camera Feeds: Real-time bread detection and face recognition
- Control Commands: MQTT keyboard input
- IoT Core: Secure message brokering
- Lambda: Event-driven analytics and inventory updates
- DynamoDB: Transactional record storage
- S3: Long-term data archival and graph storage
- Rekognition: Face indexing and matching
- Motor Commands: AGV navigation
- Audio Alerts: Personnel greetings
- Analytics Graphs: Business intelligence
- Inventory Updates: Real-time stock tracking
The system supports 3 simulated store locations:
- Store cycles tracked in
num_tienda.txt - Each visit increments counter (1 โ 2 โ 3 โ 1)
- Store #3 triggers comprehensive historical analysis
- Per-store analytics for comparative insights
Git commit history shows active development:
14a44b3- Added control systemcf89ea7- Integrated control systeme3ad034- Added RFID Lambda integration- Focus areas: RFID, YOLO detection, serial communication
- Multi-AGV fleet coordination
- Mobile app integration for customer orders
- Expanded product catalog (beyond bread)
- Predictive inventory management using ML
- Enhanced navigation with SLAM algorithms
This project was developed as an educational cyber-physical system demonstration.
Equipo 5 - Embedded Systems & Cloud Integration Team
Note: This system requires Raspberry Pi hardware, AWS account with configured services, and MQTT broker setup for full functionality.