element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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
  • 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 Having trouble switching a relay for my arduino project
  • 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 Not Answered
  • Replies 17 replies
  • Subscribers 392 subscribers
  • Views 1111 views
  • Users 0 members are here
  • arduino
  • relay
Related

Having trouble switching a relay for my arduino project

gub11
gub11 over 10 years ago

I am trying to switch this relay  https://www.sparkfun.com/products/10924  .  I don't think a schematic is necessary so i'll just explain it.  I have my that relay with GND to GND and the signal or vcc or whatever you want to call it pin hooked up to a digital out pin on the arduino, and the pin is writing high then low every 1 second, just to test it.  then i have a positive current running through the relay, that should be switched on and off with a one second delay powering an LED, but it isn't switching, it remains closed.  i have heard that it is because the arduino's digital write high voltage isn't enough to switch the relay, but i'm not sure because it was switching my 10A relay jsut fine.  Ideas?  I realize there is a datasheet but im still new to this kind of stuff so i don't really know what any of it means.

  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 10 years ago +4
    Gabriel; They're trying to teach you how to find and interpret the information, so you can answer your own question. To read a schematic you need to know some of the common lingo, and how things are annotated…
  • shabaz
    shabaz over 10 years ago in reply to gub11 +3
    Gabriel, Please take the time to read it. I quickly scanned it, but it clearly indicated the transistor part number on the schematic, and even provided a URL to the part to help you. How do you expect…
  • shabaz
    shabaz over 10 years ago in reply to gub11 +1
    JP2 is not a transistor. You could have looked up 'transistor' in Wikipedia and identified the symbol if there was any confusion. At this point, I don't know what to suggest I'm afraid. I'm not prepared…
  • shabaz
    0 shabaz over 10 years ago

    Gabriel Spound wrote:

     

    but i'm not sure because it was switching my 10A relay jsut fine.

     

    I can't believe that - your 10A relay must have had additional circuitry on-board such as a transistor.

     

    The information you seek is in the comments on the sparkfun page that you refer to:

     

    (Quote:)

    Can you drive this directly from an Aruino?? It says power consumption is 0.9W @ 5.0V, that’s 180mA, which exceeds the current capability of an Arduino port.

    Rohar / about 2 years ago /  1

    You cannot drive it directly from an Arduino, but you can add a transistor to the circuit. The Arduino activates the transistor, the transistor activates the relay. See the Relay Tutorial to see exactly how this is accomplished.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gub11
    0 gub11 over 10 years ago in reply to shabaz

    thank you very helpful, the 10 amp relay is attached to a circuit board so that might be the transistor, i am still new to this kind of stuff, so could you link to me a transistor, i could figure out how to wirte it up, just need to know what transistor to use, thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago in reply to gub11

    It's in the link at that post (hit Ctrl-F and search for "See the Relay Tutorial to see exactly how this is accomplished.)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gub11
    0 gub11 over 10 years ago in reply to shabaz

    the board that my 10a relay is on as a diode and a little black square with 2 contact points, sorry for being so vague  here it is   Keyes 5V Relay Module for Arduino (Works with Official Arduino Boards) - Free Shipping - DealExtreme

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gub11
    0 gub11 over 10 years ago in reply to shabaz

    it just says an npn transistor, there are a lot of those, which one

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gub11
    0 gub11 over 10 years ago in reply to shabaz

    also they provide a schematic with a bunch of resistors, do i need those as well?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago in reply to gub11

    Gabriel,

     

    Please take the time to read it. I quickly scanned it, but it clearly indicated the transistor part number on the schematic, and even provided a URL to the part to help you. How do you expect to learn if you are not prepared to read? The author took a lot of time to write in detail exactly how to go about it.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago in reply to gub11

    R2 and D1 are mandatory, the remainder you can ignore.

    Please be aware, don't use this circuit to switch mains circuits unless you know what you're doing (i.e. if you are qualified engineer).

    If you wish to switch mains, this project is not appropriate for beginners - consider wireless methods.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gub11
    0 gub11 over 10 years ago in reply to shabaz

    ok, i've read through it, and i understand it a lot more, but it still doesn't say what transistor i should use

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago in reply to gub11

    The schematic (where you saw the resistors) has text component identifiers (like R1 and R2) but also specifies values. The value for the transistor Q2 is written right there : )

    • 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