Jump to content


Photo
- - - - -

Using a Relay Board With CAI Webcontrol


  • Please log in to reply
38 replies to this topic

#1 Lou Apo

Lou Apo

    Cocoonut

  • Registered
  • PipPipPipPip
  • 2614 posts
  • Location:Austin TX
  • Experience:average
  • Hardware:ISY-99
  • Tech:INSTEON
  • Audio:Custom
  • Video:Windows Media Center
  • CCTV:analog, dvr

Posted 24 June 2011 - 04:22 PM

I purchased a relay board on ebay to use with my CAI. Of course, it came from china without a lick of documentation and no responses to emails.

The CAI outputs 8 TTL signals that can drive solid state relays, but these are coils. So, I need a separate power source to operate the relays. The relay board has a VCC contact which is where that power source goes. Question I have is the unit only has one ground (there are 2 contacts but they are connected on the pcb). Is it OK to share the ground from the CAI outputs with a ground from a separate power supply? And do you think a 9v power supply would be ok?

Also, there are three pins to the right. Gnd, VCC, JD-VCC. What the heck is JD-VCC? The unit arrived with a jumper connecting VCC with JD-VCC.

Posted Image
Posted Image
Posted Image

Thanks.

#2 damage

damage

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1106 posts
  • Twitter:@doghouselabs
  • Location:silicon valley, ca
  • Experience:guru
  • Software:Custom
  • Hardware:TimeCommander+, Custom
  • Tech:X10-PLC, X10-RF, UPB, Z-Wave, 1-Wire, xAP, xPL
  • Audio:Squeezebox
  • Video:SageTV
  • CCTV:analog, ip, dvr
  • Phone:Asterisk, Linksys PAP2, magicJack, OBi100/110

Posted 24 June 2011 - 06:07 PM

saw that board somewhere - might this help? http://arduino-info....om/ArduinoPower

#3 linuxha

linuxha

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 231 posts
  • Location:NJ, USA
  • Software:Mister House, Custom
  • Hardware:Elk M1, ISY-99, Ocelot, Custom
  • Tech:X10-PLC, X10-RF, INSTEON, ZigBee, Custom
  • Video:Custom
  • CCTV:ip

Posted 24 June 2011 - 06:21 PM

I purchased a relay board on ebay to use with my CAI. Of course, it came from china without a lick of documentation and no responses to emails.

The CAI outputs 8 TTL signals that can drive solid state relays, but these are coils. So, I need a separate power source to operate the relays. The relay board has a VCC contact which is where that power source goes. Question I have is the unit only has one ground (there are 2 contacts but they are connected on the pcb). Is it OK to share the ground from the CAI outputs with a ground from a separate power supply? And do you think a 9v power supply would be ok?

Also, there are three pins to the right. Gnd, VCC, JD-VCC. What the heck is JD-VCC? The unit arrived with a jumper connecting VCC with JD-VCC.

Thanks.


Posted Image

Google to the rescue! JD-Vcc looks like it's a the power for the relays. to keep it isolated they use 2 different power supplies (might not be important in your case).

#4 Lou Apo

Lou Apo

    Cocoonut

  • Registered
  • PipPipPipPip
  • 2614 posts
  • Location:Austin TX
  • Experience:average
  • Hardware:ISY-99
  • Tech:INSTEON
  • Audio:Custom
  • Video:Windows Media Center
  • CCTV:analog, dvr

Posted 24 June 2011 - 06:38 PM

Thanks. I googled this thing but must have been using the wrong search terms. This answers a ton. And I am happy to see that the Arduino people have no clue what JD-VCC is supposed to stand for either!

This is sort of as I suspected and I am glad to see it this way. This way I can power the relays without over drawing the CAI unit.

#5 Lou Apo

Lou Apo

    Cocoonut

  • Registered
  • PipPipPipPip
  • 2614 posts
  • Location:Austin TX
  • Experience:average
  • Hardware:ISY-99
  • Tech:INSTEON
  • Audio:Custom
  • Video:Windows Media Center
  • CCTV:analog, dvr

Posted 24 June 2011 - 06:58 PM

OK, this is a bit annoying.

The "inputs" on this relay board work by closing to ground. The current flows from Vcc to the relay tripping mechanism (led driven optical), to the input, to ground. So to turn a relay on, you don't give 5v to the input, you close it to ground.

Now this isn't at all what I expected. I tested the CAI and when the output is "off", it does conduct to ground. This would mean that having the output off, makes the relay turn on.

Do you suppose that driving current backward through the ouput when it is "off" will damage the CAI?

Turning the CAI output "on" will put 5v at both sides of the relay tripping mechanism resulting in no current and turning the relay "off". This part poses no risk of damage.

Edited by Lou Apo, 24 June 2011 - 07:00 PM.


#6 Lou Apo

Lou Apo

    Cocoonut

  • Registered
  • PipPipPipPip
  • 2614 posts
  • Location:Austin TX
  • Experience:average
  • Hardware:ISY-99
  • Tech:INSTEON
  • Audio:Custom
  • Video:Windows Media Center
  • CCTV:analog, dvr

Posted 26 June 2011 - 12:19 PM

I went ahead and wired up the CAI to the relays. Indeed, turning the output "off" turns the relay on. I used a separate power supply to drive the relay board, so all the cai is doing is driving the optical switches.

I measured the current that the optical switch draws and it was a bit over 1 milliamp. So when the output on cai is "off", it is running 1 milliamp backwards into the output. I used the unit for a few hours turning the outputs on/off/on/off and it worked as expected.

I pulled the 5v power for the optical switch part of the relay board from the 5v output that is part of the "input" section on the cai board. So, when the output is "on" it is pushing 5v out the output against the 5v comming from the 5v "input". There is thus no potential and no current flow so the optical switch is off and the relay is off. When you turn the output off, it stops pushing 5v at the output and lets current flow backwards into the output and to ground, turning on the optical switch which turns on the relay (which is driven by a separate power supply).

I suspect that 1 milliamp is so little juice that even if running current backward through the output section won't cause any harm. So far it hasn't.

#7 fwd03

fwd03

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 248 posts

Posted 30 June 2011 - 01:11 AM

In the CAI webcontrol, you can go to output setup to invert the output. That way, logic 1 will actually be zero.
Most ebay relay board with transistors working gerat with WebControl.

The opto-isolation chip input should be connect to the WebControl TTL output, IN0-IN7 to P1-P8. WebControl TTL output chip is 100mA at one terminal, or 200mA total with all 8 of them. So 1mA is well within the limit.

Edited by fwd03, 30 June 2011 - 01:14 AM.


#8 Lou Apo

Lou Apo

    Cocoonut

  • Registered
  • PipPipPipPip
  • 2614 posts
  • Location:Austin TX
  • Experience:average
  • Hardware:ISY-99
  • Tech:INSTEON
  • Audio:Custom
  • Video:Windows Media Center
  • CCTV:analog, dvr

Posted 30 June 2011 - 07:20 AM

I found in the manual the following sentence.

"The maximum current that can be sourced or sinked by one of these outputs at a time is 20mA or 100mA for the whole board".

The "or sinked" part of the statement is what makes me comfortable with running the power backwards into the output.

And I did do the state inverted which does not change the "0", "1", it only changes how the unit responds to pushing the "on" or "off" button. With state inverted, pushing "on" sets the output to "0" (on the units gui).

#9 fwd03

fwd03

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 248 posts

Posted 01 July 2011 - 12:49 AM

The chip is a 74LV4245, the spec for that chip is beyond what CAI stated. One spec sheet saying 50mA per pin and 100mA in total. I tried to put a LED about 100mA load on one TTL output, the chip getting really hot, but did not damage the chip.

Do you have BRE firmware or PLC firmware? In my board, which is PLC, on the "I/O setup" screen, there are two sections, TTL Input and TTL Output. both sections having invert allow invert the TTL input or output.

#10 fwd03

fwd03

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 248 posts

Posted 03 July 2011 - 06:59 PM

datasheet for 74LVC4245 is here, same function and voltage level with max total 100mA rating:
http://www.nxp.com/d.../74LVC4245A.pdf
the max total rating is different from fairchild brand, which has max total 200mA rating.
But Fairchild datasheet did state normal operational current per channel 24mA, max 50mA.

So it should be careful not to run too much current through its output. If you feel the chip getting warm, you may want to reduce the load current on it.

#11 NC7U

NC7U

    Newbie

  • Registered
  • Pip
  • 3 posts
  • Experience:novice
  • Software:Custom
  • Hardware:Custom
  • CCTV:ip

Posted 03 February 2012 - 11:12 PM

Purchased the same board and did not like to use the invert function of the CAI-Webcontrol board. I was able to wire a jumper from the IN1 (indicator LED) to the transistor input, thus bypassing the opto-isolator. In the future no more opto-isolator boards unless they are necessary.

#12 pikeaggie

pikeaggie

    Newbie

  • New Member
  • Pip
  • 2 posts

Posted 11 February 2012 - 12:29 AM

Lou apo,

I have this same setup and was googling and came across you posts. What are you controlling with your relay board? I would like to control my sprinklers, is this possible? I thought I would be able to find more info online but am not having much luck. I am pretty computer literate, and have very basic electrical knowledge. I think you hook up the outputs on the webcontrol board to the pins on the relay board and use the no and common for the sprinkler valves. Where do I power the relays, on the vcc input? How many volts to power these? Any help would be appreciated. Also if you have pics of your setup that would be very helpful and greatly appreciated.

#13 pikeaggie

pikeaggie

    Newbie

  • New Member
  • Pip
  • 2 posts

Posted 11 February 2012 - 01:35 AM

Posted Image
basically i am thinking like this.

#14 Lou Apo

Lou Apo

    Cocoonut

  • Registered
  • PipPipPipPip
  • 2614 posts
  • Location:Austin TX
  • Experience:average
  • Hardware:ISY-99
  • Tech:INSTEON
  • Audio:Custom
  • Video:Windows Media Center
  • CCTV:analog, dvr

Posted 11 February 2012 - 04:55 PM

That relay board works fine, but it is a little more confusing to think about becuase it basically runs backwards. I wired it up at my friends warehouse and it is used to trip zones on his alarm system that arm/disarm it and it is also hooked up to some magnetic door locks to activate/deactivate. Using CAI he can do this over the internet.

For a sprinkler, you would probably want to hook your valve power (24vac?) up to all the common spots for the relays. Just daisy chain it accross. Then hook up each individual zone positive to each of the 8 NO spots. The zone common wires all get spliced together with the neutral leg from your transformer.

The Vcc accepts 5v of juice and it powers the actual relays. Each of the control wires from the relay board will turn the relay on when it closes to ground. This is backwards from the usual. When connected to cai outputs, it will cause the relay to turn on, when the output is off.

The deal is, when cai outputs 5v from one of its ttl outputs and it is plugged into one of the relay control spots on the relay board, it will be 5v butted up against 5v. There will be no flow of electricity and the relay will be off. When cai turns off the 5v output, then current backflows from the relay board into cai and to ground activating the opto-isolated switch which turns the relay on. For this to all work, the relay board and the cai need to share grounds.

This relay board is simpler becuase it follows the normal logic, CAI output on, relay on.
http://www.ebay.com/...=item5d30720b14

Edited by Lou Apo, 11 February 2012 - 05:11 PM.


#15 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1978 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 30 April 2012 - 01:11 PM

Lou,

Thanks for pointing out the difference in how inputs are driven on the Electronics Salon Rly-2 board (described in your eBay link) from other popular relay boards like those from SainSmart (commonly used with Arduino).

If possible I'd like to avoid is two separate power supplies: one for the WebControl and another for the relay board. What I'd like to know is if the 8-relay board (Electronics Salon) can be powered by the WebControl's 5V output. If all 8 relays were to be activated, do you know if the current draw would exceed what the WebControl's 5V output can supply? The eBay page indicates 800mA with all relays activated. Is it simply a matter of ensuring the WebControl's 9VDC supply can supply sufficient current (say a 1A rating) or will its onboard regulator (I'm assuming it has something onboard to efficiently drop the 9VDC to 5VDC) be overtaxed?

Edited by 123, 30 April 2012 - 01:13 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users