SeeedStudio Relay shield V1.3 won't work

Greetings fellow arduinoers. (Sorry, I like to make up words.)

I'm attempting to learn to use a seed studio relay shield (V1.3), but I can't seem to make it work. I've read all I could find about it, which doesn't seem to be much.

I don't believe the problem is my sketch/code because when I run it I can hear a clicking sound that I'm assuming is the relays opening/closing. The light stays on if I put it through the normally closed holes so the problem isn't with my circuit/LED.

I've tried pretty much every combination of pins possible and still can't get it to work.

The arduino is running off the USB connection with my computer and I have 9V supplied to the relay shield.

Can anyone help me get this to work or have any suggestions? Thanks in advance for any help that can be provided.

Hi and welcome.

Please read the forum manual (click !), just take some time and do that, it will help you and anyone else on this forum.

How did you connect the shield, and to what did you connect it ? How did you power the shield ? Did you isolate the USB connector (seeedstudio ssems to have messed up designing this thing) ? Did you read this product page, which has pretty much all information you need ?

How did you connect the shield, and to what did you connect it ? I just placed it on top of the Arduino Uno.

How did you power the shield? I used a 9V battery going into the DC power plug socket.

Did you isolate the USB connector (seeedstudio seems to have messed up designing this thing) ? If by isolate, you mean add tape to the Arduino Uno to make sure it doesn't contact the shield, then yes. If that's not what you meant, then I have no idea what you're talking about and that might be my problem.

Did you read this product page, which has pretty much all information you need? Yes, I read the the product page, that's where I got the script to test the shield. However, I can't find anything there that helps.

A 9 volt battery sucks. Don't use it. Use a decent power supply instead.

Small 9V PP3-sized batteries do not produce enough current for any motor, servo, and most relays. The click may be the relay trying to close and failing as the current drops. I presume you've measured the relay contact resistance to confurm its not properly switching.

You can test this theory by measuring the 9V supply as you operate the relay.

//  RelayShieldDemoCode.pde  to control seeed relay shield by arduino.
//  Copyright (c) 2010 seeed technology inc.
//  Author: Steve Chang
//  Version: september 2, 2010
//
//  This library is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Lesser General Public
//  License as published by the Free Software Foundation; either
//  version 2.1 of the License, or (at your option) any later version.
//
//  This library is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//  Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public
//  License along with this library; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

unsigned char relayPin[4] = {4,5,6,7};

void setup()
{
  int i;
  for(i = 0; i < 4; i++)
  {
    pinMode(relayPin[i],OUTPUT);
  }
}

// just an simple demo to close and open 4 relays
// every other 1s.
void loop()
{

  int i=0;
  for(i = 0; i < 4; i++)
  {
    digitalWrite(relayPin[i],HIGH);
  }
  delay(1000);
  for(i = 0; i < 4; i++)
  {
    digitalWrite(relayPin[i],LOW);
  }
  delay(1000);
 
}

Hi i use this xbee bluetooth module that i cant get to work.
HC-05-Bluetooth-XBee-Master-Slave-Modul-RED
on the RELAY SHIELD v1.3
Relay Shield V1.3 4 Channel Arduino
and i think i make something wrong.
I couldn’t been able to get it to work.

could some one explain it step by step. with all jumpers and how to setup the bluetooth module via script or AT-commands or something else.

The script on top work nicely. The relais works.
I use for the BT-Connection a Android-mobile and the “Ardudroid” APP 0$ from Store.
Mobile to HC-05 XBEE is connected and paired.

Thank you in anticipation!

Hi.

Explain what you expected, and what you got instead. "It doesn't work" will not help anyone to understand what might be going wrong, so helping you with that is going to be almost impossible.

Did you try each module separately on your Arduino (which one do you have ?) ? Did you check the modules don't need some pin at the same time, generating some conflict ?

I have this ARDUINO UNO BOARD
My problem ist the connection between Arduino Relais Board and the Mobile Ardudroid APP.
It seems that XBEE didn’t recive any data.

I use this script from this SITE.

// AllRelayTest.pde to test 5V, 4-Mechanical Channel Relays Shield Module For Arduino UNO R3 XBEE V1.3
// Make sure you run +9 Volts DC (500ma or above) to the relay shield. Attach shield to Arduino insuring correct pin configuration.
//
// Copyright (c) 2015
// Author: Daniel Schilz, silverfoxdan.com
// Version: 9-9-2015
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

// First lets set up two character arrays that identify the appropriate data pins and relays on the relay shield

unsigned char relayPin[4] = {7,6,5,4}; // relay 1,2,3 and 4 are on data pins 7,6,5 and 4 respectively
unsigned char relayID[4] = {1,2,3,4}; // acutal relay numbers, CAUTION serial.println will sometimes lag the actual relay action but you can use the following to test individual relays, use an ohm meter to verify if desired

//Test individual relays by commenting out the above two lines and activating the two lines below this comment. You don’t need to modify anything else in the setup or loop functions… just these two lines below.

//unsigned char relayPin[1] = {7}; // change {#} to 7 for relay 1, 6 for relay 2, 5 for relay 3 and 4 for relay 4
//unsigned char relayID[1] = {1}; // just make {#} the relay number that corrosponds to what you entered on the above line (will show relay identification on serial monitor)

int Delayit = 1500; // 1 1/2 second delay in switching, change this as you desire but suggest 500 (1/2 sec) as minimum

void setup()
{
int i;
Serial.begin(9600); // Initialize the serial port for monitoring

for(i = 0; i < sizeof(relayPin); i++) // for loop that initializes all the Arduino digital ports as outputs
{
pinMode(relayPin[i],OUTPUT);
}

} // end of setup function

void loop()
{

int i=0;

// Now lets step through all the relays and turn them on
for(i = 0; i < sizeof(relayPin); i++)
{
digitalWrite(relayPin[i],HIGH);
delay(Delayit); //delay between each relay switch
Serial.println(" ");
Serial.println("Relay ");
Serial.println(relayID[i]);
Serial.println(" On ");
}

delay(Delayit); //extra delay between each relay on-off functions

Serial.println(" ");
Serial.println("—");
Serial.println(" ");

// Now lets step through all the relays and turn them off
for(i = 0; i < sizeof(relayPin); i++)
{
digitalWrite(relayPin[i],LOW);
delay(Delayit); //delay between each relay switch
Serial.println(" ");
Serial.println("Relay ");
Serial.println(relayID[i]);
Serial.println(" Off ");
}
delay(Delayit);

Serial.println(" ");
Serial.println("—");
Serial.println(" ");

} // end of loop function

And i wired nothing.No jumper no wire. Have only put the 2 boards together.

Thank you in anticipation!

Note that your example code assumes the relay board is using NPN low-side switching. Some of those relay boards are designed to use PNP high-side switching, in which case the logic needs to be inverted to turn on the relay (ie - LOW = ON, HIGH = OFF). Just a bit of FYI - you'll have to figure out what you have based on the board, the schematic, and maybe part numbers of the transistor on-board the relay board.

Then again - if this were the case - you would be seeing an inverted operation - not zero operation...

Still not possible to post something from Mobile to Serial Monitor.
if i write something in the serial monitor he says bluetooth is available.
is it possible to configure this xbee with at commands from arduino.
here is my script that i glue together from many other scripts to test.
is here somebody that used this relay shield v1.3 with this xbee and can help.

#include <SoftwareSerial.h>

//Still no connection from mobile to relay 

int bluetoothTx = 0;  //IS THIS CORRECT FOR THIS BOARD????
int bluetoothRx = 1; // pairing is possible but is it correct???


SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
unsigned char Pin[4] = {2,3,4,5};   //work fine
void setup()
{
 Serial.begin(9600);    //no problem
  int i;
  for(i = 0; i < 4; i++)
  {
    pinMode(Pin[i],OUTPUT);  //no problem
    Serial.print(Pin[i]);
  }
 Serial.print(" set as DIGITAL OUTPUT for RELAY");

 bluetooth.begin(38400); //IS THIS CORRECT FOR THIS BOARD????
 //bluetooth.print("+++");
 //bluetooth.println("U,38400,N");
 bluetooth.println("ATRE"); //IS THIS POSSIBLE, or need it "+++" or something else
}
void loop()
{
  //WHY bluetooth is available if i write something in Serial Monitor
   // without any Bluetooth paired connection. 
  if(bluetooth.available())
  { 
    char aChar = bluetooth.read();
    Serial.println("Got Bluethooth signal" );
    //this message come when i write something in Serial monitor on PC
    // like i say Mobile Bluetooth connection was paired but nothing comes to this IF via bluetooth
      Serial.println(aChar);
      digitalWrite(Pin[1],HIGH);    
  }
  
  if(Serial.available())
  {
    char toSend = (char)Serial.read(); 
    Serial.println("REPLAY ");
    // this work good but give a signal to bluetooth hmmm?
    Serial.println(toSend);
    digitalWrite(Pin[2],HIGH);
  }
  delay(500);
  digitalWrite(Pin[1],LOW); //the relay goes on and off if i write something in serial monitor
  digitalWrite(Pin[2],LOW);
}

be36fb95ad4e9fe991d9b382d1538fb345080dad.jpg

Forget my questions.