User Tools

Site Tools


oak:tutorials:relay

This is an old revision of the document!


THIS TUTORIAL HAS NOT YET BEEN REVIEWED, PLEASE DO NOT USE UNTIL IT HAS

3.3V Relay Shield Tutorial

Product Description:

3v3-relay-shield-1.jpg 3v3-relay-shield-9.jpg

The 3.3V Relay Shield Kit allows you to build a shield that controls a relay with the Oak. Switch up to 24V DC or 120/240V AC wirelessly. The version for Oak uses a compatible 3 volt coil (max 3.9 V, 110mA coil current). The screw terminal has positions for both NC (normally closed) and NO (normally open).

This is an unassembled kit and requires basic soldering. This is designed for use with the Digistump Oak development board, which is not included.

Parts:

Part Quantity Identification
Oak Relay Shield PCB1
Relay with 3VDC coil1 JQC-3F (T73)
1K ohm 1/4 W resistor 5%1 Brown - Black - Red
1N001 diode1
2N3904 NPN transistor 1 TO-92 package
3-pin screw terminal 1
1×40 pin male 0.1“ pitch header 9 pins worth

Resistor Values: For more information on how to identify the value of the resistors, we recommend these sites: A nice simple resistor calculator: http://www.ealnet.com/m-eal/resistor/resistor.htm A comprehensive article on identification: http://www.diyaudioandvideo.com/Electronics/Color/

Soldering: If you are new to soldering we recommend the following tutorials: Soldering Basics (http://www.sparkfun.com/tutorials/106) and Soldering Crash Course from the folks at Sparkfun (http://www.sparkfun.com/tutorials/354). How to solder from the Curious Inventor: http://store.curiousinventor.com/guides/How_to_Solder

Adafruit has this excellent guide that starts with the tools needed and then shows detailed pictures, including some of the common problems that beginners experience (http://learn.adafruit.com/adafruit-guide-excellent-soldering)

We assume for these assembly instructions that you know the basics of thru-hole soldering. If you don't check out the links above, these boards are very easy to solder - we promise!

Assembly:

Empty kit bag (or if using a raw PCB, acquire parts) and verify contents.

3v3-relay-shield-1.jpg

Place and solder the leads of the resistor. Place the diode in the orientation indicated (silver band over band silkscreen) and solder. Clip off the excess as pictured (also shown are solder pads on the reverse for changing the controlling digital pin).

3v3-relay-shield-2.jpg 3v3-relay-shield-3.jpg

Insert the NPN transistor, matching the shape with the printing on the board and solder and clip the leads. Make sure that it doesn't overhang the spot reserved for the relay.

3v3-relay-shield-4.jpg

Next place and solder the 3-pin screw jack, with the wire terminals facing out from the board.

Tip: A small breadboard is about the right height to support the board upside down while soldering.

3v3-relay-shield-6.jpg 3v3-relay-shield-5.jpg

Next, place the relay's five pins in the holes indicated. The pins may have to be be straightened. Solder and clip.

Cut or Snap a length of one male header 6 pins long and one 3 pins long. Insert into corresponding positions (on the bottom of the board) and solder each pin. Stackable headers are not tall enough to clear the relay height.

Tip: Inserting the headers into a breadboard and then placing the board on top can make this process easier. Unfortunately, most breadboards are one column too narrow for this to work for both the 6-pin and 3-pin headers. What works is to insert the 6-pin header in the edge column, then an extra 2-pin or or 1-pin header in the end row as shown; these are temporarily used to support the board, as is the 3-pin header placed at the diagonal corner. After soldering the 6-pin header (do not solder the 2-pin header!), remove the shield from the breadboard, then partially insert the pins with the third pin of the 3-pin header resting on the center slot. Solder the 3-pin header.

3v3-relay-shield-7.jpg 3v3-relay-shield-8.jpg

Your 3.3V Relay shield is complete!

CAUTION: Care must be used with working with live AC loads, Digistump LLC takes no responsibility for injury, damage, or death that may result from improper connection of the relay shield.

Programming:

The relay can be turned on and off by simply setting P5 high or low.

The relay can also be connected to P2 by cutting the thin trace between the inner solder jumpers and bridging the outer solder jumper with solder.

oak/tutorials/relay.1456160779.txt.gz · Last modified: 2016/02/22 09:06 by wminarik