Night shift workers

Night shift workers


Fatigue, a common problem for most night shift workers which includes drivers, security shifts and factory workers, might be easily neglected and can be a potential threat to individual safety. In fact, there is a lot of evidence showing that fatigued drivers pose serious danger to road safety and are more prone to traffic accidents. Most studies related to fatigued driving focus on ‘‘endogenous” factors of drivers, such as sleep deprivation, time of day and prolonged driving. Driving on road stretches with different complexities ,then to respond to different task demands definitely causes a certain level of fatigue. There are two forms of driver's fatigue, active and passive, and may be ascribed to overload and under-load driving conditions respectively. In complex road with high load traffic conditions, because of the need of actively maneuvering vehicle controls (e.g. steering, braking and accelerating) drivers may suffer from active fatigue. On the other hand, in monotonous low-load road environments, drivers only taking on a supervisory role may have passive fatigue. Similarly the workload for the night shift workers in industries also leads to fatigue and hence can result in accidents due to improper handling of the machinery. The night security will also be tired due to prolonged time of sleeplessness and hence pose threat to safety of the companies which they work in.

Fatigue detection systems have been developed by tracking the eye blink and also the EEG of the person. In this system we are making use of two types of sensors. One is the eye sensor which gives the output according to the reflectivity of the IR from the eye. A logic high is given when the reflectivity is high (i.e. when the eyes are closed) and a logic low is obtained when the reflectivity is low (i.e. when the eyes are open). In addition to this the tilt sensor is also used which detects the tilt of the head above a particular angle. It gives logic high when the switch is open due to tilt. Depending on the output from both these sensors alarm circuit is driven.

This system is beneficial for :

  • Those who drive for long periods of time taking long trips or truck drivers who are awake for long periods of time to deliver goods.
  • In the manufacturing industries where workers stay awake during critical late night hours while operating heavy and dangerous machinery.
  • When the user has to stay awake in the late night security shifts will also benefit from such a system.

Fatigue is a main safety concern in many fields especially in transportation, pilots, truck drivers, and shift workers, because, fatigue can lead to disastrous accidents. Fatigue is considered as a precondition for unsafe acts because it affects the human operator's internal state. Fatigue can be a symptom of a medical problem, but more commonly it is a normal physiological reaction to lack of sleep, boredom and changes to sleep-wake schedules or stress.

Fatigue is different from drowsiness. In general, drowsiness is feeling the need to sleep, while fatigue is a lack of energy and motivation. Drowsiness and apathy (a feeling of indifference or not caring about what happens) can be symptoms that go along with fatigue.

Fatigue is a common symptom which is usually not due to a serious disease. However, it can also be a non-specific sign of a more serious psychological or physical disorder.

Types of fatigue:

Physical fatigue

Physical fatigue or muscle weakness is a direct term for the inability to exert force with one's muscles to the degree that would be expected given the individual's general physical fitness.

A test of strength is often used during a diagnosis of a muscular disorder before the etiology can be identified. Such etiology depends on the type of muscle weakness, which can be true or perceived as well as central or peripheral. True weakness is substantial, while perceived rather is a sensation of having to put more effort to do the same task. On the other hand, central muscle weakness is an overall exhaustion of the whole body, while peripheral weakness is an exhaustion of individual muscles.

Mental fatigue

In addition to physical, fatigue also includes mental fatigue, not necessarily including any muscle fatigue. Such a mental fatigue, in turn, can manifest itself both as somnolence or just as a general decrease of attention, not necessarily including sleepiness. It may also be described as more or less decreased level of consciousness. In any case, this can be dangerous when performing tasks that require constant concentration, such as driving a vehicle. For instance, a person who is sufficiently somnolent may experience small sleep periods.

Effect of fatigue on the heart:

Circadian rhythmic effects describe the tendency of humans to experience a normal cycle in attentiveness and sleepiness throughout the day. People with a conventional sleep pattern experience periods of maximum fatigue in the early hours of the morning and a lesser period in the early afternoon. During the negative points of this cycle, one experiences reduced attentiveness. During the positive points, it is difficult to get a sound sleep. The cycle is influenced in part by ambient lighting (dark surrounding causes a person's body to release the hormone, melatonin, which induces sleep), by a person's sleep pattern and waking times. The influence of the day-night cycle is never fully displaced (artificial lighting is not strong enough to inhibit the release of melatonin), and the performance of night shift workers usually suffers. Circadian rhythms are persistent and can only be shifted by a few hours forward or backward per day. Changing the starting time of a work shift by more than these amounts will reduce attentiveness, which is common after the night shift following a weekend break, during which conventional sleep times might be present. Lack of sufficient sleep can produce various effects, depending on the person.

Insomnia and fatigue:

Sleep deprivation and effects of fatigue describe how individuals who don't have an adequate period of sleep or those who remain awake longer than the conventional 16-17hours per day, will suffer from sleep deprivation. A sleep deficit accumulates with successive sleep-deprived days, additional fatigue may be caused by breaking daily sleep into shorter periods in place of a single unbroken period of sleep. A sleep deficit is not instantly reduced by one night's sleep, it may take two or three normal sleep cycles for an individual to return to performance.

Industrial fatigue:

Industrial fatigue describes fatigue that is accumulated during the working hours, affects the person's performance at different times during the shift. If the person is engaged in a task for a long time, then his or her performance gradually declines during the first few hours and more steeply towards the end of a long period at work. Reduced performance has also been observed in the first hour of work as an individual adjusts to the working environment.

Fatigue Causes:

Sleep disturbances, Heart diseases, Lung diseases, Nutritional disorders, Electrolyte disturbances, Endocrine disorders , Gastrointestinal disorders , Neurological disorders , Infectious causes , Connective tissue disorders, General disorders, Exercise disturbance and Psychological.

The input from the eye sensor and tilt sensors are encoded to get a single input and then transmitted using a wireless transmitter and then received. The data received is decoded to two different inputs and fed to the PIC which is programmed to drive the alarm circuit which has three types of alarms.



Infrared radiation (IR) is electromagnetic radiation with a wavelength between 0.7 and 300 micrometers, which equates to a frequency range between approximately 1 and 430 THz.

A light-emitting diode (LED) is a semiconductor diode that emits incoherent narrow-spectrum light when electrically biased in the forward direction of the p-n junction, as in the common LED circuit. This effect is a form of electroluminescence.

An LED is usually a small area source, often with extra optics added to the chip that shapes its radiation pattern. LED's are often used as small indicator lights on electronic devices and increasingly in higher power applications such as flashlights and area lighting. The colour of the emitted light depends on the composition and condition of the semiconducting material used, and can be infrared (IR LED), visible, or near-ultraviolet. An LED can be used as a regular household light source.

LEDs are produced in an array of shapes and sizes. The 5 mm cylindrical package (red, fifth from the left) is the most common, estimated at 80% of world production.

The colour of the plastic lens is often the same as the actual colour of light emitted, but not always. For instance, purple plastic is often used for infrared LEDs (or IR LED), and most blue devices have clear housings.

Infrared receiver

An input signal is received with the photodiode. The receiver circuit is configured to suppress feedback from an output terminal of the receiver circuit to the photodiode by amplifying the input signal to produce an amplified input signal, controlling the gain of the input signal amplification responsive to the magnitude of the amplified input signal, comparing the amplified input signal to a detection threshold voltage to produce a digital data signal, and holding the gain at a substantially constant level in response to a fast signal transition in the digital output signal.

The IR receiver has a rating of 2V and 20 mA. A supply of 5V needs to be provided for the same.


Light output should be directly proportional to current, thus the actual intensity used in this project is less than stated in the data sheet. The wavelength of IR that is permissible for exposure to eyes is around 900nm. The IR LED is thus chosen so that it does not harm the eyes. The distance at which the LED should be kept should also be decided in such a way to avoid excess exposure and thereby prevent eyes from getting affected.


The tilt sensors have mercury which is displaced upon tilt and this determines the voltage that is delivered from the sensor.

The sensor consists of two leads and mercury enclosed in glass casing. When the mercury is in position connecting the two leads high voltage is obtained. When the mercury is in the opposite end during tilt, the connection between leads is broken and hence a low voltage is obtained which is used as the reference to trigger the alarm.


Encoder is a device that converts one form of code to another for the sake of standardisation, secrecy, security or saving space by reducing size.

Here we use the encoder to convert the two inputs from the eye and the tilt sensors to a single input and then transmit it.

The encoder used is HT 12E.


  • Operating voltage:2.4-12V.
  • Less power consumption and high noise immunity.
  • Very low standby current: 0.1A at a Vdd of 5V.
  • Transmission of four words at a time.
  • HT12E has a built-in oscillator that needs only 5% resistance.
  • Data code has positive polarity.
  • Requires minimal external components.

General Description

The 212 HT12E encoders are a series of CMOS LSIs for remote control applications. They are capable of encoding information that has N address bits and 12-N data bits. Each address/data input can be set to either of the two logic states. The programmed addresses/data are transmitted together with the header bits through an RF or an IR transmission medium when a trigger signal is received. The capability to select a TE trigger on the HT12E further improves the flexibility in the usage of the 212 series of encoders.

The 212 series of encoders begin a 4-word transmission cycle upon receipt of a transmission enable. This cycle will repeat itself as long as the Transmission enable (TE) is held low. Once the transmission enable returns high the encoder output completes its final cycle and then stops as shown below.


If L/MB=1 the device is in the latch mode (for use with the latch type of data decoders). When the transmission enable is removed during a transmission, the DOUT pin outputs a complete word and then stops. On the other hand, if L/MB=0 the device is in the momentary mode (for use with the momentary type of data decoders). When the transmission enable is removed during a transmission, the DOUT outputs a complete word and then adds 7 words all with the “1” data code.

An information word consists of 4 periods as illustrated below.

Address/data programming (preset)

The status of each address/data pin can be individually pre-set to logic “high” or “low” If a transmission-enable signal is applied, the encoder scans and transmits the status of the 12 bits of address/data serially in the order A0 to AD11 for the HT12E encoder.

During information transmission these bits are transmitted with a preceding synchronization bit. If the trigger signal is not applied, the chip enters the standby mode and consumes a reduced current of less than 1micro ampere for a supply voltage of 5V.

Usual applications preset the address pins with individual security codes using DIP switches or PCB wiring, while the data is selected by push buttons or electronic switches.

Transmission enable

For the HT12E encoders, transmission is enabled by applying a low signal to the TE pin. For the HT12A encoders, transmission is enabled by applying a low signal to one of the data pins D8~D11.

Wireless transmitter T-DS-3(433.92MHz):

Generally in communication and information processing, a transmitter is any object (source) which sends information to an observer (receiver). When used in this more general sense, vocal chords may also be considered an example of a transmitter.

In radio electronics and broadcasting, a transmitter usually has a power supply, an oscillator, a modulator, and amplifiers for audio frequency (AF) and radio frequency (RF). The modulator is the device which piggybacks (or modulates) the signal information onto the carrier frequency, which is then broadcast. A "transmitter" is any device which converts measurements from a sensor into a signal to be received, usually sent via wires, by some display or control device located a distance away.

Modulation is the process of varying one or more properties of high frequency periodic waveform, called the carrier signal, with respect to a modulating signal. The three key parameters of a periodic waveform are its amplitude , its phase and its frequency , all of which can be modified in accordance with a low frequency signal to obtain the modulated signal. Typically a high-frequency sinusoid waveform is used as carrier signal, but a square wave pulse train may also occur.

Digital modulation techniques:

In digital modulation, an analog carrier signal is modulated by a digital bit stream. Digital modulation methods can be considered as digital-to-analog conversion, and the corresponding demodulation or detection as analog-to-digital conversion. The changes in the carrier signal are chosen from a finite number of M alternative symbols.

Amplitude-shift keying (ASK) is a form of modulation that represents digital data as variations in the amplitude of a carrier wave. The amplitude of an analog carrier signal varies in accordance with the bit stream (modulating signal), keeping frequency and phase constant. The level of amplitude can be used to represent binary logic 0s and 1s. We can think of a carrier signal as an ON or OFF switch. In the modulated signal, logic 0 is represented by the absence of a carrier, thus giving OFF/ON keying operation and hence the name given.

Here the Radio frequency is used for transmission. The frequency ranges from 3KHz to 300GHz.When an RF current is supplied to an antenna, it gives rise to an electromagnetic field that propagates through space. This field is sometimes called an RF field. Any RF field has a wavelength that is inversely proportional to the frequency. In the atmosphere or in outer space, if f is the frequency in megahertz and s is the wavelength in meters, then

s = 300/f

The frequency of an RF signal is inversely proportional to the wavelength of the EM field to which it corresponds. At 9 kHz, the free-space wavelength is approximately 33 kilo meters (km) or 21 miles (mi). At the highest radio frequencies, the EM wavelengths measure approximately one milli meter (1 mm).


  • Frequency range:433.92MHz
  • Modulate Mode: ASK
  • Data rate:8KBps
  • Current: 23mA(5V);40mA(9V); 53mA(12V)
  • Power: 10dBm(5V);14.5dBm(9V);16.6dBm(12V)
  • Working temperature: -40-+85

Wireless Receiver RXD1 -434MHz

A radio receiver is an electronic circuit that receives its input from an antenna, uses electronic filters to separate a wanted radio signal from all other signals picked up by this antenna, amplifies it to a level suitable for further processing, and finally converts through demodulation and decoding the signal into a form usable for the consumer, such as sound, pictures, digital data, measurement values and navigational positions.

The diagram below shows the basic elements of a single conversion superheterodyne receiver. The essential elements of a local oscillator and a mixer followed by a fixed-tuned filter and IF amplifier are common to all superheterodyne circuits. Cost-optimized designs may use one active device for both local oscillator and mixer—this is sometimes called a "converter" stage.

Receiver block diagram:

The advantage to this method is that most of the radio's signal path has to be sensitive to only a narrow range of frequencies. Only one or two tuned stages need to be adjusted to track over the tuning range of the receiver; all the intermediate-frequency stages operate at a fixed frequency which need not be adjusted.

To overcome obstacles such as image response, multiple IF stages are used, and in some case multiple stages with two IFs of different values. Receivers which are tunable over a wide bandwidth may use an intermediate frequency higher than the signal, in order to improve image rejection.

Superheterodyne receivers have superior characteristics to simpler receiver types in frequency stability and selectivity. They offer much better stability than Tuned radio frequency receivers (TRF) because a tunable oscillator is more easily stabilized than a tunable amplifier, especially with modern frequency synthesizer technology. IF filters can give much narrower pass bands at the same Q factor than an equivalent RF filter. A fixed IF also allows the use of a crystal filter when exceptionally high selectivity is necessary.






  • Supply Current- max 3.6mA
  • VCC- +4.75(min)- +5.25(max)
  • Data Rate- 200bps(min) - 6K(max)


A decoder is a device which does the reverse of an encoder, undoing the encoding so that the original information can be retrieved. The same method used to encode is usually just reversed in order to decode.


  • Operating voltage: 2.4V-12V
  • Less power consumption and high noise rejection ratio.
  • Very low standby current.
  • Ability to decode 12 bits of information.
  • Received codes are checked 3 times.
  • HT12D has a built-in oscillator needs only 5% resistance.
  • It has a transmission indicator.
  • Easy interface with an RF or IR transmission medium.
  • Requires minimal external components.
  • 18-pin Dual in line package.

General Description:

The decoders receive addresses and data from programmed 212 series of encoders that are transmitted by a carrier in an RF or IR transmission medium. For proper operation, a pair of encoder/decoder with the same number of addresses and data format must be used.

The decoders compare the serial input data three times continuously with their local addresses. If unmatched codes are not found, then the input data codes are

decoded and transferred to the output pins. The VT pin goes high to indicate a valid transmission. The 212 series of decoders are capable of decoding information that has N bit address and 12-N bit data. The HT12D is designed to provide 8 address bits and 4 data bits.


The 212 series of decoders provides various combinations of addresses and data pins in different packages so as to pair with the 212 series of encoders.

The decoders receive data that are transmitted by an encoder and interpret the first N bits of code period as addresses and the last 12-N bits as data, where N is the address code number. A signal on the DIN pin activates the oscillator which in turn decodes the incoming address and data. The decoders will then check the received address three times continuously. If the received address codes all match the contents of the decoders local address, the 12-N bits of data are decoded to activate the output pins and the VT pin is set high to indicate

a valid transmission. This will last unless the address code is incorrect or no signal is received. The output of the VT pin is high only when the transmission

is valid. Otherwise it is always low.

PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1640[1] originally developed by General Instrument's Microelectronics Division.

Analog Features:

  • 10-bit, up to 8-channel Analog-to-Digital Converter (A/D)
  • Analog Comparator module with:

- Two analog comparators

- Programmable on-chip voltage reference

(VREF) module

- Programmable input multiplexing from device inputs and internal voltage reference

- Comparator outputs are externally accessible

Special Microcontroller Features:

  • 100,000 erase/write cycle Enhanced Flash program memory typical
  • 1,000,000 erase/write cycle Data EEPROM memory typical
  • Data EEPROM Retention > 40 years
  • Self-reprogrammable under software control
  • Single-supply 5V In-Circuit Serial Programming
  • Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation
  • Programmable code protection
  • Power saving Sleep mode
  • Selectable oscillator options

Pin description:

PIC 16F877a has 5 ports namely port A, port B, port C, port D and port E

Port C is used for receiving the data from the opto and tilt sensors. Pins RD0,RD1 and RD3 in port D are used for triggering the three alarm circuits(sensory, visual and audio alarms).


The alarm circuit can be operated in three modes viz.

  • Low mode (vibrating alarm) - this is activated when the person's eyes are closed or when he tilts the head due to fatigue.
  • Medium mode (Audio alarm) - this is triggered when the person is sleepy and also tilts his head.
  • High mode (visual alarm) - when the person does not respond to both the alarms, the visual alarm is triggered to alert the people in the vicinity.

The vibrator alarm is to alert the user that he is drowsy and there is a risk of him meeting with an accident. This is achieved by packing the vibrator in a soft material and placing it in contact with the user. The ideal position would be between the user's neck and the head rest.

The visual alarm is triggered when the user does not respond to the other alarms. This can be placed in the surrounding so that people nearby can alert the user.

Each of the blocks is described in more detail below:

  • Transformer - steps down high voltage AC mains to low voltage AC.
  • Rectifier - converts AC to DC, but the DC output is varying.
  • Smoothing - smoothens the DC from varying greatly to a small ripple.
  • Regulator - eliminates ripple by setting DC output to a fixed voltage

Power supply circuit diagram:

The switching circuit has two parts: opto sensor and BJT. The IR LED emits infra red rays at a wavelength of 900nm. When there is an obstruction to the LED, the base voltage decreases and the transistor goes to cut off region. In the cut off region, the transistor turns off, therefore the output from the collector (5V) triggers the alarm. In normal case the base voltage is increased and hence the transistor is in saturation region (turned on) and the output obtained is 0 volts.

The switching circuit has two parts: tilt sensor and BJT. The mercury tilt determines the input. When there is a tilt, the base voltage decreases and the transistor goes to cut off region. In the cutoff region, the transistor turns off, therefore the output from the collector (5V) triggers the alarm. In normal case the base voltage is increased and hence the transistor is in saturation (turned on) and the output obtained is 0 volts.

RESET circuit

The pull up resistor connected to the MCLR pin connects it to the ground and switches it to the reset mode. If the pull up resistor is omitted the PIC will remain in the reset mode and not execute the program.

Oscillator circuit:

The function of an oscillator circuit is to provide an accurate and stable periodic clock signal to a microcontroller. The frequency of this clock signal can range from a few kilohertz to tens of megahertz and determines how quickly the microcontroller executes its instructions. Most microcontrollers include

a clock driver circuit which is designed to drive a quartz crystal into oscillation. The clock driver circuitry built into the PIC micro family is very flexible and allows for four different clocking options:

clock signal supplied from another oscillator, an R-C clock (based on a resistor-capacitor charging time constant), a ceramic resonator, or a crystal oscillator. An R-C clock circuit is the simplest but does not provide accurate timing since both resistor and capacitor values can vary greatly with temperature. Crystal oscillator and ceramic resonator-based clock circuits provide the most stable and accurate time bases, and require only a few extra parts than a simple R-C oscillator

The clock circuit consists of two capacitors and a quartz crystal or ceramic resonator. The values of capacitors is determined by both the clock speed at which the PIC is run, and by the selection of a quartz crystal or a ceramic resonator as the clock source.

When there is an input to the alarm circuit from the PIC, the transistor is turned on(saturation region). Hence the output from the transistor decreases and this gives a positive trigger to the alarm (buzzer and vibrator) as the other end of alarm circuit is connected to power supply.

Visual alarm:

Relay circuit-

A relay is a switch that is controlled by turning an electric circuit on or off.

Connecting the Switch:

The electrical relay is an electromagnetic SPDT--single pole, double throw--switched relay. These relays have five connections:

Two Coil terminals: when current flows through these terminals, the electromagnet is energized, which in turn moves the switch from closed position to open( NC to NO), to engage the relay.
One Common terminal: this terminal is connected to the device to be powered in the relay circuit. NO(normally open) terminal: energizing the coil will create a magnetic field, which will pull the switch to this terminal and engage the relay. When the switch is connected to the NO terminal, the relay is said to be engaged. NC(normally closed)terminal: the relay is in its off position when the switch is connected to this terminal. This is the default position of the relay switch.
When using a low-power electric circuit to engage a relay, the two coil ends must be connected, one end to the negative terminal of the circuit and the other end to a switch. A commonly used switch for the control circuit is a SPST--single pole, single throw--switch that is either open or closed. The other terminal on the switch must be connected to the positive terminal of the electrical circuit.
The positive terminal on a high-power power source should be connected to the NO terminal. The Common terminal should be connected to the device that has to be powered. The NC connection can either be connected to the high-power source negative terminal/electrical ground, or it can simply remain disconnected.


The system was designed in such a way that the following criteria were satisfied

  • Safe and lightweight
  • Strong and durable
  • Simple construction and easy to manufacture
  • A device that is effective in operation
  • A device that would give different degree of alarm for different level of sleepiness

The possible improvements that can be made

  • A device that uses an alternate for mercury switches which might prove to be dangerous in case of accidents
  • A device with size compatible for all ages


PIC Coding





#define relay RD3

#define vib RD0

#define buzzer RD1

void caldelay(unsigned long int aa ,unsigned long int bb);

bit count;

void main()












































































void caldelay(unsigned long int aa ,unsigned long int bb)


int i,j,k,l;








// for(j=0;j<bb;j++)

// {

// for(i=0;i<bb;i++)

// {


// }




Please be aware that the free essay that you were just reading was not written by us. This essay, and all of the others available to view on the website, were provided to us by students in exchange for services that we offer. This relationship helps our students to get an even better deal while also contributing to the biggest free essay resource in the UK!