Presentation is loading. Please wait.

Presentation is loading. Please wait.

Team Cassia Computer-Controlled Talking Scales System Architecture Presentation 24/9/08.

Similar presentations


Presentation on theme: "Team Cassia Computer-Controlled Talking Scales System Architecture Presentation 24/9/08."— Presentation transcript:

1 Team Cassia Computer-Controlled Talking Scales System Architecture Presentation 24/9/08

2 PROJECT OVERVIEW & IMPLEMENTATION Project timeline Task allocation

3 System architecture principles Modularity – division of work, ease of debugging Extensibility – allow for future improvements Efficiency – code re-use, emphasis on avoiding potential problems

4 Project plan Allocation of roles, background research Work is done by multidisciplinary pairs Emphasis on skeleton code to be completed first, to develop interfaces between modules Regular milestones for code/hardware integration Communication by Wiki (brainstorming, code, user manual development)

5 Team roles MemberRole Alex JarkeyTeam leader Kit Axelrod Software leaders Duncan Matheson Elisabeth MagdasDocumentation leader Michelle Noguez Cerón Hardware leaders Ryan Nguyen Michael WestIntegration leader

6 Timeline and task allocation

7 HARDWARE I/O requirements and Pin Assignments Connections, terminations and enclosure Power supply

8 Hardware devices Input hardware Strain Gauge sensors on the scale  will use A/D converter Serial Port input via RS232 from the PC keyboard Keypad input via the I/O ports on the board Possible On/Off switch Serial input into the Text to Speech module Output hardware LCD display  Menu and value display Hyper-terminal via RS232 Auditory output from the Text to Speech processor LEDs  purpose to be determined (debug, status)

9 Pin Assignments Port A RA0  Strain gauge signal Port B RB0-2  Used for the keypad column pins RB4  controls the one LED RB6 -7  Debugger for the MPLAB Port C RC1,3-5  Used for the keypad row pins RC2  Used to produce a PWM on the CCP1 if necessary RC6  USART transmission (TX) RC7  USART receive (RX)

10 Port D RD0-7  the LCD 8 data bits Port E RE0-2 – LCD control lines – Read/Write, Register Select signal and operation enable Pin Assignments

11 Port Mapping Bits01234567 Port AStrain Gauge Port B Keypad C1Keypad C2Keypad C3LED Debugging Port CKeypad R1TimerCCP1 Keypad R2 Keypad R3 Keypad R4TXRX Port DLCD data Port ELCD control

12 Power Supply Logic and interfacing circuits to be powered by +5V and +/- 12V DC Extension: Implement a +9V DC source from an alkaline battery for portability purposes – Strain Gauge : 5V – PIC18F452 : 5V through X2 or X9 pins – LCD : 5V – Text to Speech : 5V

13 Connections In the case of wires between prototyping board and Minimal PIC board, ribbon cable to reduce clutter – with pins or directly soldered Serial Port connection Other possible ideas : – Use clips or simple pin connections for initial stages for testing and debugging, and towards final stages, solder the pins together permanently

14 USER INTERFACE Interface software design principles Menu structure Interface hardware and enclosure

15 User interface - software Constraints – limited input – limited output – multiple modes – numerical entry, Factory mode Design principles – consistency – reusability – logical – accessibility

16 User interface – menu structure Numerical entry mode here – deactivates ability of input to affect settings

17 User interface – hardware Repeat button to read out last command Keypad will include Braille stickers Enclosure design: Speaker Power + Serial Insert circuit boards here Lid with LCD + Keypad

18 SOFTWARE Central operation loop State transition Function implementation ideas Factory functions

19 State transition diagram

20 Basic Operation Process weight samples buffer Subtract zero value Divide by value for units Display weight (or count) Process input buffer Input action? NoYes The scales effectively perform the same function for the majority of the time. With the exception of factory mode only functions, the high level functionality can be summed up in one loop. The processes shown are passed values corresponding to current operating unit and user mode. Any update of the settings is backed up in EEPROM on update.

21 Processing Weight Samples and Zero The samples buffer will be processed to produce a fixed point number proportional to weight only. At the most basic level the processing is an arithmetic mean but will likely develop through the use of frequency calculations. Uses function prototype: int Process_Samples (int * buffer, int sampleCount); The ‘TARE’ function will take the current processed value and set it as the relative zero point. ‘TARE’ produces a unit-independent weight value ‘currZero’. Effectively: currZero = Process_Samples(sampleBuffer, sampleCount); Meaningful usage may be: currWeight = Process_Samples(sampleBuffer, sampleCount) – currZero;

22 Divide by Units Divisor The units divisor and name are stored as ‘unit’ structs and can have values for: - grams - ounces - custom (for count) The pointer to struct ‘currUnit’ is updated on unit change or when the count functionality is used. The user defined unit ‘custom’ is updated during the setup of the count function. No Yes grams? ounces? count? currUnit = gram currUnit = ounce Get processed weight Number of items in basket (num) Custom.value = currWeight/num currenUnit = custom No Yes No Return to general operation

23 Display weight (or count) and Process input buffer The display method is defined within ‘mode’ structs UserLocal, UserRemote and Factory. The pointer currMode will point to the active user mode. Uses function prototype: char Display (struct mode* currMode, struct unit* currUnit, int currWeight); Input methods, either local and remote, are always ready and will fill an ‘input buffer’, which is progressively emptied in each basic operation iteration. Inputs will be handled by hardware as either external interrupts for keypad or RX interrupts for RS232. In the majority of cases, the input will require the program to break from basic operation and perform a settings change, such as changing the value of currUnit or currMode.

24 Factory functions Only CALIBRATE is interesting in the Factory functions. Some interpretations we have come up with: 1.Redefine ‘gram’ and ‘ounce’ values. 2.Redefine the upper and lower reference voltages for the ADC module. 3.Plot significant points as used by the ‘Process_Samples’ function.

25 QUESTIONS Thankyou for your attention.


Download ppt "Team Cassia Computer-Controlled Talking Scales System Architecture Presentation 24/9/08."

Similar presentations


Ads by Google