33 Replies Latest reply on Jun 21, 2015 2:01 AM by mcb1

    4 Channel 12V relay system issues.

    screamingtiger

      mcb1

      I bought this relay system and it doesn't work 

      http://www.ebay.com/itm/231573073495?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

       

      Its a 12V relay system so I have to use 12V into the VCC and the input pins are driven by 5V.  So I connect 5V in, the relays trip.  The code is simple, digital high and low with a 1 second delay.  Pins are output.

      The little LEDS turn off and on as expected but the relays do not trip.  I don't have a load on them but should not matter.  If I use 12V as required into the VCC, the leds only turn on, then go dimmer, never off.

      I have a common ground between the arduino and relay board as well.

       

      What is going on?

       

      I went ahead and 2nd day aired a 5v version, I will just run it off the same regulator as the arduino.  Anybody have any experience with these?

       

      <body><p>I bought this relay system and it doesn't work  <img ___jive_emoticon_name="sad" class="jive_macro jive_emote" jivemacro="emoticon" src="http://www.element14.com/community/images/emoticons/sad.gif"/></p><p><a href="http://www.ebay.com/itm/231573073495?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT">http://www.ebay.com/itm/231573073495?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT</a></p><p></p><p>Its a 12V relay system so I have to use 12V into the VCC and the input pins are driven by 5V.  So I connect 5V in, the relays trip.  The code is simple, digital high and low with a 1 second delay.  Pins are output.</p><p>The little LEDS turn off and on as expected but the relays do not trip.  I don't have a load on them but should not matter.  If I use 12V as required into the VCC, the leds only turn on, then go dimmer, never off.</p><p>I have a common ground between the arduino and relay board as well.</p><p></p><p>What is going on?</p><p></p><p>I went ahead and 2nd day aired a 5v version, I will just run it off the same regulator as the arduino.  Anybody have any experience with these?</p></body>
        • Re: 4 Channel 12V relay system issues.
          mcb1

          Joey

          Did you remove the jumper .. JD-VCC to VCC ?

          You apply the 12v to JD-VCC  NOT THE VCC PIN


          The 5v on the VCC pin is to power the Optocouplers ...

           

          Also note that these turn on with a LOW so you need to reverse your ON/OFF code.

           

           

          Typical poor Asian support.

          The indicator LED's on the schamatic are drawn reversed.

           

          Mark

           

               For anyone else reading this, the rest of the conversation went like this.

           

                 Joey Thompson Jun 18, 2015 3:16 PM (in response to Mark Beckett)

               Let me see if I understand,

               I need 5V to vcc, and 12V to JD-vcc pin?  What is that jumper for then??

           

                      Joey Thompson Jun 18, 2015 3:23 PM (in response to Mark Beckett)

                         Its working now, I have no idea why it does, but I'll take it!  For the opto couplers, do you know the current draw?  I have it connected to a 1A regulator of which I am using 80ma so I assume 920mA is suffice for the opto

                          couplers (all 4).

           

                         Thanks, These are sold all over but seem to be poorly documented, I have used relays but I liked the idea of the opto couplers with the high current throwing around in there.

           

                         Man I owe you, the LEDs and now this.

           

                                Mark Beckett Jun 18, 2015 4:35 PM (in response to Joey Thompson)         

                         What is that jumper for then??

                              Many of these boards have 5v relays BUT you could easily power this from a 12v system.

           

                         For the opto couplers, do you know the current draw?

                              Like most Asian support there is no value for the series resistor.

           

                              However the forward voltage of a LED is approx 1.4v, so 5v - 1.4 (opto) - 1.4 (led) = 2.2v

                              If we assume the resistor is 470 ohms 2.2/470 = 0.0046 or 4.6mA.

                              If the resistor is 220 then about 8mA, for 1k then 2mA.

           

                              Its safe to say you could budget 5mA max for each opto.

           

                              If you want to know how to work it out ....

                              find the datasheet for the opto, and see if you can measure or note the resistor value ...then you can do the maths above ..

                              Man I owe you, the LEDs and now this.

                              So mark my answer correct ... oh you can't its not a question.

                              You haven't found the hidden camera then ...

                              Mark

           

                                     Mark Beckett Jun 18, 2015 4:40 PM (in response to Joey Thompson)

                                   These are sold all over but seem to be poorly documented,

                                   yes but it depends on what supplier you use.

                                   Terry King is very good, he always tests and dicuments all his products, and the price is not much more, but guaranteed.

                                   Opto-Isolated 4 Channel Relay Board

           

                                   Try this page for additional info

                                        http://arduino-info.wikispaces.com/ArduinoPower

                                   NOTE the relays on the board are 5v.

           

                                   Mark

          • Re: 4 Channel 12V relay system issues.
            screamingtiger

            I assume the issue is just with the schematics?

             

            I understand a bit now why the jumper is there.  If the relays were 5V, then I only need to connect into VCC and the jump then shorts the VCC to the JD-VCC.  However since I have 12V relays, this jumper is worthless and should not be there.  I must connect 12V to the JD-VCC for the relays to function.

             

            Not very intuitive at all.

             

            The thing I need to figure out is my batter can get as low as 10V, will the relays still fire?  If not I need to get a 5V version.  The 12V was by accident.

              • Re: 4 Channel 12V relay system issues.
                jw0752

                Hi Joey, From my experience you will probably find that the 12 V relays will close at about 8 volts and release around 3 or 4 volts. If you have a variable voltage supply you can test this for yourself, just be careful to get the polarity correct so you are not shorting your power supply through the flyback diode.

                John

                  • Re: 4 Channel 12V relay system issues.
                    screamingtiger

                    These do not function at all at 5V nor 6.6V for if they did I would not of had any issues    It works well at 11.5.

                     

                    Thanks for the info, I will give it a try and report back.

                     


                      • Re: 4 Channel 12V relay system issues.
                        mcb1

                        These do not function at all at 5V nor 6.6V for if they did I would not of had any issues

                        Did you have the jumper ON at the time ....?

                         

                        jw0752 is quite right they will likely still work at 8v.....

                         

                        Mark

                          • Re: 4 Channel 12V relay system issues.
                            screamingtiger

                            Yes the jumper was on.  Believe me I tried nearly everything except connecting to the JD-VCC.


                            What is JD anyways?

                              • Re: 4 Channel 12V relay system issues.
                                balearicdynamics

                                Hi Joey,

                                 

                                I have no idea what does it means JD but I am sure someone has and will answer soon. Instead I was thinking to the problem of the relay working at 12 VCC In this case you can use - I think you have - a separate VCC voltage to drive the relays, i.e. ULM2003 with obviously the common GND with the board. So when you enable the darlington with the low VCC the external 12VCC closes the circuit and "click" the relay. It's a bit complicated as you add one more component but you save the accidental relays board without the need of a replacement. Take in account that ULM2003 is sufficient as it should not drain too much power as it is only to switch the relay while the power is managed independently by the other side of the relay.

                                 

                                Let me know if you need a sample darlington usage schematics with arduino.

                                 

                                Enrico

                                • Re: 4 Channel 12V relay system issues.
                                  mcb1

                                  What is JD anyways?

                                  Jumper Dynamics .... who knows since it is Asian sourced it may be a mispell ....

                                   

                                  It's likely that it wouldn't work at 6.6v.

                                  The relays are intended for 12v operation, your lamps are designed for 12v operation, so at 11v I would be considering the battery is down beyond safe use.

                                   

                                  Your change to LED's will give a lower operating voltage with similar brightness as LED's are linear.

                                  Incandescent lamps are not...

                                    • Re: 4 Channel 12V relay system issues.
                                      screamingtiger

                                      mcb1 wrote:

                                       

                                      What is JD anyways?

                                      Jumper Dynamics .... who knows since it is Asian sourced it may be a mispell ....

                                       

                                       

                                       

                                      Its getting harder to find things that are not, they have flooded Ebay and Amazon.  They now stock things in the US so the source is from the US meaning its even harder to discern.  Some go to great lengths to forge logos etc.

                                       

                                      I suppose using a reputable retailer is preferred.  I'll admit I do enjoy making a order to china and paying the $2 shipping and waiting a few weeks.  Its a good way to get cheap experimental items such as regulators and discrete components.  Its also hard to beat free 2 day shipping from Amazon.

                                       

                                      However without proper support some things would never work such as this relay board.  I highly doubt I would have connected 12V to the JD-VCC pin, but maybe in desperation.

                                       

                                      Everything in this project Is chinesed sourced except the lights I ordered. Today will be the day I test the wireless adapters so I guess I'll see if I am going to pay the price for my cheapness.

                                       

                                      The Arduino Pro minis I am using a Chinese sourced, they are still nearly $3 but work perfectly and all pins are broken out unlike many other copies.  I do own several legitimate arduinos ordered from Spark Fun.  They just "feel" nicer.  the real pro minis I have I got on sale for $6.

                                       

                                      I don't plan to order any more arduinos I plan to switch to a different platform going forward, probably ARM based though I really like the Parallax Propeller.

                          • Re: 4 Channel 12V relay system issues.
                            peteroakes

                            The jumper is to allow you to completly isolate the drive tothe relays  from the drive to the opto isolators if you want to

                             

                            The optos can probable work on any voltage from 5V to 12V, it is what you use to drive the optos that will limit this. If you use an ULN2003 for example then it will work with 5-12 easily, if your running directly from the output of a controller then it will be limited to 5V (Assuming a 5V controller output but it will have to be able to sink 10mA ish.

                             

                            With the jumper removed you will NOT connect the GND lead to the controller, you will feed the VCC with the supply that is common to the controller (5V for example) and the controller will sink the current to its ground when it wants the relay to turn on

                             

                            the relay power (12V) would be supplied to the JDVcc pin and the ground of the relay board will goto the ground of the 12V supply only

                             

                            this would keep the micro completly isolated from the relay power so less noise interfering with the micro controller.

                             

                            if you have the jumper in place then you can not fed the micro power (5V) to the board as it will not work at that voltage (Relays) and if you power the board with 12V you will need an intermediate driver that will level shift the 5V from the controller to 12V  (IE a ULN2003, Transistor or FET... your choice). see this video for additional info:

                            http://www.element14.com/community/groups/internet-of-things/blog/2014/08/05/driving-big-loads-with-your-micro-controller--no-isolation

                            http://www.element14.com/community/groups/internet-of-things/blog/2014/08/05/drive-big-things-with-added-safety-opto-isolators

                            http://www.element14.com/community/groups/internet-of-things/blog/2014/08/05/sense-big-things-with-your-launchpad-or-arduino-opto-isolated-inputs

                              • Re: 4 Channel 12V relay system issues.
                                mcb1
                                These do not function at all at 5V nor 6.6V for if they did I would not of had any issue

                                Might pay to read the whole post....

                                  • Re: 4 Channel 12V relay system issues.
                                    peteroakes

                                    , did read...

                                    In my post im talking about driving the OPTO isolators from 5 - 12V, not the relays, I clearly say they need 12V and if you have the jumper in then you need 12V +  a level shifter

                                     

                                    Back at ya

                                      • Re: 4 Channel 12V relay system issues.
                                        screamingtiger

                                        He was talking to me.

                                         

                                        12V on the VCC did not work.  Which is odd considering is jumped to JD-VCC, even if I put 12V on the input pins.  I tried.

                                         

                                        In summary, with the jumper installed on the 12V relay system, the whole unit is useless, there is no configuration with the jumper installed that will work.  Even if you level shift the input, I tried.

                                         

                                        The input pins MUSt be 5V, no more.  VCC must be 5V, no more.  JD-Vcc must be 12V (or something close, I will test the lower limit but it is NOT 6.6V, that didn't fire them.)

                                         

                                        this is good information but keep in mine mine is a cheap Chinese knockoff, who knows how it was made and if it will behave as expected, we could discuss all day.  I could make a video proving each scenario, but that may only work for my specific unit!

                                         

                                        I still do not understand why the have a jumper when there are 12V relays and VCC cannot have more than 12V.  (If you put 12V the leds light up permanently while power is installed which is not a good sign)

                                          • Re: 4 Channel 12V relay system issues.
                                            peteroakes

                                            nope, your assesment is correct, relay voltage must be 12V nominal

                                             

                                            the rest is about sinking (NOT Sourcing) the opto input to gnd

                                             

                                            my previous post will work assuming nothing is broken

                                             

                                            Peter

                                            • Re: 4 Channel 12V relay system issues.
                                              mcb1

                                              This is getting to be a long conversation ... but Joey is learning new things

                                              and who knows who else is reading and also gaining knowledge.

                                               

                                               

                                               

                                              peteroakes

                                              Joey put up a link and worded how he hooked it up.

                                              The one item that wasn't was the correct voltage to drive the relay which we have resolved.

                                               

                                              Why when you have an opto coupled input that will work from 5v (the series resistor is too high for 3v3) would you want to run it from 12v, THEN add a level converter to your 5v device.

                                              If there was no way of isolating the relay power from the driver, it would be useful, but in this case the images showed a jumper was available.

                                               

                                              Your suggestion is valid if someone posted a question about how best to use these cheap relay boards ...

                                               

                                               

                                              screamingtiger

                                              Joey The control side can be anything from 5v to whatever.

                                              Most of these boards use a 1k ohm resistor in series with the opto and a LED, and hence at 5v the maximum current is approx 2.2mA (5v -1.4 - 1.4 (leds) = 2.2v  I=E/R = 2.2/1000 = 0.0022A or 2.2mA

                                              At 12v the current rises to 12-2.8 = 0.0092 or 9.2mA.

                                              The opto is capable of 50mA but I doubt the series LED is..

                                               

                                              You do need to be aware of the device that is controlling the opto side. You have to ensure it doesn't have a voltage that exceeds its limits applied to it.!

                                              (GOLDEN RULE ... never apply a voltage to a pin that is greater than the supply UNLESS it is designed for it.)

                                               

                                              If you do stick 12v on a 5v device, depending on the device and its internal design, it might conduct this to the Vcc to protect itself.

                                               

                                              In the case of your opto board, if you draw current through the control pin, current flows from the Relay Board Vcc rail, through the series resistor, optocoupler (and indicator LED).

                                              This will cause the LED inside the opto to illuminate and turn on the output side.

                                               

                                              why the have a jumper when there are 12V relays and VCC cannot have more than 12V.

                                              With the above in mind this statement is wrong.

                                               

                                              If you want to prove this for yourself at some time.

                                              • Discconect it from your Arduino .!
                                              • Apply 12v to the VCC with the JD-VCC to VCC jumper in place and the ground of your 12v source connected to the ground connection.
                                              • Short any of IN1-IN4 to ground, and the correspnding led will light and the relay should be operated.

                                               

                                              If that doesn't work you better include a good photo of the top and bottom of the board as it would appear your little asian friends have got the wrong schematic ...

                                               

                                              WHY make them like this

                                              Many devices have Open Collector outputs, or use a transistor to do the switching. (those cheap PIR's do exactly this with a small resistor in series)

                                              The collector of the transistor connects to IN1-IN4 and when its ON the opto is ON which turns on the relay.

                                               

                                              Mark

                                      • Re: 4 Channel 12V relay system issues.
                                        screamingtiger

                                        Well my 3.3V regs didn't come in today, they are here in town but should be delivered tomorrow.  So I wont have them done by Friday as I wanted.  Unfortunately I need to test the wireless code but I do not have 3.3V any where, and no idea of current draw so voltage divider wont work.  Bullocks!

                                         

                                        Im going on a long trip next week so I MUST have them working by mid next week