1 / 25

Team Cassia

Team Cassia. Computer-Controlled Talking Scales System Architecture Presentation 24/9/08. Project timeline Task allocation. Project overview & implementation. System architecture principles. Modularity – division of work, ease of debugging Extensibility – allow for future improvements

ada
Download Presentation

Team Cassia

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Project timeline Task allocation Project overview& implementation

  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

  6. Timeline and task allocation

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

  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. Pin Assignments Port D • RD0-7  the LCD 8 data bits Port E • RE0-2 • LCD control lines • Read/Write , Register Select signal and operation enable

  11. Port Mapping

  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. Interface software design principles Menu structure Interface hardware and enclosure USER interface

  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: Lid with LCD + Keypad Power + Serial Speaker Insert circuit boards here

  18. Central operation loop State transition Function implementation ideas Factory functions SOFTWare

  19. State transitiondiagram

  20. Basic Operation 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. Process weight samples buffer Subtract zero value Divide by value for units Display weight (or count) Process input buffer No Yes Input action?

  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. Yes currUnit = gram grams? No currUnit = ounce Yes ounces? No No count? Yes Number of items in basket (num) Get processed weight Custom.value = currWeight/num Return to general operation currenUnit = custom

  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: • Redefine ‘gram’ and ‘ounce’ values. • Redefine the upper and lower reference voltages for the ADC module. • Plot significant points as used by the ‘Process_Samples’ function.

  25. Thank you for your attention. Questions

More Related