Difference between revisions of "4-Channel Lora Relay-10A"

From MakerFabsWiki
Jump to: navigation, search
Line 22: Line 22:
  
 
Pins connection:<br>
 
Pins connection:<br>
 
+
{| cellspacing="0" cellpadding="5" border="1"
 +
|-
 +
| align="center" width="200" | '''Atmega328P'''
 +
| align="center" width="150" | '''Relay'''
 +
|- style="font-size: 90%"
 +
| align="center" | D4
 +
| align="center" | K1
 +
|- style="font-size: 90%"
 +
| align="center" | D3
 +
| align="center" | K2
 +
|- style="font-size: 90%"
 +
| align="center" | A3
 +
| align="center" | K3
 +
|- style="font-size: 90%"
 +
| align="center" | A2
 +
| align="center" | K4
 +
|}
  
 
==Usage==
 
==Usage==

Revision as of 04:00, 21 September 2020

Introduce


4-Channel Lora Relay-10A based on the Arduino, users can program it with Arduino IDE, which is very easy especially suit for the none-programmers. There are also guide for users to learn how to create the first IoT project with this board, with which the starters can learn the hardware and programming skill quickly.
Modul:

Feature


  • ATMEL Atmega328P: High Performance, Low Power Atmel®AVR® 8-Bit Microcontroller
  • Speed Grade:20Mhz
  • Flash:32Kbytes
  • RAM: 2KBytes
  • EEPROM: 1Kbytes
  • Relay type: General Purpose
  • Rated current of relay contact: 10A
  • Coil type of relay: Non Latching
  • Coil voltage of relay: 5V
  • Switching voltage of relay: (277VAC , 28VDC) Max
  • DC12V or 5V input

Diagram


Pins connection:

Atmega328P Relay
D4 K1
D3 K2
A3 K3
A2 K4

Usage


Hardware connection


The USB TO UART TOOL is needed to connect the module and PC. The pins connections is:

4-Channel Lora Relay-10A USB-to-UART Tool
3V3 3V3
GND GND
RX TXD
TX RXD
DTR DTR

Software setup


Open the Arduino, select the tools menu and set the parameter, as the figure:


Lora Transmitter


You can get the code from here:
Open the code and modify the frequency macro according to your board is 433Mhz or 868Mhz or 915Mhz.

#define RF95_FREQ 868.0 

Verify and upload it. After finish, open the “Tools—Serial Monitor” and the information of Lora Transmitter will be shown in the monitor, as the figure.

Lora Receiver


You can get the code from here:
Open the code and modify the frequency macro according to your board is 433Mhz or 868Mhz or 915Mhz.

#define RF95_FREQ 868.0 

Verify and upload it. After finish, open the “Tools—Serial Monitor”, If have a transmitter next to it, the recipient will receive data sent by the Transmitter and the monitor will show the received information in the window, as the figure.
If the receiver has received it, the relay will be turned on or turned off. Light on when COM connect to NO, light off when COM connect to NC, and Normally light off.


F&Q


Resources