element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Arduino Low Voltage Trigger(Relay) question.
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 5 replies
  • Answers 3 answers
  • Subscribers 398 subscribers
  • Views 4837 views
  • Users 0 members are here
  • arduino_tutorials
  • arduino_tutorial
Related

Arduino Low Voltage Trigger(Relay) question.

spanevelo
spanevelo over 8 years ago

To make this very long story short, all I want to do is to turn a relay on and off using an arduino.

I bought this relay from ebay(12V 1-Channel Relay Module Optocoupler Low Level Trigger Expansion Board Arduino | eBay ).

And I got the wired like this:

Relay   -  Arduino

VCC to    5v

GND to   GND

IN      to   Digital OP 7.

I see the LED on the Relay goes on every time the relay was supposed to change it's state, But when I check with the voltimeeter the NO never closes and the NC never opens.

A'm I missing something?

 

And this is the code:

int PowerSwitch = 7;

int PowerButton = 8;

 

void setup() {

      pinMode(PowerSwitch, OUTPUT);

      pinMode(PowerButton, INPUT);

      Serial.begin(9600);

}

void loop() {

 

        digitalWrite (PowerSwitch, HIGH);

        Serial.println (" ON ");

        delay(10000);

        digitalWrite (PowerSwitch, LOW);

        Serial.println (" OFF  ");

        delay(10000);

}

image

  • Sign in to reply
  • Cancel

Top Replies

  • jw0752
    jw0752 over 8 years ago in reply to spanevelo +2 suggested
    Hi Marcus, Based on the marking on the relay itself you will definitely need at least 10 volts and preferably 12 volts DC to run the board and relay. Your Arduino will be able to power the opto-isolator…
  • phoenixcomm
    phoenixcomm over 8 years ago +2 suggested
    I agree you can't run a relay with a 12volt coil on 5 volts.. you need a relay that has a 5volt coil. Please make sure that the relay board is OPTO-ISOLATED as the back emf of the coil could wipe out your…
  • beacon_dave
    0 beacon_dave over 8 years ago

    You appear to be trying to power a 12v rated relay coil from a 5v power supply.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • spanevelo
    0 spanevelo over 8 years ago in reply to beacon_dave

    Hmm.. Looking at it now, It sounds like a really stupid question.

    Although.. The way the seller explained was that it would handle  12v on the NO & NC side.. not that it need 12v for input.

    I'll look at the data sheet.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jw0752
    0 jw0752 over 8 years ago in reply to spanevelo

    Hi Marcus,

    Based on the marking on the relay itself you will definitely need at least 10 volts and preferably 12 volts DC to run the board and relay. Your Arduino will be able to power the opto-isolator. It is likely that there are boards like this for 5 volt operation but you may be expecting too much if you want the little regulator on the Arduino to supply this power. It is best to have a separate power supply from which you should be able to power the board with 12 volts and the arduino with 5 to 9 volts.

    John

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • phoenixcomm
    0 phoenixcomm over 8 years ago

    I agree you can't run a relay with a 12volt coil on 5 volts.. you need a relay that has a 5volt coil.

    Please make sure that the relay board is OPTO-ISOLATED as the back emf of the coil could wipe out your Arduino. Even though your board seems to have a protection diode (the glass thing near the green diode) for the back emf. I use the relays to drive lights in my simulator and they run on 24v, ouch.image

    CH

     

    5V Relay Module Board 10A Opto Isolated For Arduino

    2 Channel 5V Relay Module Board 10A Opto Isolated For Arduino | eBay

    image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • phoenixcomm
    0 phoenixcomm over 8 years ago in reply to spanevelo

    Ok, this is now Back to College: Relay 101;image

    Now on the right you will see a relay diagram. we are only interested in

    • The Coil:  Supply Voltage for the relay. 5, 12, etc and is the coil AC or DC.
    • The Contacts: how many and for more advanced you will also want the form

    The Coil is voltage is the voltage you must have to energize the coil. image

    The Coils contacts ratings are in voltage and amperage

    So when the seller said: "that it would handle  12v on the NO & NC side.. not that it need 12v for input."

    he was referring to the voltage of the contacts. on spec on top of your relay said: "10A 250VAC, 10A 125VAC, 10A 30VDC, 28A 28VDC" as well as SRD-12VDC-SL-C and Songle.

    I found the spec sheet for the relay here: www.songle.com

    SRDXX VDCSLC
    Model of relayNominal coil voltageStructureCoil sensitivityContact form
    12S:Sealed typeL:0.36WC: form C

    I also found this diagram of an arduino hooked up to a relay. you will notice that this relay is 5v. So all the arduino does is energize the relay's coil which change the relay's contacts while the battery at the bottom powers the LED.

    FINS

    CAH

    imageimage

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube