Sie sind auf Seite 1von 6

The Arduino Mega 2560 is a microcontroller board based on

the ATmega2560. It has 54 digital input/output pins (of which 15 can be


used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial
ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an
ICSP header, and a reset button. It contains everything needed to support
the microcontroller; simply connect it to a computer with a USB cable or
power it with a AC-to-DC adapter or battery to get started.

How Relays Work

Relays are switches that open and close circuits electromechanically or electronically.
Relays control one electrical circuit by opening and closing contacts in another circuit.
As relay diagrams show, when a relay contact is normally open (NO), there is an open
contact when the relay is not energized. When a relay contact is Normally Closed (NC),
there is a closed contact when the relay is not energized. In either case, applying
electrical current to the contacts will change their state.
Relay in NORMALLY CLOSED condition:
When no voltage is applied to the core, it cannot generate any magnetic field and it doesn’t act as a
magnet. Therefore, it cannot attract the movable armature. Thus, the initial position itself is the
armature connected in normally closed position (NC). So the motor of acutator not runs.

Relay in NORMALLY OPENED condition:


When sufficient voltage is applied to the core it starts to create a magnetic field around it and acts as
a magnet. Since the movable armature is placed within its range, it gets attracted to that magnetic field
created by the core, thus the position of the armature is being altered. It is now connected to the
normally opened pin of the relay and external circuit connected to it function in a different manner. The
coils of relays are controlled by arduino pins according to the code. You can use a single relay or a
channel of relay modules both works on same rule.

Single relay module:


8 channel relay module:

It is used to control multiple things at same time.


The circuit designed is given as:

All the relays are controlled by arduino pins and arduino works according to programming in the the
arduino microcontroller. It is very simple to just to ON one relay and OFF other. Relays accordingly
ON and OFF connected motors or anything else. In the above circuit there are motor but we have to
rotate them int both direction for gaining actuator motion.
Connection wiring:
Relays NO are connected to NO and NC are connected to NC because we have to control actuators
motion forward and backword. In actuators there is a DC motor. DC motor is supply directional means
when supply is positive to negative It rotate in one direction and when supply is negative to positive it
rotates in opposite direction. That is why we are using two relays for one actuator to move It forward
and backward. See in the figure below.

Or
At a time only one relay is ON. Suppose when relay 2 is ON and relay 3 is OFF the motor runs in
clockwise in the other case it runs in anti clockwise direction.

IR-sharp sensors are connected to analog or digital pins of arduino which detect the object tells the
arduino that when to turn ON the relays and when to turn OFF them.

Das könnte Ihnen auch gefallen