Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] How do you wire these relay boards from ebay

Status
Not open for further replies.

boylesg

Advanced Member level 4
Advanced Member level 4
Joined
Jul 15, 2012
Messages
1,023
Helped
5
Reputation
10
Reaction score
6
Trophy points
1,318
Location
Epping, Victoria, Australia
Activity points
11,697
I have powered this board and have a LED connected to one of the relays.

My LED cathode is connected to either of the outside screw connectors of one of the relays.
The middle screw connector is connected to GND on my mega.
The anode of my LED is connected to 5V on my mega.


But it does not seem to matter what logic level I write to the in pin on the relay board that corresponds to the relay with the LED.
If I connect the cathode of of LED to the left most screw connector (in the picture below) of any relay then the LED is always on.
If I connect the cathode of my LED to the right most screw connector of any relay then the LED is always off.

What am I missing? Are you meant to turn them on/off with PWM rather than a steady logic level?


$_12.JPG

https://i.ebayimg.com/00/s/OTM1WDkzNQ==/z/Na0AAOSwPcVVxaLu/$_12.JPG
 

In case you don't have the datasheet for the relay:
http://www.songle.com/en/pdf/20084141716341001.pdf

Doesn't the board come with some instructions, or a link to some website or other? I guess - with good reason - it's not possible to follow the traces underneath, if they are visible, so see what goes where on that board?

Post a schematic of your wiring, please, it would help loads.

I don't know the board, but looking at the relay, I suspect - only guessing - you may be connecting the LED to the incorrect side of the relay, but I'm probably wrong.
 

In case you don't have the datasheet for the relay:
http://www.songle.com/en/pdf/20084141716341001.pdf

Doesn't the board come with some instructions, or a link to some website or other? I guess - with good reason - it's not possible to follow the traces underneath, if they are visible, so see what goes where on that board?

Post a schematic of your wiring, please, it would help loads.

I don't know the board, but looking at the relay, I suspect - only guessing - you may be connecting the LED to the incorrect side of the relay, but I'm probably wrong.

This is all I have unfortunately: http://www.ebay.com.au/itm/151772531956?_trksid=p2060353.m2749.l2648&ssPageName=STRK:MEBIDX:IT

- - - Updated - - -

Forget it!

It was a problem with an array initialization containing my pin numbers.

const uint8_t CProgram::m_arrayDigitalPinNums[] = {22, 24, 26, 28, 30, 32, 34, 36};

Originally I had this as a global variable and for some reason the initialization bit in the curly braces did not work such that my array contained garbage.

But I made it a member of my class and now the array initialization works and I can turn my LED on of off.

And the relay is active LOW rather than HIGH.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top