PowerPoint ****

Download Report

Transcript PowerPoint ****

Voice Controlled Home
Automation System
Group 13
Zhe Gong
Hongchuan Li
Introduction
 A voice controlled switch system to create an
automated and comfortable home environment
 Turn on and off multiple sockets remotely
Objective
• User-customized voice command
• Control devices in all rooms
• Enable/disable voice control for specific power
socket
Original Design Overview
Original Design Overview
Core Unit
Remote Unit
Power Electronics
Input
Output
Hardware
Wall outlet AC
5 VDC ± 20mv to all parts
VSK-S10-5UA AC-DC converter
Power Electronics
Requirement
Wall outlet transform to 5
VDC ± 0.02V
Verification
Connect the power electronics
circuit to wall outlet.
Use volt-meter to measure the
output voltage.
Verify the voltage is 5 VDC ±
0.02V.
Power Electronics
Transmitter and Receiver
Transmitter (Core Unit):
Input
Output
Hardware
digital data from microprocessor
RF signal to receiver
TXM-418-LC
Receiver (Remote Unit):
Input
Output
Hardware
RF signal at 418MHz
analog signal to microcontroller
TXM-418-LC
Transmitter and Receiver
Transmitter and Receiver
Requirement
Stable data transmission
from transmitter (core unit)
to receiver (remote unit)
Verification
Input a signal to transmitter using function
generator and make transmitter transmits
the signal.
Connect oscilloscope to receiver to verify
the received signal.
Transmitter and Receiver
Relay
Input
Output
• Low/high voltage from microcontroller
• 120V AC
120V AC
Microprocessor
Input
Output
• Voice data from microphone
• Ethernet or Wi-Fi
• USB mouse/keyboard
• Digital command to transmitter
• HDMI output to screen
• Speaker for voice communication with user
Hardware
• Raspberry pi model B/B+
• Wi-Fi adaptor attached to Raspberry pi’s USB port
• USB speaker
Software
• Rasbian OS
• Jasper (voice recognition software)
• Own program for analyzing and RF transmission
Microprocessor
Requirement
Verification
Microprocessor can recognize Say a voice command to microphone
the voice command.
and verify that the text printed out by
microprocessor is correct.
Microprocessor can send
data to transmitter, thus
communicate with remote
strip unit.
Connect the microprocessor to Arduino
to test if the microprocessor can send
correct data
Microprocessor (Raspberry pi )
Microcontroller
Input
Output
Hardware
Serial signal from receiver
Low/high voltage to relays
Arduino UNO for testing, atmage328P for PCB
Microcontroller
Requirement
Microcontroller converts
data received back to
command.
Based on command,
microcontroller sends high
or low signals to relay.
Verification
Configure the microprocessor to send
commands to microcontroller, verify
the output of microcontroller to be
high or low correspondingly.
Microcontroller
Serial communication
Challenges
• The wireless module TRM-418-LT doesn’t support the
USART (Universal Synchronous/Asynchronous
Receiver/Transmitter)
• Raspberry Pi doesn’t have a RTC to provide accurate
interrupt
Solutions
• Implement our own serial communication
• Continue to pull out the system time
• Block the interrupt
Serial communication count’
• Send 0x0C(DATA)3
• In binary 0b1100+16bitsData+0011
• Send from right to left, each bit at a time
• Set the gpio pin23 to HIGH or LOW correspondingly
• Continuously shift the input into a buffer
• Process if the data satisfy the pattern
• Baud rate = 500
• Too fast, inaccurate
• Too slow, the chip cannot handle
Encoding
• Using hamming 15-11 to encode the data
• Able to correct 1 bit error and detect 2 bits error
Encode/Decode API
• API in python
encH1511(n, debug = False)
decH1511(n, debug = False)
• API in C:
int encH1511(int n);
int decH1511(int n);
Protocol
• 11 bits of data
• 0b0011 0001 000
• Bit 10-7 Core ID
• Generated from the CPU’s ID, each raspberry has a different number
• Bit 6-3 Remote ID
• Assigned to each remote unit (EEPROM)
• Bit 2-0 CMD(distance = 2)
• ON = 0
• OFF = 3
• TOGGLE = 5
• ACK = 6
(0b000)
(0b011)
(0b101)
(0b110)
• Devices are paired and the data is kept by both remote
and core unit to avoid malfunction
Keywords
• Only process if contains “SWITCH”
• TURN
• ON/OFF
• Remote ID
• TOGGLE
• REMOTE ID
• If the remote id exist, then cmd is sent to the remote unit
Functional Tests
Bread board test for
wireless communication of
transmitter and receiver
Wireless communication of test result
Function Generator Output
Receiver Output
Test of microcontroller
with wireless
communication
Microcontroller test results
Test with all PCB
components
Test Results of PCB
Success and Challenges
• All verifications are met.
• Successfully turn on and off power socket by voice control
– achieved overall functional objective
Challenges
• Noise affect the voice recognition accuracy and response
speed
• Performance of microphone affects the voice recognition
accuracy
• Long Distance and signal noise with similar frequency can
affect wireless communication
Recommendations for further work
• Noise handling: noise filter or algorithm, limited command
pick up time
• Add microphone in remote unit and enable bidirectional
communication between core unit and remote unit: control
the socket far away from the core unit, when you are near
the socket
Conclusion
Strengths:
 Multiple socket control
 Possible expansion of new sockets
 Cost effective
Weakness:
 Susceptible to Noise
 Susceptible to long distance in large house