zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Getting started with arduino Part IV

September 5, 2012 by Igor Drobot Leave a Comment


You now this click clack noises for exmple from your car if you want to turn right or left, yes right I mean relay. This will be the stuff that describe in this post, controlling circuits with a relay.

I used the following relay in my examples:

Power Relay V05SKT – Datasheet
Maximum Switching Current 5 Ampere
Maximum Switching Voltage 250 VAC, 150 VDC
Minimum Switching Load 3 Volt or 5 V at 100mA
High insulation with reinforced insulation system (between coil and contacts)

Relay schematic:

Coil connection: 1 and 4
Current connection: 2 and 3

You can find the coil by the mark on the side of your relay case or by line on the top of your relay. Another way: you try to measure the electrical resistance with a multimeter – Ω position, only the coil can be measured by the digital multimeter.

Arduino INO Code:

int RelayPIN = 12;
 
void setup()
{
     pinMode(RelayPIN, OUTPUT);
}
 
void loop()
{
     digitalWrite(RelayPIN, HIGH);
     delay(1000);
     digitalWrite(RelayPIN, LOW);
     delay(1000);
}

int RelayPIN = 12; void setup() { pinMode(RelayPIN, OUTPUT); } void loop() { digitalWrite(RelayPIN, HIGH); delay(1000); digitalWrite(RelayPIN, LOW); delay(1000); }

Schematic(click to resize):

Pin 12 will be used for switching load, and will be connected to the coil, it doesn’t matter where is plus and minus.

To protect the arduino arduino board I used a diode:

Relay


Filed Under: DIY Tagged With: arduino, coil, load, relay, resistance

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok