Differences

This shows you the differences between two versions of the page.

Link to this comparison view

atmel:relaycontroller [2009/11/27 17:53] (current)
Line 1: Line 1:
 +======Introduction =======
  
 +This project details how to connect Opto-Isolated Relay Board to an AVR development board
 +
 +{{portflip.jpg}}
 +
 +Looking for the AVR source code?  Here you go [[RelayControllerSource]] and with an RS232 terminal session [[RelayControllerSource2]]
 +
 +
 +=====What is needed=====
 +
 +^ Hardware ^ Description ^
 +| {{devbrd.gif}} | **Atmel AVR Microcontroller Development System**\\ This kit was kindly provided to me by the friendly people over at http://​www.btinternet.com/​~e2one/​avrbrd/​ |
 +| {{lcd8x24.gif}} | **8x24 LCD Display** \\ Details of how to wire up a 8x24 display to the development board can be found at http://​www.btinternet.com/​~e2one/​avrbrd/​ (see the 8x24 LCD Project). If you use a smaller display then you will have to modifying the code to suit. |
 +| {{relay4.jpg}} | **Relay board**\\ Opto-Isolated Relay Board, includes 4 channels for remote control of Mains appliances and circuits. Ideal for home control and industrial applications. Each channel is controlled by a TTL input and can easily be controlled by a microcontroller or control system.\\ {{atmel:​et-opto_relay4_manual.pdf}} |
 +| {{relaycable.jpg}} | **Relay cable **\\ Cable to wire the AVR board to the relay board |
 +
 +
 +
 +<note warning>
 +Schematic for the AVR board does not align with the actual hardware.
 +</​note>​
 +
 +So, to wire a suitable cable to connect the relay board to the '​LCD'​ connector on the 2313 board, the following mapping can be used
 +
 +^2313 LCD Connector^6 Pin IDC ^
 +|1 |Vcc |
 +|3 |Out0 - PB2 |
 +|5 |Out1 - PB3 |
 +|12| Out2 - PB4 |
 +|13| Out3 - PB7 |
 +|8 |Gnd |
 +
 +The relay board itself requires a DC supply in the region of 12V. When running the relay board from the 2313 dev board, the easiest way to get 12V for the relay board is to leech 12V from the little two pin molex (marked '​DCIN'​) that is beside the DC power jack connector on the 2313 board (as shown in the picture at the top of this page).
 +
 +====The Software ====
 +
 +As the ATMEL AT90S2313 only has 2k of code space the demo version of [[http://​www.mcselec.com/​bascom-avr.htm|BASCOM]] can be used without hitting any of its restrictions.
 +
 +{{tag>​avr bascom}}