ECE265 ECE 265 – LECTURE 16 Complete System Example A Weight Measurement System 4/13/2015 1 Lecture Overview 2 System application example A point of sale weight measurement system Involves Load cells and signal conditioning Application program REF: Chapter 14 Many chapters plus the 68HC11 reference manual. Joanne E. DeGroat, OSU ECE265 4/13/2015 Statement of the Problem 3 A chain of hardware stores wants to automate checkout of small items to make the checkout process more efficient. For nail, screws, washers, and other similar small items. Each carries a different price and each items has an item weight. When a bulk purchase of one of these items is made, the order is placed on the scale of the system and the clerk enters the product id. The microcontroller weighs the order, the number of items and total price calculated. Joanne E. DeGroat, OSU ECE265 4/13/2015 Some background 4 Load cells are transducers that covert applied force, such as weight, into a differential electrical output voltage signal. Load cells – foil type strain gauges Use a Wheatstone bridge circuit to output a signal that can be input to the microcontroller A/D. Foil type strain gauges measure the deflection of the sensing beam to which they are attached. The beam deflects when a load is applied and thus the ability to measure weight is achieved. Joanne E. DeGroat, OSU ECE265 4/13/2015 The Load Cell setup 5 The basic setup to measure weight using a strain guage. Joanne E. DeGroat, OSU ECE265 4/13/2015 Wheatstone bridge circuit 6 To get a voltage proportional to weight Joanne E. DeGroat, OSU ECE265 4/13/2015 Load Cell Specification 7 Parameters to specify voltage – typically a maximum Terminal resistance input – used to determine power consumption – manufacturers specify minimum resistance. Rated capacity – in pounds of kilograms Rated output – in mV/V – specifies the output signal per pound given an input voltage of V Excitation Joanne E. DeGroat, OSU ECE265 4/13/2015 Interface to the microcontroller 8 Practical load cell circuit – Ready for input to conditioning Joanne E. DeGroat, OSU ECE265 4/13/2015 Signal conditioning 9 Signal needs to be conditioned (scaled) for input to the 68HC11. IA = Instrumentation Amplifier Joanne E. DeGroat, OSU ECE265 4/13/2015 Fig continued. 10 The full setup for interfacing Joanne E. DeGroat, OSU ECE265 4/13/2015 If the signal is noisy 11 Joanne E. DeGroat, OSU ECE265 4/13/2015 Software design 12 An overall flowchart /pseudocode Start at this high level and then break down each function Joanne E. DeGroat, OSU ECE265 4/13/2015 The enter subroutine 13 Again have modules to break down Joanne E. DeGroat, OSU ECE265 4/13/2015 The measure subroutine 14 Note level of action in each box. What type of code is this? Joanne E. DeGroat, OSU ECE265 4/13/2015 The little things 15 A subroutine to round the cents in the price. A more complex routine Joanne E. DeGroat, OSU ECE265 4/13/2015 Lecture summary 16 In this lecture we have looked at a system implementation where a microcontroller would be used. System in an integration of both hardware and software design and implementation. The software for the system is 8 ½ pages in chapter. Note the documentation within the software code!!! Joanne E. DeGroat, OSU ECE265 4/13/2015 Assignment 17 None Joanne E. DeGroat, OSU ECE265 4/13/2015