You are on page 1of 35

REMOTE STEPPER MOTOR CONTROL BASED ON EMBEDDED SYSTEM

Objective
The objective of our project is Remote Stepper Motor Control Based on Embedded
System
Brief Methodology
This project is designed with,
Hardware Requirements
 Microcontroller-16F877A
 RF-Modules
 Oscillator Circuit
 Mosfet Driver
 Mosfet
 Keypad
 Power Supply
Software requirements
 MPLAB Software
 Embedded C- Language
 PicKit-2(Programming Kit)

Working Principle

While switch on the power supply of the transmitter and the receiver modules the signal
is inter communicate between both the modules. Transmitter is connected with keypad and
receiver is interface with microcontroller.

When the transmitter give signal to the receiver, the microcontroller get the data and
rotate the stepper motor and the communication between the transmitter and receiver through
radio frequency modulation (433MHz).
BLOCKDIAGRAM
PIC Microcontroller

 PIC is a family of modified Harvard architecture microcontrollers made by Microchip


Technology
 The PIC initially referred to “peripheral interface controller”.
 High –performance RISC CPU.
 Only 35 Signal word instructions to learn.

Operating Speed:

 0– 20 MHz Clock input.


 0 – 200ns instruction cycle
 Timer: 8-bit timer/counter with 8-bit pre scalar.
 Timer1: 16-bit timer /counter with pre scalar can be incremented during sleep via
external crystal /clock.
 Timer2: 8-bit timer/counter with 8 bit period register, pre-scaler and postscaler.

RF-MODULES

An RF module (radio frequency module) is a (usually) small electronic device used to


transmit and/or receive radio signals between two devices. In an embedded it is often desirable to
communicate with another device wirelessly.

This wireless communication may be accomplished through optical communication or


through radio frequency (RF) communication.

For many applications the medium of choice is RF since it does not require line of sight.
RF communications incorporate a transmitter and/or receiver.

Transmitter modules

An RF transmitter module is a small PCB sub-assembly capable of transmitting a radio


wave and modulating that wave to carry data. Transmitter modules are usually implemented
alongside a micro controller which will provide data to the module which can be transmitted.
Receiver modules

An RF receiver module receives the modulated RF signal, and demodulates it. There are


two types of RF receiver modules: super heterodyne receivers and super-regenerative receivers.
Super-regenerative modules are usually low cost and low power designs using a series of
amplifiers to extract modulated data from a carrier wave.

POWER SUPPLY

Block Diagram

The ac voltage, typically 220V rms, is connected to a transformer, which steps that ac voltage
down to the level of the desired dc output. A diode rectifier then provides a full-wave rectified
voltage that is initially filtered by a simple capacitor filter to produce a dc voltage. This resulting
dc voltage usually has some ripple or ac voltage variation.

A regulator circuit removes the ripples and also remains the same dc value even if the input dc
voltage varies, or the load connected to the output dc voltage changes. This voltage regulation is
usually obtained using one of the popular voltage regulator IC units.

TRANSFORMER RECTIFIER FILTER IC REGULATOR LOAD

Fig 2.1 Block Diagram of Power supply


Working principle

Transformer

The potential transformer will step down the power supply voltage (0-230V) to (0-6V) level.
Then the secondary of the potential transformer will be connected to the precision rectifier,
which is constructed with the help of op–amp. The advantages of using precision rectifier are it
will give peak voltage output as DC, rest of the circuits will give only RMS output.
Bridge rectifier

When four diodes are connected as shown in figure, the circuit is called as bridge rectifier.
The input to the circuit is applied to the diagonally opposite corners of the network, and the
output is taken from the remaining two corners.
Let us assume that the transformer is working properly and there is a positive potential, at point
A and a negative potential at point B. the positive potential at point A will forward bias D3 and
reverse bias D4.
The negative potential at point B will forward bias D1 and reverse D2. At this time D3 and D1
are forward biased and will allow current flow to pass through them; D4 and D2 are reverse
biased and will block current flow.
The maximum voltage that appears across the load resistor is nearly-but never exceeds-500
v0lts, as result of the small voltage drop across the diode. In the bridge rectifier shown in view B,
the maximum voltage that can be rectified is the full secondary voltage, which is 1000 volts.
Therefore, the peak output voltage across the load resistor is nearly 1000 volts. With both
circuits using the same transformer, the bridge rectifier circuit produces a higher output voltage
than the conventional full-wave rectifier circuit.
IC voltage regulators

Voltage regulators comprise a class of widely used ICs. Regulator IC units contain the
circuitry for reference source, comparator amplifier, control device, and overload protection all
in a single IC. IC units provide regulation of either a fixed positive voltage, a fixed negative
voltage, or an adjustably set voltage. The regulators can be selected for operation with load
currents from hundreds of milli amperes to tens of amperes, corresponding to power ratings from
milli watts to tens of watts.
Fig 2.2 Circuit Diagram of Power Supply

A fixed three-terminal voltage regulator has an unregulated dc input voltage, Vi, applied to
one input terminal, a regulated dc output voltage, Vo, from a second terminal, with the third
terminal connected to ground.

The series 78 regulators provide fixed positive regulated voltages from 5 to 24 volts.
Similarly, the series 79 regulators provide fixed negative regulated voltages from 5 to 24 volts.
 For ICs, microcontroller, LCD --------- 5 volts
 For alarm circuit, op-amp, relay circuits ---------- 12 volts
EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE

Understand User
Requirements

Choose Optimum
Electronic Chip

S/W Side
H/W Side

HLL/ALL
PCB Layout Design

Algorithm

Coding/Editing Assembling
Compiling/Assembling Components

Debugging

Testing Testing

Simulator

S/W H/W

Download

ICE (In-Circuit
Emulator)

Embedded Product

Figure – 13 Embedded Product Development Life Cycle


INTEL’S 8051 ARCHITECTURE

The generic 8031 architecture sports a Harvard architecture, which contains two separate
buses for both program and data. So, it has two distinctive memory spaces of 64K X 8 size for
both program and data. It is based on an 8 bit central processing unit with an 8 bit Accumulator
and another 8 bit B register as main processing blocks. Other portions of the architecture include
few 8 bit and 16 bit registers and 8 bit memory locations.

Each 8031 device has some amount of data RAM built in the device for internal
processing. This area is used for stack operations and temporary storage of data.

This base architecture is supported with onchip peripheral functions like I/O ports,
timers/counters, versatile serial communication port. So it is clear that this 8031 architecture was
designed to cater many real time embedded needs.

The following list gives the features of the 8051 architecture:

 Optimized 8 bit CPU for control applications.


 Extensive Boolean processing capabilities.
 64K Program Memory address space.
 64K Data Memory address space.
 128 bytes of onchip Data Memory.
 32 Bi-directional and individually addressable I/O lines.
 Two 16 bit timer/counters.
 Full Duplex UART, On-chip clock oscillator.
 6-source / 5-vector interrupt structure with priority levels.
Now you may be wondering about the non mentioning of memory space meant for the
program storage, the most important part of any embedded controller. Originally this 8031
architecture was introduced with onchip, ‘one time programmable’ version of Program Memory
of size 4K X 8. Intel delivered all these microcontrollers (8051) with user’s program fused inside
the device. The memory portion was mapped at the lower end of the Program Memory area. But,
after getting devices, customers couldn’t change any thing in their program code, which was
already made available inside during device fabrication.
Figure 1 - Block Diagram of the 8031 Core

So, very soon Intel introduced the 8031 devices (8751) with re-programmable type of
Program Memory using built-in EPROM of size 4K X 8. Like a regular EPROM, this memory
can be re-programmed many times. Later on Intel started manufacturing these 8031 devices
without any onchip Program Memory.

Now I go ahead giving more information on the important functional blocks of the 8031.

DIFFERENCES BETWEEN MICROCONTROLLER AND MICROPROCESSOR:

 Microprocessors have many instructions for moving data from external memory to internal
memory. But microcontrollers have a few such instructions.
 Microprocessors have less bit handling instructions, but microcontrollers have many such
instructions.
 Microprocessors are concerned with rapid movement of code and data from external
memory. But Microcontroller is concerned with that of bits within the chip.
 Of course Microprocessor needs additional chips for memory, parallel port, timer etc and
microcontroller needs no such external ports.
PIC Microcontroller

PIC Microcontroller:

PIC microcontroller was developed in the year 1993 by microchip technology. The term PIC
stands for Peripheral Interface Controller. Initially this was developed for supporting PDP
computers to control its peripheral devices, and therefore, named as a peripheral interface device.
These microcontrollers are very fast and easy to execute a program compared with other
microcontrollers.

What is a PIC Microcontroller?

PIC (Programmable Interface Controllers) microcontrollers are the worlds smallest


microcontrollers that can be programmed to carry out a huge range of tasks. These
microcontrollers are found in many electronic devices such as phones, computer control systems,
alarm systems, embedded systems, etc. Various types of microcontrollers exist, even though the
best are found in the GENIE range of programmable microcontrollers. These microcontrollers
are programmed and simulated by a circuit-wizard software.

Every PIC microcontroller architecture consists of some registers and stack where registers
function as Random Access Memory( RAM) and stack saves the return addresses. The main
features of PIC microcontrollers are RAM, flash memory, Timers/Counters, EEPROM, I/O
Ports, USART, CCP (Capture/Compare/PWM module), SSP, Comparator, ADC (analog to
digital converter), PSP(parallel slave port), LCD and ICSP (in circuit serial programming) The 8-
bit PIC microcontroller is classified into four types on the basis of internal architecture such as
Base Line PIC, Mid Range PIC, Enhanced Mid Range PIC and PIC18.

Other PIC MCU’s

PIC12F508, PIC12F629, PIC12F683, PIC16F505, PIC16F628A, PIC16F676, PIC16F72,


PIC16F873A, PIC16F876A, PIC16F886, PIC18F252, PIC18F25520, PIC18F452, PIC18F4520
PIC16F877A

This powerful (200 nanosecond instruction execution) yet easy-to-program (only 35 single word
instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC®
architecture into an 40 package and is upwards compatible with the PIC16C5X, PIC12CXXX
and PIC16C7X devices. The PIC16F877A features 256 bytes of EEPROM data memory, self
programming, an ICD, 2 Comparators, 8 channels of 10-bit Analog-to-Digital (A/D) converter, 2
capture/compare/PWM functions, the synchronous serial port can be configured as either 3-wire
Serial Peripheral Interface (SPI™) or the 2-wire Inter-Integrated Circuit (I²C™) bus and a
Universal Asynchronous Receiver Transmitter (USART).

We know that the microcontroller is an integrated chip which consists of CPU, RAM,
ROM, timers, and counters, etc. In the same way, PIC microcontroller architecture consists of
RAM, ROM, CPU, timers, counters and supports the protocols such as SPI, CAN, and UART for
interfacing with other peripherals. At present PIC microcontrollers are extensively used for
industrial purpose due to low power consumption, high performance ability and easy of
availability of its supporting hardware and software tools like compilers, debuggers and
simulators.

PIN DIAGRAM
PIC16F877A Pin Configuration

Pin Pin Name Description


Number

1 MCLR/Vpp MCLR is used during programming, mostly connected


to programmer like PicKit

2 RA0/AN0 Analog pin 0 or 0th pin of PORTA

3 RA1/AN1 Analog pin 1 or 1st pin of PORTA

4 RA2/AN2/Vref- Analog pin 2 or 2nd pin of PORTA

5 RA3/AN3/Vref+ Analog pin 3 or 3rd pin of PORTA

6 RA4/T0CKI/C1out 4th pin of PORTA

7 RA5/AN4/SS/C2out Analog pin 4 or 5th pin of PORTA

8 RE0/RD/AN5 Analog pin 5 or 0th pin of PORTE

9 RE1/WR/AN6 Analog pin 6 or 1st pin of PORTE

10 RE2/CS/AN7 7th pin of PORTE

11 Vdd Ground pin of MCU

12 Vss Positive pin of MCU (+5V)


13 OSC1/CLKI External Oscillator/clock input pin

14 OSC2/CLKO External Oscillator/clock output pin

15 RC0/T1OSO/T1CKI 0th pin of PORT C

16 RC1/T1OSI/CCP2 1st pin of POCTC or Timer/PWM pin

17 RC2/CCP1 2nd pin of POCTC or Timer/PWM pin

18 RC3/SCK/SCL 3rd pin of POCTC

19 RD0/PSP0 0th pin of POCTD

20 RD1/PSPI 1st pin of POCTD

21 RD2/PSP2 2nd pin of POCTD

22 RD3/PSP3 3rd pin of POCTD

23 RC4/SDI/SDA 4th pin of POCTC or Serial Data in pin

24 RC5/SDO 5th pin of POCTC or Serial Data Out pin

25 RC6/Tx/CK 6th pin of POCTC or Transmitter pin of


Microcontroller

26 RC7/Rx/DT 7th pin of POCTC or Receiver pin of Microcontroller

27 RD4/PSP4 4th pin of POCTD


28 RD5/PSP5 5th pin of POCTD

29 RD6/PSP6 6th pin of POCTD

30 RD7/PSP7 7th pin of POCTD

31 Vss Positive pin of MCU (+5V)

32 Vdd Ground pin of MCU

33 RB0/INT 0th pin of POCTB or External Interrupt pin

34 RB1 1st pin of POCTB

35 RB2 2nd pin of POCTB

36 RB3/PGM 3rd pin of POCTB or connected to programmer

37 RB4 4th pin of POCTB

38 RB5 5th pin of POCTB

39 RB6/PGC 6th pin of POCTB or connected to programmer

40 RB7/PGD 7th pin of POCTB or connected to programmer


Architecture of PIC Microcontroller

The PIC microcontroller architecture comprises of CPU, I/O ports, memory organization,
A/D converter, timers/counters, interrupts, serial communication, oscillator and CCP module
which are discussed in detailed below.

Architecture of PIC Microcontroller

CPU (Central Processing Unit)

It is not different from other microcontrollers CPU and the PIC microcontroller CPU consists
of the ALU, CU, MU and accumulator, etc. Arithmetic logic unit is mainly used for arithmetic
operations and to take logical decisions. Memory is used for storing the instructions after
processing. To control the internal and external peripherals, control unit is used which are
connected to the CPU and the accumulator is used for storing the results and further process.

Memory Organization
The memory module in the PIC microcontroller architecture consists of RAM (Random
Access Memory), ROM (Read Only Memory) and STACK.

Random Access Memory (RAM)

RAM is an unstable memory which is used to store the data temporarily in its registers. The
RAM memory is classified into two banks, and each bank consists of so many registers. The
RAM registers are classified into two types: Special Function Registers (SFR) and General
Purpose Registers (GPR).

General Purpose Registers (GPR)

These registers are used for general purpose only as the name implies. For example, if we
want to multiply two numbers by using the PIC microcontroller. Generally, we use registers for
multiplying and storing the numbers in other registers. So these registers don’t have any special
function,- CPU can easily access the data in the registers.

Special Function Registers

These registers are used for special purposes only as the name SFR implies. These registers
will perform according to the functions assigned to them , and they cannot be used as normal
registers. For example, if you cannot use the STATUS register for storing the data, these
registers are used for showing the operation or status of the program. So, user cannot change the
function of the SFR; the function is given by the retailer at the time of manufacturing.

Special Function Registers


Memory Organization

Read Only Memory (ROM)

Read only memory is a stable memory which is used to store the data permanently. In PIC
microcontroller architecture, the architecture ROM stores the instructions or program, according
to the program the microcontroller acts. The ROM is also called as program memory, wherein
the user will write the program for microcontroller and saves it permanently, and finally the
program is executed by the CPU. The microcontrollers performance depends on the instruction,
which is executed by the CPU.

Electrically Erasable Programmable Read Only Memory (EEPROM)

In the normal ROM, we can write the program for only once we cannot use again the
microcontroller for multiple times. But, in the EEPROM, we can program the ROM multiple
times.

Flash Memory

Flash memory is also programmable read only memory (PROM) in which we can read, write
and erase the program thousands of times. Generally, the PIC microcontroller uses this type of
ROM.

Stack

When an interrupt occurs, first the PIC microcontroller has to execute the interrupt and the
existing process address. Then that is being executed is stored in the stack. After completing the
execution of the interrupt, the microcontroller calls the process with the help of address, which is
stored in the stack and get executes the process.

I/O Ports

The series of PIC16 consists of five ports such as Port A, Port B, Port C, Port D & Port E.
Port A is an 16-bit port that can be used as input or output port based on the status of the TRISA
(Tradoc Intelligence Support Activity) register. Port B is an 8- bit port that can be used as both
input and output port. Port C is an 8-bit and the input of output operation is decided by the status
of the TRISC register. Port D is an 8-bit port acts as a slave port for connection to the
microprocessor BUS. Port E is a 3-bit port which serves the additional function of the control
signals to the analog to digital converter.

BUS

BUS is used to transfer and receive the data from one peripheral to another. It is classified
into two types such as data bus and address.

Data Bus: It is used for only transfer or receive the data.

Address Bus: Address bus is used to transmit the memory address from the peripherals to the
CPU. I/O pins are used to interface the external peripherals; UART and USART both are serial
communication protocols which are used for interfacing serial devices like GSM, GPS,
Bluetooth, IR , etc.

BUS

A/D converters

The main intention of this analog to digital converter is to convert analog voltage values to
digital voltage values. A/D module of PIC microcontroller consists of 5 inputs for 28 pin devices
and 8 inputs for 40 pin devices. The operation of the analog to digital converter is controlled by
ADCON0 and ADCON1 special registers. The upper bits of the converter are stored in register
ADRESH and lower bits of the converter are stored in register ADRESL. For this operation, it
requires 5V of an analog reference voltage.

A/D CONVERTER

Timers/ Counters

PIC microcontroller has four timer/counters wherein the one 8-bit timer and the remaining
timers have the choice to select 8 or 16-bit mode. Timers are used for generating accuracy
actions, for example, creating specific time delays between two operations.

Interrupts

PIC microcontroller consists of 20 internal interrupts and three external interrupt sources
which are associated with different peripherals like ADC, USART, Timers, and so on.

Serial Communication

Serial communication is the method of transferring data one bit at a time sequentially over a
communication channel.

USART: The name USART stands for Universal synchronous and Asynchronous Receiver and
Transmitter which is a serial communication for two protocols. It is used for transmitting and
receiving the data bit by bit over a single wire with respect to clock pulses. The PIC
microcontroller has two pins TXD and RXD. These pins are used for transmitting and receiving
the data serially.

SPI Protocol: The term SPI stands for Serial Peripheral Interface. This protocol is used to send
data between PIC microcontroller and other peripherals such as SD cards, sensors and shift
registers. PIC microcontroller support three wire SPI communications between two devices on a
common clock source. The data rate of SPI protocol is more than that of the USART.

I2C Protocol: The term I2C stands for Inter Integrated Circuit , and it is a serial protocol which
is used to connect low speed devices such as EEPROMS, microcontrollers, A/D converters, etc.
PIC microcontroller support two wire Interface or I2C communication between two devices
which can work as both Master and Slave device.

Serial Communication

Serial Communication

Oscillators

Oscillators are used for timing generation. PIC microcontroller consist of external oscillators like
RC oscillators or crystal oscillators. Where the crystal oscillator is connected between the two
oscillator pins. The value of the capacitor is connected to every pin that decides the mode of the
operation of the oscillator. The modes are crystal mode, high-speed mode and the low-power
mode. In case of RC oscillators, the value of the resistor & capacitor determine the clock
frequency and the range of clock frequency is 30KHz to 4MHz.

CCP module

The name CCP module stands for capture/compare/PWM where it works in three modes
such as capture mode, compare mode and PWM mode.

Capture Mode: Capture mode captures the time of arrival of a signal, or in other words, when
the CCP pin goes high, it captures the value of the Timer1.

Compare Mode: Compare mode acts as an analog comparator. When the timer1 value reaches a
certain reference value, then it generates an output.

PWM Mode: PWM mode provides pulse width modulated output with a 10-bit resolution and
programmable duty cycle.

PIC Microcontroller Applications

The PIC microcontroller projects can be used in different applications, such as peripherals,
audio accessories, video games, etc. For better understanding of this PIC microcontroller, the
following project demonstrates PIC microcontroller’s operations.

 Multiple DIY Projects


 Very good choice if you are learning PIC
 Projects requiring Multiple I/O interfaces and communications
 Replacement for Arduino Module
 Ideal for more advanced level A/D applications in automotive, industrial, appliances and
consumer applications.
Advantages of PIC Microcontroller:

 They are reliable and malfunctioning of PIC percentage is very less. And performance of
the PIC
 is very fast because of using RISC architecture.
 Power conception is also very less when compared to other micro controllers. When we
see in
 the programmer point of view interfacing is very easy, also we can connect analog
devices
 directly with out any extra circuitry and use them. Programming is also very easy when
compared to other microcontrollers.
Disadvantages of PIC Microcontroller:

 The length of the program will be big because of using RISC (35 instructions).
 Program memory is not accessible and only one single accumulator is present.

LIQUID CRYSTAL DISPLAY (LCD): -

LCD is a type of display used in digital watches and many portable computers. LCD
displays utilize to sheets of polarizing material with a liquid crystal solution between them. An
electric current passed through the liquid causes the crystals to align so that light cannot pass
through them. LCD technology has advanced very rapidly since its initial inception over a
decade ago for use in lap top computers. Technical achievements has resulted in brighter
displace, higher resolutions, reduce response times and cheaper manufacturing process.

The liquid crystals can be manipulated through an applied electric voltage so that light is
allowed to pass or is blocked. By carefully controlling where and what wavelength (color) of
light is allowed to pass, the LCD monitor is able to display images. A backlight provides LCD
monitor’s brightness.

Over the years many improvements have been made to LCD to help enhance resolution,
image, sharpness and response times.

One of the latest such advancement is applied to glass during acts as switch allowing
control of light at the pixel level, greatly improving LCD’s ability to display small-sized fonts
and image clearly.

Other advances have allowed LCD’s to greatly reduce liquid crystal cell response times.
Response time is basically the amount of time it takes for a pixel to “change colors”, in reality
response time is the amount of time it takes a liquid crystal cell to go from being active to
inactive.

This is due to following reasons:

 The declining prices of LCDs.


 The ability to display numbers, characters and graphics. This is in contrast to
LEDs, which are limited to numbers and a few characters.

An intelligent LCD display of two lines, 20 characters per line that is interfaced to the
pic16f72 microcontroller.

Incorporation of a refreshing controller into the LCD, thereby relieving the CPU to keep
displaying the data. Ease of programming for characters and graphics.

Most of the LCD modules conform to a standard interface specification. A 14-pin access
is provided having eight data lines, three control lines and three power lines. The connections are
laid out in one of the two common configurations, either two rows of seven pins, or a single row
of 14 pins.

One of these pins is numbered on the LCD’s printed circuit board (PCB), but if not, it is
quite easy to locate pin1. Since this pin is connected to ground, it often has a thicker PCB track,
connected to it, and it is generally connected to metal work at same point.

PIN DIAGRAM OF LCD: -

PIN DESCRIPTIONS: -
Vcc, Vss and Vee: -

While Vcc and Vss provide +5V and ground respectively, Vee is used for controlling
LCD contrast.

RS Register Select: -

There are two very important registers inside the LCD. The RS pin is used for their
selection as follows.

If RS=0, the instruction command code register is selected, allowing the user to send a
command such as clear display, cursor at home, etc.

If RS=1, the data register is selected, allowing the user to send data to be displayed on the
LCD.

R/W, read/write: -

R/W input allows the user to write information to the LCD or read information from it.

R/W = 1 for reading.

R/W= 0 for writing.

EN, enable: -

The LCD to latch information presented to its data pins uses the enable pin. When data is
supplied to data pins, a high–to-low pulse must be applied to this pin in order for the LCD to
latch in the data present at the data pins. This pulse must be a minimum of 450 ns wide.

D0 – D7: -

The 8–bit data pins, DO – D7, are used to send information to the LCD or read the
contents of the LCD’s internal registers.
To display letters and numbers, we send ASCII codes for the letters A–Z, a-z numbers 0-
9 to these pins while making RS=1.

There are also instruction command codes that can be sent to the LCD to clear the display
or force the cursor to home position or blink the instruction command codes.

We also use RS = 0 to check the busy flag bit to see if the LCD is ready to receive
information. The busy flag is D7 and can be read when R/W=1 and RS=0, as follows: if R/W =
1, RS = 0. When D7= 1 (busy flag = 1), the LCD is busy taking care of internal operations and
will not accept any information.

Prototype circuit: -

For a LCD module to be used effectively in any piece of equipment, a Microprocessor or


Micro controller is usually, required to drive it. However, before attempting a series of switches
to the pins of the module. This can be a quite benefical step, if even you are thoroughly
conversant with the workings of microprocessors.

RF Module (Radio Frequency)

Radio Frequency, any frequency within the electromagnetic spectrum associated with radio
wave propagation. When an RF current is supplied to an antenna, an electromagnetic field is
created that then is able to propagate through space. Many wireless technologies are based on RF
field propagation.

Receiver Module Transmitter Module


Figure - 1

Radio Frequency. The 10 kHz to 300 GHz frequency range that can be used for wireless
communication

Radio Frequency. Also used generally to refer to the radio signal generated by the system
transmitter, or to energy present from other sources that may be picked up by a wireless receiver.

 Wireless mouse, keyboard


 Wireless data communication

 Alarm and security systems

 Home Automation, Remote control

 Automotive Telemetry

 Intelligent sports equipment

 Handheld terminals, Data loggers


 Industrial telemetry and tele-communications
 In-building environmental monitoring and control
 High-end security and fire alarms

TRANSMITTER

The TWS-434 extremely small, and are excellent for applications requiring short-range RF
remote controls.  The transmitter module is only 1/3 the size of a standard postage stamp, and
can easily be placed inside a small plastic enclosure.

TWS-434:  The transmitter output is up to 8mW at 433.92MHz with a range of approximately


400 foot (open area) outdoors.  Indoors, the range is approximately 200 foot, and will go through
most walls.
Figure - 2

The TWS-434 transmitter accepts both linear and digital inputs, can operate from 1.5 to 12
Volts-DC, and makes building a miniature hand-held RF transmitter very easy.  The TWS-434 is
approximately 1/3 the size of a standard postage stamp.

Figure – 3 TWS-434 Pin Diagram


Figure 4 - Transmitter Application Circuit

RECEIVER

RWS-434:  The receiver also operates at 433.92MHz, and has a sensitivity of 3uV.  The WS-
434 receiver operates from 4.5 to 5.5 volts-DC, and has both linear and digital outputs.
Figure 5- Pin Out Diagram

TRANSMIT AND RECEIVE DATA


GENERATING DATA

The TWS-434 modules do not incorporate internal encoding. If you want to send simple
control or status signals such as button presses or switch colsures, consider using an encoder and
decoder IC set that takes care of all encoding, error checking, and decoding functions. These
chips are made by Motorola and Holtek. They are an excellent way to implement basic wireless
transmission control.

RECEIVER DATA OUTPUT

A 0 volt to Vcc data output is available on pins. This output is normally used to drive a digital
decoder IC or a microprocessor which is performing the data decoding. The receiver’s output
will only transition when valid data is present. In instances when no carrier is present the output
will remain low.
DECODING DATA

The RWS-434 modules do not incorporate internal decoding. If you want to receive
Simple control or status signals such as button presses or switch colsures, you can use the
encoder and decoder IC set described above. Decoders with momentary and latched outputs are
available.

TRANSMITTING AND RECEIVING

Full duplex or simultaneous two-way operation is not possible with these modules. If a
transmit and receive module are in close proximity and data is sent to a remote receive module
while attempting to simultaneously receive data from a remote transmit module, the receiver will
be overloaded by its close proximity transmitter. This will happen even if encoders and decoders
are used with different address settings for each transmitter and receiver pair. If two way
communication is required, only half duplex operation is allowed.
2. ANTENNAS- WIRE WHIP

The WC418 is made of 26 gauge carbon steel music wire that can be soldered to a PC board.
This antenna has a plastic coated tip for safety and is 6.8 inches long, allowing .1 inch for
insertion in a terminal or PC board.

Figure 6 - Antenna
The following should help in achieving optimum antenna performance:

 Proximity to objects such a users hand or body, or metal objects will cause an antenna to
detune. For this reason the antenna shaft and tip should be positioned as far away from
such objects as possible.
 Optimum performance will be obtained from a 1/4 or 1/2 wave straight whip mounted at
a right angle to the ground plane. A 1/4 wave antenna for 418 Mhz is 6.7 inches long.
 In many antenna designs, particularly 1/4 wave whips, the ground plane acts as a
counterpoise, forming in essence, a 1/2 wave dipole. Adequate ground plane area will
give maximum performance. As a general rule the ground plane to be used as
counterpoise should have a surface area => the overall length of the 1/4 wave radiating
element (2.6 X 2.6 inches for a 6.7 inch long antenna).
 Remove the antenna as far as possible from potential interference sources. Place adequate
ground plane under all potential sources of noise.

STEPPER MOTOR

A stepper motor is an electromechanical device which converts electrical pulses into


discrete mechanical movements. The shaft or spindle of a stepper motor rotates in discrete step
increments when electrical command pulses are applied to it in the proper sequence. The motors
rotation has several direct relationships to these applied input pulses. The sequence of the applied
pulses is directly related to the direction of motor shafts rotation. The speed of the motor shafts
rotation is directly related to the frequency of the input pulses and the length of rotation is
directly related to the number of input pulses applied.

When to Use a Stepper Motor:

A stepper motor can be a good choice whenever controlled movement is required. They
can be used to advantage in applications where you need to control rotation angle, speed,
position and synchronism. Because of the inherent advantages listed previously, stepper motors
have found their place in many different applications. Some of these include printers, plotters,
high end office equipment, hard disk drives, medical equipment, fax machines, automotive and
many more.
TWO PHASE STEPPER MOTOR WIRING:

The above motor is a two phase motor. This is sometimes called Unipolar. The two
phase coils are center tapped and this case the center taps are connected to ground. These coils
are wound so that it is reversed when the drive signal is applied to either coil at a time. The N
and S of the stator phase are reversed depending upon whether the drive signal is applied to coil
1 as opposed to coil 2.
Fig: Two phase stepper motor wiring

Step Angle Accuracy:

One reason why the stepper motor has achieved such popularity as a positioning device is
its accuracy and repeatability. Typically stepper motors will have a step angle accuracy of 3 –
5% of one step. This error is also noncumulative from step to step. The accuracy of the stepper
motor is mainly a function of the mechanical

precision of its parts and assembly. Figure 9 shows a typical plot of the positional accuracy of a
stepper motor.

Stepper Motor Advantages and Disadvantages:

Advantages:

1. The rotation angle of the motor is proportional to the input pulse.

2. The motor has full torque at standstill (if the windings are energized)

3. Precise positioning and repeatability of movement since good stepper motors have an accuracy
of 3 – 5% of a step and this error is non cumulative from one step to the next.

4. Excellent response to starting/ stopping/reversing.

5. Very reliable since there are no contact brushes in the motor. Therefore the life of the motor is
simply dependant on the life of the bearing.

6. The motors response to digital input pulses provides open-loop control, making the motor
simpler and less costly to control.

7. It is possible to achieve very low speed synchronous rotation with a load that is directly
coupled to the shaft.

8. A wide range of rotational speeds can be realized as the speed is proportional to the frequency
of the input pulses.
Disadvantages:

1. Resonances can occur if not properly controlled.

2. Not easy to operate at extremely high speeds.

Open Loop Operation:

One of the most significant advantages of a stepper motor is its ability to be accurately controlled
in an open loop system. Open loop control means no feedback information about position is
needed. This type of control eliminates the need for expensive sensing and feedback devices
such as optical encoders. Your position is known simply by keeping track of the input step
pulses.

CONCLUSION:

In this REMOTE STEPPER MOTOR CONTROL BASED ON EMBEDDED


SYSTEM system has been designed to improve the domestic and industrial safety. The system
was a positive learning experience for the student, which allows maximizing his creative
potential as well as utilizing many technologies in Electrical Engineering Technology discipline.

REFERENCES

 A. Bruce Carlson, Communication Systems , Tata McGraw Hill, 1986


 Edward.C.Jordan and Keith.G.Balmain, "Electromagnetic waves and radiating systems",
Prentice Hall, 2nd Edition, 1995.

 FLOYD: Digital Fundamentals, Universal Book Stall, New Delhi.1993


 George Kennedy: Electronic communication systems, Tata McGraw Hill publications, 1992
 Gaonkar R.S., Microprocessor architecture Programming and application, Wiley Eastern
Ltd., New Delhi, 1995.
 Irving I.Kosow, “Electric Machinery and Transformers”, PHI, Second Edition, 2001.
 I.J. Nagrath & D.P. Kothari, “Electrical Machines”, Tata McGraw Hill Publications, Second
Edition 1997.
 John B.Peatman, Design with Microcontrollers, McGraw Hill International, USA, 1988.
 John D.Kraus, “Antennas “Tata McGraw Hill 2nd Edition, 2000.
 K. Feher, Wireless Digital Communication, Prentice Hall of India, New Delhi, 1995.
 Kennedy, Electronic Communication systems Mc Graw Hill.1987
 Kenneth Hint, and Daniel Tabak, Microcontrollers, Architecture, Implementation and
Programming, McGraw Hill International, USA, 1992.
 Moris Mano, ‘ Digital Electronics and Design’, Prentice Hall of India, 2000
 Mathur A.P., Introduction of Microprocessors, Tata McGraw-Hill Publishing Co.Ltd, New
Delhi, 1989.

 Prasad .K.D., "Antennas and wave propagation", Satya prakasan, 3rd Edition, 1996
 Roddy and Coolen, Electronic Communication, PHI 1999
 Simon Haykins, ‘principles of Communications, Prentice Hall of India. 2001
 Simon Haykins, Communication Systems Wiley 1995
 S.K Bhattacharya, “Electrical Machines”, Tata McGraw Hill Publications. 1997.
 T.S. Rappaport, Wireless Communication, Principle and Practice, Prentice Hall, NJ, 1996
 W.C.Y. Lee, Mobile Communication Engineering; Theory and Application, Second Edition,
McGraw Hill International, 1998.

You might also like