To control high-voltage or high-power circuits with an
Arduino, you have to isolate them from the Arduino with a relay. Here's
how!
Circuits that operate at high voltages or at high
currents cannot be controlled directly by an Arduino. Instead, you use a
low-voltage control signal from the Arduino to control a relay, which
is capable of handling and switching high-voltage or high-power
circuits. A relay consists of an electromagnet that, when energized,
causes a switch to close or open. Relays provide complete electrical
isolation between the control circuit and the circuit being controlled.A relay typically has five pins:
- Coil input pin1. This is generally connected to the positive terminal of your signal source.
- Coil input pin2. This is generally connected to the negative terminal of your signal source.
- Normally Open pin(NO). This pin is normally not connected to the common pin, it is connected when the relay is activated.
- Normally closed pin(NC). This pin is normally connected to common pin and is disconnected when relay is activated.
- Common. In most of the cases, this pin is connected to the ground of the source we use to drive the appliance.
Experiment
In this tutorial, we will drive a 12V DC motor using relays.
Hardware Required
- 1 x 12 VCD power supply
- 1 x 12V DC motor
- 1 x relay
- 1 x Arduino Mega2560
- 1 x NPN transistor
- 1 x Diode
- 1 x jumper wires
Wiring Diagram
The circuit shown in the diagram below uses a relay to switch 12 V across a DC motor. To turn on the motor, the program writes a HIGH value to pin 3, which turns on the transistor. When the transistor turns on, current flows through the relay coil causing the relay to close, which connects 12 V across the motor, causing it to spin.
No comments:
Post a Comment