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 1112 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…
Parents
  • 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
Reply
  • 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
Children
  • 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
  • gub11
    0 gub11 over 10 years ago in reply to shabaz

    wait i thought JP2 was the transistor, now i'm confused, how would i wire it up with only the necessary components?

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

    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 to spoon-feed (others might), because then I feel there is no learning.

    There are a couple of approaches, perhaps these could help?

    1. Look for a tutorial you can understand, if that one is too difficult. Perhaps a youtube video, see here: http://www.mcmajan.com/mcmajanwpr/?p=1259

    2. A book on electronics - and study. This one seems to have lots of positive reviews:  http://www.amazon.co.uk/Make-Electronics-Discovery-Charles-Platt/dp/0596153740/ref=sr_1_2?s=books&ie=UTF8&qid=1443829468&sr=1-2&keywords=electronics+for+beginners

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

    i'm not asking for you to spoon-feed me, i'm not asking you to design my project, i've done that, i had it all done i just had trouble with this one thing, and you been helpful, but i'm not just doing this for the sake of doing this, i'm trying to learn, not just trying to get it done, i'm not asking for much more, i just don't know what JP2 is.

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

    JP2 is a connector. What did you think Q2 was? You could have asked yourself; where do you plan to wire your Arduino to this circuit?

    And if you didn't know, it was described in the text:

    When the ‘RELAY’ pin (aka CTRL) goes high, the NPN transistor connects to ground sending current through the coil (activating the relay) and through the LED (turning the activation LED on).

     

    With that knowledge, it would have been clear that the connection marked 'RELAY' goes to your Arduino, and therefore J2 is likely a connection of some sort.

     

    Strongly suggest you pick up that textbook and study!

    • Cancel
    • Vote Up +1 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