Sunday, 18 October 2015

Strain Gauge

A load cell is made by using an elastic member (with very highly repeatable deflection pattern) to which a number of strain gauges are attached. There are a total of four strain gauges that are bonded to the upper and lower surfaces of the load cell. When force is applied, strain gauges at the top of the sensor will stretch whereas strain gauges at the bottom part will compressed.


Methodology

Below are the block diagram for the project :


Load Sensor
When clothes is placed on the weighing scale, load cell sensor will convert the load into an electronic signal. This signal is in analog voltage. Load sensor work on the principle of piezo-resistivity ; when a force is applied to the sensor, it changes its resistance. This change in resistance leads to a change in output voltage
Amplifier
Analog to digital converter (ADC) on the Microcontroller can read approximately 19mV per step based on the formula :
(𝟓 𝒗𝒐𝒍𝒕𝒔)/(𝟐𝟓𝟔 𝒔𝒕𝒆𝒑) = 19 mV per step
For the scale, total voltage different is less than 19mV when force is applied. Hence, we need to amplify the signal using INA125P amplifier
MCU System
Microcontrollers can only differentiate between HIGH or LOW level on input pins. Most of the modern MCUs have an Analog to Digital Converter (ADC). ADC will convert the analog voltage from the weighing scale to a digital value so that it can be processed by the Microcontroller. PIC16F88 is 8bit Microcontroller meaning it has the ability to detect 256 discrete analog levels. ADC ports on PIC16F88 are labelled with AN0 – AN6
Transmitter and Receiver
In order to transmit and receive data from the Microcontroller, we use HC11 wireless serial port module. It is a half-duplex data transmission meaning that only one end transmits at a time, the other end receives. Transmitter is connected to the MCU whereas receiver is connected to the USB to UART converter. After ADC in the MCU convert the signal from analog to digital, transmitter will transmit the data to the receiver
USB to UART Converter
Most serial interface from Microcontroller to laptop is done through USB. Level shifter is necessary for UART interface because it converts digital signals from one logic standard to another. For this project, UC00B is used as an USB to UART converter because it offers direct interface with microcontroller and it provides low current 5V supply from USB port
Laptop
A user interface is created using Visual Basic 2010 software. The interface provides the user with :
       I.            1.Weight and total price of the items
    II.           2. Item selections
 III.           3. Barcode on the receipt
 IV.           4. Customer’s database
This is the flow chart of the project (based on interface in Visual Basic Application)


Hardware Development

Below are the main components involved in this project :

PIC16F88
The PIC16F88 features 8 MHz internal oscillator, 256 bytes of EEPROM data memory, a capture/compare/PWM, an Addressable USART, a synchronous serial port that can be configured as either 3-wire Serial Peripheral Interface (SPI™) or the 2-wire Inter-Integrated Circuit (I²C™) bus, 7 channels of 10-bit Analog-to-Digital (A/D) converter and 2 Comparators that make it ideal for advantage analog / integrated level applications in automotive, industrial, appliances and consumer applications.




INA125P Amplifier
The INA125P is a low power, high accuracy instrumentation amplifier with a precision voltage reference. It provides complete bridge excitation and precision differential-input amplification on a single integrated circuit. A single external resistor sets any gain from 4 to 10,000. The INA125 is laser-trimmed for low offset voltage (250mV), low offset drift (2mV/°C), and high
common-mode rejection (100dB at G = 100). It operates on single (+2.7V to +36V) or dual (±1.35V to±18V) supplies. The voltage reference is externally adjustable with pin selectable voltages of 2.5V, 5V, or 10V, allowing use with a variety of transducers. The reference voltage is accurate to ±0.5% (max) with ±35ppm/°C drift (max).Sleep mode allows shutdown and duty cycle operation to save power.

Load cell Sensor
A load cell is a sensor or a transducer that converts a load or force acting on it into an electronic signal. This electronic signal can be a voltage change, current change or frequency change depending on the type of load cell and circuitry used.
The most common use of this sensor is in weighing machine. Load cells are used in several types of measuring instruments such as weighing scales, universal testing machines. Every weighing machine which shows weight has a load cell as a sensing element. 
Load cell in the weighing scale is a resistive load cell. Resistive load cells work on the principle of piezo-resistivity. When a load/force/stress is applied to the sensor, it changes its resistance. This change in resistance leads to a change in output voltage when a input voltage is applied.
HC11 serial port wireless module
HC11 wireless communication frequency band is multiple types of serial port transparent transmission modes have respective features, and the mode is changed by command.
User do not need to program the modules, and four modes are only responsible for receiving and sending serial port data, and are convenient to use.
HC11 wireless module is low current consumption; the idle current is 80ΞA, 3.5mA or 22mA, depending on the selected mode. The number of bytes sent to serial port of module unlimited to one time.
For this project, it is used to transmit the data beetween MCU and computer.
USB to UART Converter
Serial communication is most popular interface between device and this applies to microcontroller and computer. UART is one of those serial interfaces. Classically, most serial interface from microcontroller to computer is done through serial port (DB9). However, since computer serial port used RS232 protocol and microcontroller used TTL UART, a level shifter is needed between these interfaces. Recently, serial port of computer have been phase out, it have been replaced with USB. Of course most developer chooses USB to serial converter to obtain virtual serial port. The level shifter is still necessary for UART interface.
USB to UART converter offers USB plug and play, direct interface with microcontroller and it provide low current 5V supply from USB port. This product offers low cost USB to UART converter to user. It is easier to connect a microcontroller project to a PC.
It has been designed with capabilities and features of :
USB Specification v1.1
            Tested with the baud rate up to 115200 bps.
Low cost USB to UART converter
Easy to use, aiming development between computer and microcontroller, 3.3V or 5V logic.
USB powered, no external source is required to use this converter
Configurable for 3.3V/5V UART interface
            Easy to use 6 pin interface: TXD, RXD, GND, DTR, RTS and VCC (5V or 3.3V)


Modification of the project

At first I decided to use 8051 microcontroller but finally I decided to use PIC16F88 due to several reasons. PICs are faster, more reliable ( high noise immunity) and code-efficient than 8051s.There are more source of coding for PIC16F88 available through various types of websites. Hence, it will be more easier for me to learn about PIC16F88 compared to 8051 microcontroller.

For the time being, my major sources are from this website http://www.mikroe.com/chapters/view/2/chapter-1-pic16f887-microcontroller-device-overview/ and the online book link as stated http://www.mikroe.com/products/view/285/book-pic-microcontrollers-programming-in-c/

For the second part , I decided to modify the available digital weighing scale instead of developing the new weighing scale using load cell sensor and load cell sensor platform. This can help me to reduce the project cost. Furthermore , I found one youtube video related to my project idea. In this video, they modify the digital weighing scale hence it is able to interface with microcontroller. They also explain the most important part in weighing scale known as the strain gauge concept.
Here is the youtube link for the video : https://www.youtube.com/watch?v=fPzUtzFJFus

I keep watching this video in order to understand what I'm doing for this project. These two sources help me a lot. Everything is new for me but I'm trying the best to understand and generate the ideas for what I'm doing for.

This is the list of component that I've finally decided to use :
  • PIC16F88 microcontroller
  • INA125P amplifier
  • HC-11 wireless module