presentation
Download
Report
Transcript presentation
QuickBev
Group 29: Phillip Nielsen & Michael Perreux
TA: Braedon Salz
ECE445 Spring 2016
May 4, 2016
Introduction
Pay by volume beverage
dispenser
Order and pay for beverage on
Android smartphone and submit
via NFC to system which
dispenses the exact amount
Objectives
Eliminate waiting for simple beverage orders
Prepayment via phone/NFC
Supply monitoring for owners of dispenser
System Overview
Hardware
• 12V DC Power Supply, 5V Voltage Regulator, 3.3V Voltage Regulator, WiFi
Module, NFC Module, Pressure Sensor, Flow Meter, Solenoid Valve,
ATMega328P-pu Microcontroller
• Smartphone with NFC running Android 4.4+
Software
• Microcontroller code
• Android Application code for processing order and handling NFC
communication
Block Diagram
Schematic
LEGEND: RED: Power --
GREEN: NFC -- GREY: Wi-Fi -- BLUE: Level Shifters – ORANGE: Pressure Sensor – PURPLE:
Flow Meter – BROWN: Solenoid Valve and Relay – BLACK: Microcontroller
Power Supply (Main Idea)
Purpose: convert 120V AC to 12V DC, 5V DC, & 3.3V DC
Components have different voltage requirements
Table 1: Components grouped by required voltage
12V DC
5V DC
3.3V DC
Solenoid Valve
ESP8266 WiFi Module
ATMega328P-pu
Microcontroller
ElecHouse PN532 NFC
Module
Swissflow SF800
Flowmeter
Honeywell 24PCDFG6G
Pressure Sensor
Power Supply (Schematic)
Barrel Jack
Connector
5V Voltage
Regulator
3.3V Voltage
Regulator
• 120V AC to 12V DC adapter connects to standard US outlet and barrel jack
connector on our PCB
• LM7805 used for 5V Voltage Regulator
• LD1117V33 used for 3.3V Voltage Regulator
Microcontroller Code Flow
Microcontroller Integration
• Wireless Communication
• Requirement: Interface with Wi-Fi module to connect to server
(Unsuccessful)
• Requirement: Interface with NFC module to connect to Phone
(Success)
• Sensor IO
• Requirement: Read Pressure Sensor Data and send to Wi-Fi
Module (Partial Success)
• Requirement: Read Flowmeter Data and process order
correctly (Success)
• Requirement: Send open signals to Solenoid relay at correct
times to start and stop the flow of liquid (Success)
Flow Meter – Measuring Volume Output
100 𝐻𝑧
Using SF-800 Flow Meter (with a
calibration factor)
𝐿/𝑚𝑖𝑛
𝑓𝑙𝑜𝑤𝑅𝑎𝑡𝑒
𝐿
𝑚𝑖𝑛
=
1000 ∗ 𝑝𝑢𝑙𝑠𝑒𝐶𝑜𝑢𝑛𝑡
𝑐𝑢𝑟𝑟𝑇𝑖𝑚𝑒 𝑚𝑠 −𝑝𝑟𝑒𝑣𝑇𝑖𝑚𝑒 𝑚𝑠 ∗(𝑐𝑎𝑙𝑖𝑏𝑟𝑎𝑡𝑖𝑜𝑛𝐹𝑎𝑐𝑡𝑜𝑟)
𝐿
𝑡𝑜𝑡𝑎𝑙𝑉𝑜𝑙𝑢𝑚𝑒 𝑚𝑙 =
𝑓𝑙𝑜𝑤𝑅𝑎𝑡𝑒 𝑚𝑖𝑛 ∗1000
60
Sum these intervals as we go to obtain amount of
liquid dispensed
Utilizing Flow Meter Data
Requirement: Flowmeter produces correct raw output for test flow
outputs with accuracy to +/-%5 (SUCCESS: 5 Points)
1. Total milliliters of liquid dispensed reported by flowmeter
2. Interrupt is broken when desired amount of liquid is reached
3. Reports to Wi-Fi module of success/failure to dispense
Pressure Sensor – Detecting Empty CO2
Connected 24PCDFG6G Pressure Sensor output to the analog pins
of ATmega328
Reads a value of 0 to 330 mV which is then mapped to the values
of 0 – 30 psi in the microcontroller
Using Pressure Sensor Data
Requirement: Pressure sensor produces correct raw output for test
pressure outputs with accuracy to +/-5% (SUCCESS: 5 Points) –
only partially working
1. Pressure data is checked on completion of each dispense
2. An interrupt is sent if reading indicates low pressure
3. Reports problem to server via Wi-Fi to send notification to Admin
users
Solenoid Valve – Dispense Correctly
Relay circuit provides 12V to the
solenoid when it receives 5V output
from ATmega328
Solenoid valve opens when it gets
12V from relay
Requirement: Flow Valve opens with
the correct amount of voltage
excitation (SUCCESS: 5 Points)
PCB Sensor Attachments
Flow Meter & Solenoid Valve
Level Shifting Circuit
ATmega328’s TX and RX
pins talk on 5V signals
ESP8266’s TX and RX pins
talk on 3.3V signals
Requires Bi-directional
operation
Wi-Fi – Server Communication
Must be able to send data to and from the server
Determine valid token and then find amount to dispense
– HTTP GET quickbev.firebaseio.com/Orders/%2D[token]/processed.json
– HTTP GET quickbev.firebaseio.com/Orders/%2D[token]/milliliters.json
Update that transaction so that it is marked complete
– HTTP PATCH -d {"processed":true} quickbev.firebaseio.com/Orders/%2D[token].json
Requirement: Must be able to properly send and receive messages from the
server (Partially Successful)
NFC Module
Purpose: communication between
smartphone and system
Communicates with ATMega328P using
I2C (SDA and SCL data lines)
13.56 MHz frequency
Requirement: Must be able to properly
send and receive messages from the
phone (Success)
How it works: System & Smartphone Communication
1. System is actively sending SELECT
command
2. Smartphone app passively detects
this command when placed in
proximity
3. Smartphone app sends data to
system
4. System sends SET STATUS command
to smartphone indicating data
transfer complete
Android Application
Purpose: User interface of
our system
Allows user to pay for and
place an order
Allows admin to monitor
supplies
Android Application: Order Screen
1. User enters desired amount of beverage in
the text box
2. User taps “process order”
3. Beverage request information is sent to
database and a unique token is generated
4. User places smartphone near NFC reader
5. Token is sent to system via NFC
6. System dispenses beverage using token
Android Application: Admin Screen
• Data is pulled from our database and is
automatically updated with each new
order
Displays:
• Number of orders processed
• Total volume dispensed in both mL
and US Fl. Oz
Ethical Considerations
System processes beverages for human consumption
– Flow meter, solenoid valve, and tubing are all food safe
User pays by volume for beverage
– Flow meter is verified to be accurate so that users do not overpay and
owners are correctly compensated
System can be used to dispense alcoholic beverages in a commercial setting
– Comply with local legislature by requiring human ID verification of age
before usage of device
– Supervise device users to ensure safety
Conclusions and Further Work
Make the system more user friendly by adding a display
with visual feedback
Add gamification to the Android application to encourage
return visits
Design a case to house the components
Shrink PCB design to be more compact
Thank you!
Questions?