View Single Post
  #4   Spotlight this post!  
Unread 18-09-2014, 20:17
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Programming a 12V relay with Arduino

Quote:
Originally Posted by jee7s View Post
Arduino is well documented, so I'm sure there's resources for the particular syntax. You'll probably want to use a simple output rather than a PWM. Just pulse the output to get your relay to switch.

The bigger deal is driving the coil. You'll need to make sure your relay will actually switch at the Arduino output voltage. If that doesn't cut it or if the coil needs more current than the arduino output can provide, you'll need some extra circuitry (like a transistor) to handle the coil drive.
A perfect example of all of what jee7s mentioned is in the Sparkfun inventors kit, including an example of driving a motor and of driving a relay with code and schematics. The guide for their kit is free and is listed on the product page: http://dlnmh9ip6v2uc.cloudfront.net/...3.0-Online.pdf

Page 71 has the relay example, and you can probably reference what they do in the guide with what your kit does.
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -