ZappBots wishes a warm welcome to everyone.

Especially our visitors from
Savage///Circuits and Parallax!!!


Please take a look our new forums, we hope you register and become an active user.

The ZappBots forums are being run on phpBB 3.1.4 software which is different then the vBulletin used on the Savage///Circuits and Parallax forums.
Therefore, things look and work a little different, especially creating posts and uploading images / attachments.


The important thing is we have a place toTalk, Learn and Showcase our projects.

Test of a Sain Smart 8 Relay Module Board with an Arduino Uno Board

This is the place to talk about Arduino Boards and their clones
User avatar
zappman
Administrator
Administrator
Posts: 116
Joined: Wed May 06, 2015 12:31 am
Contact:

Test of a Sain Smart 8 Relay Module Board with an Arduino Uno Board

Postby zappman » Thu May 14, 2015 6:04 pm

Test of a Sain Smart 8 Relay Module Board with an Arduino Uno Board
(Originally posted on the Savage///Circuits Forums December 27th, 2014, 06:04 PM by zappman)

Test of a Sain Smart 8 Relay Module Board part number 20-018-102 (ignore all the technical information here its wrong) with an Arduino Uno Board.

Link to part at Microcenter where I purchased the board for $11.99

To learn how to use this board, and how it works go to this link; http://arduino-info.wikispaces.com/ArduinoPower

*** Warning: Make sure you understand the correct operation of the Pins labeled "GND VCC JD-VCC" or you will damage your micro-controller board ***

Image

Image

Image

https://youtu.be/Yjw9HMGydHI

The Test Code

Code: Select all

/*
Test Program B Rev001 for the Sainsmart "5V 8-Channel Relay interface board" 20-018-102
Night Rider Chase Sequence Demo

This example code is in the public domain.

2014_12_13
by M. Sapp
*/
const int NbrRLYs = 8;
const int rlyPins[] = {2, 3, 4, 5, 6, 7, 8, 9};
const int wait = 30; // 1000 = wait for a second

// this setup function runs once when you press reset or power the board
void setup(){

//When the baords power on or are reset, we want to ensure all relays are NOT energized
// To turn the Relays & LEDs off, a Logic High is needed on each input pin to the relay board
// Set the pins to Logic Highs

for (int rly = 0; rly < NbrRLYs; rly++)
{
digitalWrite(rlyPins[rly],HIGH); //relay IN8, Right most thru relay IN0, Left most
pinMode(rlyPins[rly],OUTPUT); //relay IN8, Right most thru relay IN0, Left most // initialize digital pins as an outputs.
}

}

// this loop function runs over and over again forever
void loop() {

for (int rly = 0; rly < NbrRLYs-1; rly++)
{
digitalWrite(rlyPins[rly], LOW);
delay(wait);
digitalWrite(rlyPins[rly+1], LOW);
delay(wait);
digitalWrite(rlyPins[rly], HIGH);
delay(wait*2);
}

for (int rly = NbrRLYs-1; rly > 0; rly--){
digitalWrite(rlyPins[rly], LOW);
delay(wait);
digitalWrite(rlyPins[rly-1], LOW);
delay(wait);
digitalWrite(rlyPins[rly], HIGH);
delay(wait*2);
}

}
Image
butlh ghajbogh nuv'e' yIHo'.
Admire the person with dirt under his fingernails.

User avatar
Sparky
Member
Member
Posts: 17
Joined: Sat May 09, 2015 11:08 am
Contact:

Re: Test of a Sain Smart 8 Relay Module Board with an Arduino Uno Board

Postby Sparky » Thu May 14, 2015 6:38 pm

(Originally posted on the Savage///Circuits Forums December 28th, 2014, 06:47 PM by Chris Savage)

I will check it out tonight. I did watch the video though. Looks like the relays are driven by optos?

User avatar
zappman
Administrator
Administrator
Posts: 116
Joined: Wed May 06, 2015 12:31 am
Contact:

Re: Test of a Sain Smart 8 Relay Module Board with an Arduino Uno Board

Postby zappman » Thu May 14, 2015 6:42 pm

Chris Savage wrote:(Originally posted on the Savage///Circuits Forums December 28th, 2014, 06:47 PM by Chris Savage)

I will check it out tonight. I did watch the video though. Looks like the relays are driven by optos?


Yes the relays are driven by optos, but the inputs to the 8 optos are wired strangely.
The 8 mechanical relays energize when a logic '0' is input to the boards input pin(s).
For the $11.99 I paid for this board at a local store, I consider it a terrific bargain.
I have not yet tested the contacts of the mechanical relays.

*** Warning: Make sure you understand the correct operation of the Pins labeled "GND VCC JD-VCC" or you will damage your micro-controller board ***
Image
butlh ghajbogh nuv'e' yIHo'.
Admire the person with dirt under his fingernails.


Return to “Arduino Boards”

Who is online

Users browsing this forum: No registered users and 1 guest