Beruflich Dokumente
Kultur Dokumente
INTRODUCTION
1.1 Introduction
Actually posture is not a position, but it is a dynamic pattern of reflexes, habits and adaptive
responses to anything that resists us being more or less upright and functional such as:
Gravity
Abnormal anatomy
Athletic challenges
Correct posture keep the many intricate structures in the back and spine healthy, so correct posture
is very important. It is very simple, good posture and back support are critical to reducing the
incidence and levels of back pain and neck pain. Back support is more important for those people
who spend many hours sitting in an office chair or standing throughout the day.
Carey and Freburger notices that more than 80% of Americans experiences low back pain at some
time in their lives and that total costs of the condition are estimated at greater than $100 billion
annually.
This project ‘Human Posture Alert Jacket’ will help the people in correcting their posture to
minimize the back problems. In this Alert Jacket we are using sensors and a microcontroller, which
will monitor the human back during the day time while he/she is working. The programming is
1
1.2 Problem Statement
Poor posture and adequate back support can add strain to muscles and put stress on the spine. Poor
posture stress can change the anatomical characteristics of the spine leading to the possibility of
constricted blood vessels and nerves, as well as problems with muscles, discs and joints. All of
these are the major contributors to back and neck pain, as well as headaches, fatigue and concerns
A poor posture results in Sciatica problem. Sciatica are the symptoms of pain, numbness, and/or
weakness that radiate along the sciatic nerve from the lower back to the buttocks and legs. Most
The aim is to design a low cost human posture monitoring system that can be used by anyone
throughout the world. There are millions people who cannot afford the high prices, our aim is to
design a low cost back monitoring system, which can be used with the computer wirelessly [2].
1.4 Objective
Low cost
2
Can be used by any age person
Can be used to monitor the posture data wirelessly on the computer screen
1.5 Motivation
Now a day’s we really need this type of projects, because every engineering student is running
after quad copters, robotics and they are only making toys. Very few students work on biomedical
projects. This project which is based on human posture monitoring can bring a revolutionary
change and if advertised well can be used throughout the world. This idea can also be made
commercially [3].
1.6 Advantages
This project is designed to fix the human posture so it has many advantages like:
This report describes that how to design a Human Posture Alert Jacket. The report is organized by
section of the development process. The upcoming chapter are going to provide further detail about
the design of Human Posture Alert Jacket. Chapter 2 tells about the literature review. Chapter 3
gives a brief introduction and overview about action of this project. Chapter 4 tells about the basic
theory related to project and also introduces different components used in this project. Chapter 5
discusses the methodology of our project in detail. Chapter 6 basically tells about the description
3
of results achieved. Chapter 7 gives the conclusion and future suggestions that how we can enhance
this project to get better results and how one can make more efficient.
4
CHAPTER 2
LITERATURE REVIEW
2.1 Introduction
The pain felt in the back is called the back pain. Back pain can be acute, sub-acute or chronic
depending on the duration. Pain can be characterized as a dull ache, shooting or piercing pain or a
burning sensation. The pain can radiate into the arms and hands as well as the legs or feet and may
include paresthesia (tingling with no apparent cause), weakness or numbness in the legs and arms.
The anatomic classification of back pain follows the segments of the spine, middle back pain, neck
pain, lower back pain with the lumbar vertebrae area most common for pain.
The pain can originate from the muscles, joints, nerves, bones or other structures in the spine.
Internal structures such as the gallbladder and pancreas are also the cause of back pain. Back pain
is common with about nine out of ten adults experiencing it at some point in their life, and five out
of ten working adults having it in every year. However it is rare for it to be permanently disabling,
and in most cases of herniated disks and stenosis, rest, injections or surgery have similar general
Acute low back pain in the United States is the fifth most common reason for physician visits and
causes 40% of missed days off work. Back pain is the single leading cause of disability worldwide.
Over 86% of U.S workers sit for the entire workday and the average time spent daily on mobile
device is almost five hours. In total, America spend almost 11 hours a day on a screen according
to recent Nielsen report. That means hunched shoulders and curved forward leaning ‘text necks’.
5
This equates to a medley of potential health hazards including fatigue, muscle tension, hampered
immune functions, difficult breathing, chronic back pain, dowager humps, osteoporosis and even
depression [5].
Poor posture and adequate back support can add strain to muscles and put stress on the spine.
Exercise can help to minimize the back pain but it’s not the permanent solution. A quick problem
solver can be such a system that can monitor the back all the day long, and alert the human on bad
posture so that he/she can adjust his back right at that time. In this way this problem can be solved
very soon. 80% of the population suffers from posture induced back pain. The NIH estimates that
54% of Americans who experience lower back pain spend the majority of their working sitting.
Theses frightening statistics have inspired a new cottage industry the posture fixers [6].
There are dozens of wearable devices that buzz a user upon slouching, complicated exercise
systems to lengthen the spine, ‘get up and move’ alarm apps, even clothing meant to strengthen
upper back muscles. For kids there are games, pillows and a head wearable that prevents ‘Gameboy
DARMA Comfort Foam Seat Cushion Posture Coach And Activity Tracker
Active Posture Neck, Back And Total Body Exercise System By Core Prodigy
6
CHAPTER 3
THEORETICAL ASPECTS
BACK
MONITORING
SENSOR
BATTERY
REGULATED
TRANSMITTER MICROCONTROLLER
POWER
DRIVER
BUZZER
CONTROLLER
RECEIVER BOARD
COMPUTER WITH
DESIGNED
APPLICATION
7
3.2 Circuit Diagram
arduino is connected with flex sensor and a ground is connected with 10K resistor. This 10K
resistor and flex sensor makes a voltage divider. A wire from the middle is connected with analog
pin A0 of the arduino. The buzzer’s S pin is connected with pin number 5 of the arduino which is
the PWM pin and minus pin is connected with the ground. A 433MHz transmitter is connected
with the Arduino UNO. Transmitter’s 5V is connected with the arduino’s 5V and its ground is
connected with the arduino’s ground. While the data pin of the transmitter is connected with pin12
8
3.2.2 Receiver Circuit
of the Arduino UNO and a 433MHz receiver. The Arduino UNO board is connected with the
laptop through USB cable. Through serial communication the Arduino UNO and computer
application communicates with each other. The controller receives data wireless from the
transmitter circuit and then give it to the computer application where it is displayed on the graph.
9
CHAPTER 4
HARDWARE COMPONENTS
1 Arduino UNO
4 Resistors
5 Buzzer
6 Connecting Wires
8 USB Cable
9 Battery 9V
11 Jacket Or T-Shirt
12 Cutter
13 Glossy Paper
14 Sucker
15 Paste
10
4.2 Overview
This ‘Human Posture Alert Jacket’ project can be used for back monitoring. The sensor location
can be selected as per requirement. As physical appearance of each person is different, some people
have thin shoulders, while others have broad shoulders and so on. This project can easily be
calibrated and can be used with any time of T-shirt or jacket. This project has low cost so it can be
afforded by anyone. It is very beneficial. The flex sensor in this project is used to monitor the
amount of bend. For monitoring the rounded shoulders flex sensors is the best choice [7].
Transmitter End
Receiver End
Arduino is 8-bit Microcontroller. 8 bit microcontroller means central processing unit or arithmetic
logic unit can process 8 bit data at a time. It has built in memory (SRAM, Flash Memory) with
input and output peripherals. All necessary protocols of control are available like SPI, I2C etc.
Arduino Uno series uses AVR Microcontroller that is AT-Mega 328. It has 14 pins out of which
6 are PWM pins and other are digital pins. It has just 6 analog pins. Different pins can be used for
different purpose. This board has built in USB to TTL converter. We can supply safely up to 12v
11
Table 4.2: Technical Species
Operating Voltage 5V
Digital Pins 14
PWM Pins 6
Analog Pins 6
Weight 25g
SRAM 2KB
ERAM 1KB
12
The power pins of Arduino are as follows:
VIN
The input voltage to the arduino board when using an external source. It is possible to supply
5V
In Arduino UNO voltage regulators are used to supply regulated voltage to atmega328
microcontroller. There are two regulators 5V and 3.3V. The Arduino UNO can be powered up
GND
Pin of earth.
LED
LED in arduino is connected with pin number 13. This LED can be turned ON/OFF by using
the HIGH and LOW commands. The LED remains ON when HIGH and remains OFF when
LOW.
3V3
3.3 volt power supply is generated by the on board regulator and the maximum current is
50mA.
Arduino UNO
It has a default serial port on pin0 and pin1. These pins are used for the serial communication,
debugging purposes to check any error in coding and can also be used to communicate with
other devices which make use of serial communication like GSM module, Bluetooth module
and so on. There are thousands of devices which uses serial communication.
13
External Interrupts
Pins 2 and 3 can be configured to trigger an interrupt on a low value, a rising or falling edge
or a change in value.
PWM (Pulse Width Modulation) pins are 3, 5, 6, 9, 10 and 11. On these pins the analog write
4.4.1 Description
The LM7805 series of three terminal positive regulators is available in T0/220/D-PAK package
and with different fixed output voltages making them useful in a wide range of applications. The
output voltage from the condenser is filtered more and finally regulated. The voltage regulator
keeps the output voltage constant regardless of the change in the supply variation, load variation
and temperature variations. IC LM7805 is a +5V regulator used for the microcontroller.
the operating area making it essentially indestructible. If adequate heat dispersion is provided,
voltage regulators can supply more than 1A of output current. Voltage Regulators can be used to
At constant junction temperature the load and the regulation of the line are specified.
The variation of V0 due to the effects of heating must be taken into consideration
separately.
15
4.4.4 Features
Output Current Up to 1A
A flex sensor also called bend sensor, measures the amount of deflection or bending. Usually the
sensor is stuck to the surface and resistance of sensor element is varied by bending the surface.
Since the resistance is directly proportional to the amount of bend, it is used as goniometer (an
instrument for the precise measurement of angles). The flex sensor is also called flexible
potentiometer. This flex sensor has two contacts. It can be easily used with a breadboard and
soldering jumper wires with the flex sensor can be easily interfaced with other circuits. It works
like an ordinary potentiometer or variable resistor, the only difference is that the flex sensor
resistance changes with the bending while the resistance of an ordinary variable resistor changes
4.5.1 Features
Simple construction.
Low profile.
4.5.2 Uses
Robotics
Medical Devices
Computer Peripherals
Musical Instruments
Physical Therapy
17
4.5.4 Electrical Specifications
How It Works
4.6 Resistor
Resistors are the electronic components that have a specific electrical resistance and are constantly
18
They are the passive components, in the sense that they consume only energy and can’t generate
it. Resistors are generally added to circuits in which they integrate active components such as
microcontroller, operational amplifiers and other integrated circuits. Resistors are used to limit the
current, to divide the voltages and pull up the input/output lines. Resistors can be manufactured in
various ways. The most common type of resistor is the carbon composition resistor. Fine
granulated coal is mixed with clay and hardened. The resistance depends on the percentage of
carbon in clay, the higher this relationship, the lower the resistance [9].
In digital circuits, the pull-up resistor is a normal resistance connected to the high voltage power
supply (+5V or +12V) and sets the Input/output level of a device to 1. The pull-up resistor sets the
level to 1 when the input/output is disconnected. When the input/output is connected the level is
In digital circuits, the pull-down resistor is a normal resistance connected to ground and sets the
input/output level of a device to 0. The pull-down resistor sets the level to 0 when the input/output
is disconnected. When the input/output is connected, the level is determined by the device and
Basically jumper wire is an electrical wire and is used to interconnect the components of a
breadboard or any other test circuit without soldering. Jumper wires are of 20cm long with male
connectors on one end and female on the other. Use these to jumper from any male or female
header on any board. There are 3 types of jumper wires, male to male, male to female and female
to female. Female ends do not have pins and are used to plug things into, whereas male ends have
19
pins and can plug into things. The most common and the most widely used jumper wires are male
to male jumper wires. A male to male wire is used while connecting two ports on a breadboard.
Vero board is a branch of strip board, a pre-formed circuit board material of copper strips on an
insulating bonded paper board. It is a double-side prototype board, all holes are smooth and clear
2 Thickness 1.6mm
5 Dimensions 50x70mm
20
Fig 4.7: Vero Board
4.9 Buzzer
The buzzer is a cheap 5V device and can easily be controlled using the Arduino UNO PWM pin.
It has three pins but only two are used. –Pin is connected with ground and the S pin is connected
with the desired PWM pin and by using the analog write function this buzzer can be controlled. A
driver circuit is designed for connection of the buzzer with the digital pin.
Flex sensors are used for sensing position of backbone this sensor operate at 5V and give analog
values to microcontroller where we apply different condition to get real data which is used further
for processing. Microcontroller is backbone of this project which control all components working
in transmitter side if a person in bad order then sensor sense it and give value to controller for
further processing. After processing of data this data is send to application through wireless
module. The wireless module operate at 434MHz. FS1000A wireless module is used as transmitter
end.
A transmitter is an electronic device which produces radio waves with the help of antenna. A
transmitter generates a radio frequency current applied to the antenna, which in turn radiate radio
waves. A transmitter generates radio waves for communication, radar and navigational purposes.
within another electronic device. Most transmitters are used for radio communication of
information over a certain distance. The information that is provided to the transmitter is in the
form of an electronic signal. This includes video from a TV camera, audio from a microphone and
22
a digital signal for wireless networking devices. The transmitter combines the information signal
that is to be carried with the RF signal which generates the radio waves. This is called the
modulation. In an FM transmitter the information is added to the radio signal by slightly varying
the radio signals frequency. In an AM transmitter, it is added by varying its amplitude. Several
other types of modulation are also used. ICs allow high performance circuits to be built at lesser
costs with significant amounts of space saving. A transmitter is a telemetry device which converts
from a sensor into a signal and sends it usually via wires to be received by some display located at
a distance away. When transmitter and receiver are combined in one unit they are called
transceiver. The term transmitter is often abbreviated ‘XMTR’ or ‘TX’ in the technical documents.
Usually a radio consists of several elements that work together to generate radio waves that contain
Power Supply: Provides the necessary electrical power to operate the transmitter.
Oscillator: Creates alternating current at the frequency on which the transmitter will
transmit. The oscillator usually generates a sine wave which is called carrier wave.
Modulator: It adds useful information to the carrier wave. There are two ways to add this
information. The first called amplitude modulation which makes slightly increase or
decrease to the intensity of the carrier wave. The second called frequency modulation
Amplifier: Amplifier amplifies the modulated carrier wave to increase its power. The
23
4.10.1 Transmitter Module Pin Description
1 Antenna ANT
Wireless transmitter modules allows arduino to wirelessly communicate with other arduino’s or
radio frequency controlled devices that operate in the same frequency i.e. 433MHz. Both
4.10.2 Working
A transmitter is an electronic circuit which transforms electric power from a battery or electrical
mains into a radio frequency alternating current, which reverses directions millions to billions of
times per second. The energy in such a rapidly reversing current can radiate off a conductor as
electromagnetic waves. The transmitter also impresses information such as an audio or video
signal onto the radio frequency current to be carried by the radio waves. When they strike the
antenna of a radio receiver, the waves excite similar radio frequency currents in it. The radio
receiver extracts the information from the received waves. A practical radio transmitter usually
A power supply circuit to transform the input electrical power to the higher voltages needed
24
An electronic oscillator circuit to generate the radio frequency signal. This usually
generates a sine wave of constant amplitude often called the carrier wave, because it serves
to carry the information through space. In most modern transmitters this is a crystal
crystal.
A modulator circuit to add the information to be transmitted to the carrier wave produced
by the oscillator. This is done by varying some aspect of the carrier wave. The information
is provided to the transmitter either in the form of an audio signal., which represents a video
modulation signal.
In an FM transmitter the frequency of the carrier wave is varied by the modulating signal.
In an FSK transmitter which transmits digital data, the frequency of the carrier wave is
shifted between two frequencies which represents the tow binary digits 0 and 1. Many other
types of modulation are also used. In large transmitters the oscillator and modulator
An RF amplifier to increase the power of the signal, to increase the range of the radio
waves.
An impedance matching circuit to match the impedance of the transmitter to the impedance
of the antenna to transfer power efficiently to the antenna. If these impedances are not
equal, it causes a condition called standing waves, in which the power is reflected back
from the antenna toward the transmitter wasting power and sometimes overheating the
transmitter.
25
4.10.3 Applications
transmitter. Transmitters can also be found in electronic devices that communicates by radio
including wireless computer networks, garage door openers, cell phones, Bluetooth devices,
aircraft, and two way radios in ships, spacecraft, navigational beacons and radar sets. The antenna
can be enclosed inside the case or attached to the outside of the transmitter as in portable devices
including cell phones, auto keyless remotes and walkie-talkies. For more powerful transmitters,
the antenna may be located on top of a building and connected to the transmitter by a transmission
line.
4.11 Receiver
A receiver is the opposite of a transmitter. Receiver uses an antenna to capture the radio waves,
processes those waves to extract those waves that are vibrating at the desired frequency, extracts
the audio signals that were added to those waves, amplifies the audio signals, and finally plays
them on a speaker.
Antenna: Antenna captures the radio waves. Typically the antenna is simply a length of
wire. When this wire is exposed to radio waves, the waves induce a very small alternating
RF Amplifier: It is a sensitive amplifier that amplifies the very weak radio frequency
signal from the antenna so that the signal can be processed by the tuner.
Tuner: A circuit that can extract signals of a particular frequency from a mix of signals of
different frequencies. On its own, the antenna captures radio waves of all frequencies and
26
The tuner usually employs the combination of an inductor and a capacitor to form a circuit
that resonates at a particular frequency. This frequency is called the resonant frequency and
is determined by the values chosen for the coil and the capacitor. These type of circuits
tends to block any AC signals at a frequency above or below the resonant frequency.
Resonant frequency can be adjusted by varying the amount of inductance in the coil or the
capacitance of the capacitor. In simple radio receiver’s circuits, the tuning is adjusted by
varying the number of turns of wire in the coil. More sophisticated tuners use a variable
Detector: Detector is responsible for separating the audio information from the carrier
wave. For AM signals, this can be done with a diode that just rectifies the alternating
1 Ground(0V) Ground
5 Antenna ANT
4.12 RF Module
signals on one of a number of carrier frequencies. RF modules are widely used in electronic design
owing to the difficulty of designing radio circuitry. RF modules are used in medium and low
27
volume products for consumer applications such as wireless alarm systems, garage door openers,
smart sensor applications, industrial remote controls and wireless home automation systems.
The operating frequency of radio frequency module can be varied easily. But we offer two kinds
of, one of them is 433MHz and another is 315MHz. The transmission occurs at the rate of 600bps-
100Kbps. The transmitted data is received by radio frequency receiver operating at the same
Frequency 433MHz
Modulation ASK
Power)
Power)
28
CHAPTER 5
METHODOLOGY
5.1 Introduction
This chapter discusses about the working and steps which are being taken to make the project. This
project is divided into two steps one is hardware and the other is the software implementation. In
component that they work together. In software implementation we use Arduino IDE and cadsoft
eagle software. Arduino IDE is used for programming and Cadsoft eagle for schematics [11].
5.2 Overview
This ‘Human Posture Alert Jacket’ project can be used for back monitoring. The sensor location
can be selected as per requirement. As physical appearance of each person is different, some people
have thin shoulders, while others have broad shoulders and so on. This project can easily be
calibrated and can be used with any time of T-shirt or jacket. This project has low cost so it can be
afforded by anyone. It is very beneficial. The flex sensor in this project is used to monitor the
amount of bend. For monitoring the rounded shoulders flex sensors is the best choice [12].
5.3 Methodology
Poor posture and adequate back support can add strain to muscles and put stress on the spine. To
avoid this and to improve the poor posture we introduced a system which will monitor the back all
the day long and can alert within seconds so that the person can adjust his posture otherwise the
beep will keeping buzzing. For this system a t-shirt or a jacket can be designed or we can use a
readymade one. This t-shirt or jacket will be having sensors (the numbers of sensors can be
29
5.4 Software Features
Arduino IDE and Cadsoft eagle software is used in this project. Arduino IDE is used for
Arduino IDE (Integrated Development Environment) is a cross platform application that is written
in the programming language java. Arduino IDE is used to write and upload programs to the
arduino board. The languages that supports the arduino IDE are C and C++ using special rules of
code structuring.
Eagle stands for Easy Applicable Graphical Layout Editor. It is a scriptable electronic design
automation (EDA) application with schematic capture, printed circuit board (PCB) layout, auto
30
CHAPTER 6
Quality assurance is very important for any product to perform satisfactorily and reliably after
deployment. In order to achieve these goals, each module of the system is tested individually. The
whole system is tested to see whether the goals are accomplished or not. This chapter consists of
evaluation of the process and the outcome of various tests designed specifically to ensure reliability
of the system.
Human Posture Monitoring is especially designed for monitoring the good or poor posture. If
posture is not fixed it leads to so many types of back problems. So we have designed the project
in which the microcontroller send the posture data to the computer, where the status of good or
poor posture will be displayed [14]. This simulation display the status of good posture.
Human Posture Monitoring is especially designed for monitoring the good or bad posture. If
posture is not fixed it leads to so many types of back problems. So we have designed the project
in which the microcontroller send the posture data to the computer, where the status of good or
poor posture will be displayed. Besides this it will also give a sound alert to the person wearing
this jacket or t-shirt which consists of the sensor. This simulation display the status of poor posture.
Human Posture Monitoring is especially designed for monitoring the good or bad posture. If
posture is not fixed it leads to so many types of back problems. So we have designed the project
in which the microcontroller send the posture data to the computer, where the status of good or
32
poor posture will be displayed. Besides this it will also give a sound alert to the person wearing
this jacket or t-shirt which consists of the sensor. In this simulation the transmitter sends the data
of good posture to the receiver and the status of good posture displays on the computer screen.
33
CHAPTER 7
7.1 Conclusion
Human Posture Monitoring is especially designed for monitoring the good or poor posture. If the
posture is not fixed it leads to so many types of back problems, one of the major problem is the
Sciatica. Sciatica are the symptoms of pain, numbness, and/or weakness that radiate along the
sciatic nerve from the lower back to the buttocks and legs. More than 80% of the people suffer
from back problems, which is due to the result of good or poor posture. So that’s why we have
designed a project which will monitor the human posture. This system will monitor the back all
the day long and can alert within seconds so that the person can adjust his posture otherwise the
beep will keeping buzzing. For this system a t-shirt or a jacket can be designed or we can use a
readymade one. This t-shirt or jacket will be having sensors (the numbers of sensors can be
increased or decreased), a microcontroller and a battery. It has low cost, can be easily modified,
can be used by any age person. It eliminates the back pain and the posture data can be seen
The future scope of this project is defined by its design and working. It’s an innovative idea for
monitoring the good or poor posture. The sensors will monitor the back all the day long and can
alert within seconds so that the person can adjust his posture otherwise the beep will keeping
buzzing. This project can also be used to monitor the angle in a general way. This idea can be
34
REFERENCES
[1] P.D.. Adamczyk and B.P. Bailey, “A Method and System for Intelligent Interruption
Management,” in proc. 4th International Workshop on TAsk MOdels and DIAgrams for user
[2] A. Adamek, N.E. O’Connor, and G. Jones, “An Integrated Approach for Object Shape
[3] “Attentive User Interfaces,” special issue, Communications of the ACM, (J. Vertegaal, ed.),
[4] O. Basir, D. Bullock, and E. Breza, “Visual classification and posture estimation of multiple
[5] B. Boulay, F. Bremond, and M. Thonnat, “Human Posture Recognition in Video Sequence,”
in pro. Joint IEEE International Workshop on VS-PETS, pp.23-29, Nice, France,Oct. 11-12,
2003
[6] M.-S. Chuang, and M.-S. Huang, “System and method for detecting unhealthy operation
[7] R. Cucchiara, C. Grana, A. Prati, and R. Vezzani, “Probabilistic Posture Classification for
Human-Behavior Analysis,” IEEE Transactions on Systems, Man, and Cybernetics, Vol. 35, No.1,
January 2005.
35
[9] A. Elgammal, V. Shet, Y. Yacoob, L. S. Davis, “Gesture Recognition using a Probabilistic
Framework for Pose Matching,” The Seventh International Conference on Control, Automation,
[11] H. Ikeda, M. Maeda, N. Kato, and H. Kashimura, “Classification of Human Actions Using
Face and Hands Detection,” in proc. ACM Multimedia 2004, New York City, Oct. 2004.
[12] S. Illic, M. Salzmann, and P. Fua, “Implicit Surfaces Make for Better Silhouettes,” Computer
Vision and Pattern Recognition, (1) 2005: 1135-1141. San Diego, CA, June 2005.
[13] A. Jaimes, J. Liu, and N. Sebe, "Affective Meeting Video Analysis," in proc. IEEE ICME
[14] M. Kölsch, A. C. B., and M. Turk, “Postural Comfort Zone for Reaching Gestures,” in HFES
[15] H. Nomura and T. Shima, “Image feature extraction apparatus, method of extracting image
36
APPENDIX
Transmitter Code
#include <VirtualWire.h>
int flexs = A0; // flex sensor is connected with pin A0 of the arduino
int flexdata = 0;
int buzzer = 5;
String str;
char cstr[27];
void setup()
vw_set_tx_pin(transmit_pin);
Serial.begin(9600);
pinMode(flexs, INPUT);
pinMode(buzzer, OUTPUT);
void loop()
flexdata = analogRead(flexs);
Serial.print("flex value;");
Serial.print(flexdata);
37
Serial.println("");
analogWrite(buzzer, 150);
analogWrite(buzzer, 0);
str = String(flexdata);
str.toCharArray(cstr,27);
vw_send((uint8_t *)cstr, 5); // change this number according to the sensor values
delay(1000);
Receiver Code
#include <VirtualWire.h>
String message;
void setup()
delay(1000);
38
Serial.begin(9600); // Debugging only
Serial.println("setup");
vw_set_rx_pin(receive_pin);
void loop()
uint8_t buf[VW_MAX_MESSAGE_LEN];
int i;
//Serial.print("Got: ");
char c = (buf[i]);
message = message + c ;
// Serial.print(message);
// message = "";
39
// Serial.print(' ');
Serial.println(message);
message = "";
delay(2000);
Application Interface
Code:
Imports System.IO
Imports System.IO.Ports
40
Dim value2 As Decimal
Handles MyBase.Load
SerialPort1.Close()
SerialPort1.PortName = "com7"
SerialPort1.BaudRate = "9600"
SerialPort1.DataBits = 8
SerialPort1.Parity = Parity.None
SerialPort1.StopBits = StopBits.One
SerialPort1.Handshake = Handshake.None
SerialPort1.Encoding = System.Text.Encoding.Default
SerialPort1.Open()
End Sub
Handles Timer1.Tick
Dim s As String
TextBox2.Text = somestring(0)
Try
value1 = Convert.ToDecimal(TextBox2.Text)
41
Catch ex As Exception
TextBox1.Text = ""
End Try
TextBox3.Text = somestring(1)
Try
value2 = Convert.ToDecimal(TextBox3.Text)
Catch ex As Exception
TextBox1.Text = ""
End Try
TextBox4.Text = somestring(2)
Chart1.Series("Raw").Points.AddY(value2)
Chart1.Series("Data").Points.AddY(value1)
TextBox1.Text = ""
End Sub
Handles SerialPort1.DataReceived
Try
mydata = SerialPort1.ReadExisting()
If TextBox1.InvokeRequired Then
Else
42
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
43