290 likes | 417 Views
Remember Thanksgiving…. Eating 5 lbs turkey 2 plates mashed potatoes 4 rolls 1 bucket stuffing 1 pecan pie Well……..forget that day. . For all the other days in the year there’s SmartScale. Smart Scale. By Raymond A Pasko Pooja Bhandari Elmie Peoples. Introduction.
E N D
Remember Thanksgiving….. • Eating 5 lbs turkey • 2 plates mashed potatoes • 4 rolls • 1 bucket stuffing • 1 pecan pie Well……..forget that day.
Smart Scale By Raymond A Pasko Pooja Bhandari Elmie Peoples
Introduction • SmartScale is a simple device used to effectively monitor one’s weight. • Relates weight to time • Provides weight analysis
Objectives • To create a device that could be useful in everyday life • To build something that would be cost effective and affordable
“Reaching for the Stars” Smartscale does the following : • Sends and retrieves past weight data via the off-chip memory • Displays real time • Communicates with the user in a personalized manner • Keeps track of multiple users • Can be modified to accommodate more users if necessary • Identifies the appropriate user
Components Used • PIC Microcontroller • EEPROM with I2CBus • Keypad • LCD • Scale • RTC • Misc. parts
Block Diagram Scale (Circuit) EEPROM PIC LCD Scale LCD I2Cbus MCU Keypad Keypad RTC RTC
Heavy Machinery • Microcontroller (MCU) • Microchip™ PIC16F877 MCU is the “brain” of SmartScale • Communicates with peripherals • (i.e., LCD, Keypad, Memory, Clock) • Performs Analysis • EEPROM (Memory) • Microchip™ 24C02C EEPROM has 256 Bytes of Nonvolatile Memory • Utilizes I2C data bus to communicate with MCU • Stores individual data logs for unique users with weight and date information
More Apparatus • Keypad • Generic 16 key (0 thru 9 plus additional keys) • Allows user identification • 8 wire output reduced to 5 with decoder • 5 bit data bus transmits data to MCU • LCD • The Alesis™ 9401381C LCD uses two 16 character lines to communicate with user. • 6 bit data bus from MCU transmits text
Scale and Circuit Healthometer™ Scale provides pressure sensor that changes resistance with changes in weight. Varying resistance value DC biased Circuit Amplifies to usable voltage Real Time Clock (RTC) Dallas Semiconductor™ DS1307 RTC keeps time/date in BCD format. Data accessed on I2C bus “Sleep” mode maintains time at low power A Few More Components
Weight Signal (From Analog to Digital ) • Pressure transducer changes resistance with weight • Analog circuit utilizes this varying resistance to an analog voltage signal • MCU converts analog signal to binary data: 10-bits in 2 Bytes • Calibration performed for display purposes.
Weight Resistance • 4 Individuals of Varying Physical Composition (Some big; some small) • 4 Known Weights • 4 Resistance Values • Linear Response: Resistance vs. Weight
Resistance Usable Voltage Signal Amplifier Circuit
Analog to Digital Conversion • Amplifier Output Range : 0.5 – 4.5V • Inverse Relationship to Weight • 0.5V 244 lbs • 4.5V 0lbs • 10 bit A/D: Digital Value between 0, 1023
Resulting Analog SignalWeight vs. Digital Value • Again, 4 Individual Weights • Nonlinear Response • Solution: A piece-wise linear approach
Segment #1: 0-80 lbs WEIGHT = 0.3077 * (A/D Value)
Segment #2: 80-160 lbs WEIGHT = 16 + 0.2462 * (A/D Value)
Segment #3: 160-240 lbs WEIGHT = -267.3 + 0.7304 * (A/D Value)
Testing Procedures • Software used • PICALL: PIC programmer • LET Basic: Basic programming software • Universal Programmer: user friendly programmer • Equipment used • Oscilloscope • Logic analyzer
Tests… • Debugging code to verify compliance of each part with the PIC • Outputting the signal from the scale
…Continued • Checking the functionality of the EEPROM, Real Time Clock, and I2C Bus • Integrating all the separate component codes into one final project code
SmartScale Simulation • Greeting/Prompt @ LCD • User Identification (4 digits) @ Keypad • ID# Lookup @ EEPROM • If ID# found, looks up previous data • If ID# not found, allows new ID# to be created • New weight taken @ Scale/Circuit • Data comparison (if applicable) • Data storage (if applicable)
Project Obstacles • Getting the PIC to program properly • Obtaining the appropriate parts and data sheets • Making the parts work together • Programming • Deciding what advice was good and what advice was bad • Getting the signal from the scale • Finding help was really difficult
Sweet Success • IT WORKS! • Data is successfully stored and retrieved by EEPROM • LCD displays all the dialogue and time correctly • Weight is correctly calibrated and accurately displayed
Recommendations • Use smaller PIC • Implement the RTC on the PIC instead of using a separate chip • Store data on a high capacity EEPROM instead of using 4 smaller chips • Convert signal with an A to D that gives more precision • Display graphs on an advanced LCD • Use voice recognition for an identification system