Difference between revisions of "RPi Tutorial EGHS:12V relay driver"

From eLinux.org
Jump to: navigation, search
(The Hardware)
(The Hardware)
 
Line 19: Line 19:
 
==The Hardware==
 
==The Hardware==
 
The 12V relay driver circuit combines protection circuits described in [http://elinux.org/RPi_Tutorial_EGHS:GPIO_Protection_Circuits GPIO Protection Circuits].
 
The 12V relay driver circuit combines protection circuits described in [http://elinux.org/RPi_Tutorial_EGHS:GPIO_Protection_Circuits GPIO Protection Circuits].
Design was done with respect to maximize GPIO protection and minimize GPIO current withdraw.  
+
Design was done with respect to maximize GPIO protection and minimize GPIO current withdraw. The zener diode D1 protects the GPIO pins from over-voltage. R2 and LED D2 is used just to display port status, it may be removed. Transistor T1 is used to minimize current withdraw from GPIO 3.3V output pin. T1 drives the D2 as well as opto-coupler LTV 815. This opto-coupler is capable of driving load up to 80mA, so 12V relay is controlled directly if requires less than 80mA. D3 does relay high voltage protection. 
  
[[File:12v.relay.dtriver.png|400px|thumb|left]]
+
[[File:12v.relay.dtriver.png|none|400px|thumb|left]]
 +
 
 +
 
 +
Test board for RPi with two independent 12V relay drivers connected to GPIO pins #11 and #12
 +
[[File:12.relay.driver.test1.jpg|none|400px|thumb|left]]
 +
 
 +
Test board attached to RPi
 +
[[File:12.relay.driver.test2.jpg|none|400px|thumb|left]]

Latest revision as of 22:35, 31 July 2012

Back to the Hub, or the Tutorials page.


GPIO Hardware & Software Tutorials:


This page is part of a work in progress.

Warnings

While most of these circuits may interface directly to the RPi, the use of a buffered interface (such as the one supplied by the Gertboard) is recommended which will help protect against damage. Alternatively, experiment with one of the Alternative Test Platforms.


Extreme caution should be exercised when interfacing hardware at a low level, you may damage your RPi, your equipment and potentially yourself and others. Doing so is at your own risk!

Aims

Note:
The 12V relay driver circuit has been tested with real RPi device and was working properly.

The Hardware

The 12V relay driver circuit combines protection circuits described in GPIO Protection Circuits. Design was done with respect to maximize GPIO protection and minimize GPIO current withdraw. The zener diode D1 protects the GPIO pins from over-voltage. R2 and LED D2 is used just to display port status, it may be removed. Transistor T1 is used to minimize current withdraw from GPIO 3.3V output pin. T1 drives the D2 as well as opto-coupler LTV 815. This opto-coupler is capable of driving load up to 80mA, so 12V relay is controlled directly if requires less than 80mA. D3 does relay high voltage protection.

12v.relay.dtriver.png


Test board for RPi with two independent 12V relay drivers connected to GPIO pins #11 and #12

12.relay.driver.test1.jpg

Test board attached to RPi

12.relay.driver.test2.jpg