Announcement

Collapse
No announcement yet.

Help to hook up Track Relay

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help to hook up Track Relay

    I'm basically a noob when it comes to electronics, so don't assume I know anything. I'm looking for some help to safely connect up some hardware we recently purchased.

    I've wired 4 tracks before with a basic power relay to cut all track power, using Trackmate hardware but this project is much more advanced.


    Project Context: we have some custom hardware, harnesses designed for our new 4 lane club track here: http://slotcarillustrated.com/portal...d.php?p=871301

    Overall, we are running Race Coordinator (RC) as our RMS. We have a custom 3 part harness that is connected to an Arduino board that will be connected to (and powered by) our computer via a USB cable. The 3 part harness is 1 strand is our IR sensors for lap timing, another harness for our IR pit sensors to handle refueling within RC. The third harness deals with individual power relays.

    So here we come to our challenge. This third harness coming off our Arduino board that needs to be connected specifically to a 4 relay. Again the idea behind the 4 relays is that the relay board will be controlled by an Arduino board via RC to cut (individual lane) power to the track when a car runs out of "fuel".

    A side note on this 3rd harness, it sends a 5v signal when triggered by RC (with a multi-meter, we tested this using RC). If I’m not mistaken, then we wouldn't need to power the relay board separately then correct? As the power would flow through the harness with the 5v signals to trigger the relays via the harness connection to the GND and IN1-to-4. Right?

    We will be connecting the harness (which has 4 sets of pigtails) to the relay board …Lane 1 will connect to IN1 on the relay board, lane 2 to IN2, lane 3 to IN3 and lane 4 to IN4. We’ve tested and labeled these. With the grounds for each being jumped together and connected to the GND. So our first question, does anyone see a problem with this connection method for the grounds?

    Assuming that’s all good, then it comes to connecting up our relay board to the track. This means making a break to a normally closed circuit of the lane track positive power. So in essence we should have the relay sit between the track rails and the power supply, which is how I have my existing track already set up.

    Using my old SCC & Trackmate wiring guides I went back to basics to re-understand relays using this picture (along with a lot of Googling):



    It looks like the ground (30) from the relay is connecting to the power supply. Which means the + coming from the track power should connect to the normally closed (87a) – to ensure the power supply track power is flowing to the track, correct? Note, 87a goes to white pole on the driver station which is the positive - see attached Basic Controller wiring diagram:


    The other two relay pins (85 & 86) on the relay power the coil to activate the relay (which would be the ground and colored wires off the harness that send the 5V signal to the relay board if I’m not mistaken….Am I?

    So I’ve redone my wiring diagram to account for the above:



    Any thoughts or suggestions on what I’ve missed and/or done some dangerous?


    Many thanks in advance, eh!

  • #2
    Ok I think you're almost there. The pigtails you have for relays should have 9 wires I think, 2 for each lane gnd and input. You would also normally have a 5v supply which you connect to the vcc pin on the board.

    I think you'll find the 5v off the individual pins doesn't have sufficient current to power the relay, so you need more power to the vcc. You may also be able to power it off the track power

    Comment


    • #3
      Originally posted by Slingshotx View Post
      Ok I think you're almost there. The pigtails you have for relays should have 9 wires I think, 2 for each lane gnd and input. You would also normally have a 5v supply which you connect to the vcc pin on the board.

      I think you'll find the 5v off the individual pins doesn't have sufficient current to power the relay, so you need more power to the vcc. You may also be able to power it off the track power
      Thanks Slingshotx...I was hoping you'd respond, as I've read several of your posts here (and elsewhere)

      I'll take a look at the pigtail relays on my way home if I can (but I don't recall have a ninth)

      But is that why you're saying to have a separate 5v supply into the VCC then?

      Next question, I've been told by someone else to go with a constant 5v DC supply with at least 300ma (but to be 1A or less). But two questions on that -
      (1) Any ideas on where to source one of these? Would this work? http://www.amazon.ca/Fosmon-100-240V...=dc+5v+adapter
      (2) On an Arduino forum, I asked about connecting up a separate power supply as I suspected this may be the case...and the advice I got there was to connect it up his way "The VCC is from your Arduino NOT your external power supply. The output pins from the arduino provide a signal that is relatvely LOW against this. JD-VCC is where you put the power in from your external power supply. GND is where you put the ground from your external power supply (not the arduino).

      Thoughts? The more I learn, the more I get confused

      Thanks in advance!
      Last edited by Giddyup; 12-02-2014, 02:15 PM.

      Comment


      • #4
        If you look at this page it describes most of what we are doing, and I think it matches what you have except the vcc connection

        http://www.hobbyist.co.nz/?q=interfa...les-to-arduino

        This is the only way I've connected relays, but I think an external supply would work. I don't know who told you it must be less than 1 amp but I don't think that matters if the load only needs 100ma that's all it would draw.

        Let me do a bit of research and see what I can find.

        Comment


        • #5
          Sling,

          Thanks for looking at/into that.

          The last link you sent looks spot on to me as well, although I'm barely competent in this stuff.

          Unfortunately Tom doesn't have a pigtail from the 5v on the arduino so he's going to need an external 5v power supply for that. Unfortunately unless you can find a 5v power supply, you'll probably need a voltage regulator circuit that you can plug a walwart or your track power into.

          -Dave

          Comment


          • #6
            Originally posted by Giddyup View Post

            (2) On an Arduino forum, I asked about connecting up a separate power supply as I suspected this may be the case...and the advice I got there was to connect it up his way "The VCC is from your Arduino NOT your external power supply. The output pins from the arduino provide a signal that is relatvely LOW against this. JD-VCC is where you put the power in from your external power supply. GND is where you put the ground from your external power supply (not the arduino).
            You description above is how you should connect it up to isolate noise from the relay but as you have no 5v from the arduino you're a bit screwed. I think connecting the 5v from the power supply may work, you'll need to try. It may cause you noise issues, but will probably be ok.

            Hope that helps.

            Slingshot

            Comment


            • #7
              small change add.

              Originally posted by daufderh View Post
              Sling,

              Thanks for looking at/into that.

              The last link you sent looks spot on to me as well, although I'm barely competent in this stuff.

              Unfortunately Tom doesn't have a pigtail from the 5v on the arduino so he's going to need an external 5v power supply for that. Unfortunately unless you can find a 5v power supply, you'll probably need a voltage regulator circuit that you can plug a walwart or your track power into.

              -Dave
              Following this myself with some interest Tom and all.

              Many cellphones have 5V DC chargers, and we all have deceased or at least superfluous cellphones lying around

              Comment


              • #8
                What is the amp rating of the relays on the relay board? If it is less than a couple of amps you will have to use them to switch a second set of relays with more capacity.
                Do you really plan on having two controllers for each lane?

                Comment


                • #9
                  I haven't seen the spec for that actual board, but all the ones I've seen seem to be a similar spec:-


                  5v 15ma to switch
                  and can switch upto 240v 10amps.


                  So he should only need the one relay (unless running some serious motors). I've been running on a single version of this switching a 30 amp power supply for a couple of years without any problem.

                  Comment


                  • #10
                    Ground Loop issue?

                    Originally posted by Slingshotx View Post
                    …..should only need the one relay (unless running some serious motors).
                    Thanks Sling.

                    No we aren't running anything really other than stock 20-25k motors. As far as running one relay, I'm not sure how 1 relay would that work when we need to individually cut power to lanes, while leave other lanes as is? As we'd need some way to distinguish the signal from RC to individual (x4) track lane (+) power.

                    You are correct in that the relay board takes around 15-20ma to drive one relay. We will in fact have a main track call to cut power, so we’d need 4 x say 20 ma or 80 ma for a main track call for all lanes. From what I’ve read, USB powered Arduino to power the relay could have enough to handle two relays, but no more. I think this is all a moot point as we’re not planning on monkeying around with the custom designed Arduino to add a connection to power the relay board. And our hardware maker has confirmed that we’ll need to power separately as you mentioned in an earlier post – i.e., “the 5v off the individual pins doesn't have sufficient current to power the relay.” I have thought about using our track power supply to power the relay board, but I’d need to wire in a regulator to step it down to 5v, would rather avoid and have a separate power – less single points of failure you know ;O)

                    So back to connecting up an external power supply to the relay board - last night, scouring the web I found some useful around powering relaying boards separately from Arduino boards. Have a look at this and see if it makes sense to folks…

                    Basically, "JD-VCC" is used when powering the relay board from an external (secondary) power source. “VCC” is used when powering the relay board from the Arduino.

                    There are different reasons for powering the relay board differently, but the main reason comes down to safety within the circuit you are making…if you can isolate the powering of the relay board from what powers the Arduino, you are basically creating a bit of a buffer to protect the Arduino board from things like power surges if the relays are attached to something with large surge currents, is at risk of shorting out, blowing up, getting hit by lightning, or is otherwise electrically noisy. The concept of isolating the power separately between the Arduino board and power relay from what I can tell is referred to as “optical isolation”.

                    From what I have read, this isolation means that the Arduino board really only sends an optical signal to the relay (through the IN1 through IN4) to trigger the relays, with the relay board coil being by its external power supply to open the normally closed contact (in our particular case) – i.e., to cut power to the track. That's the reason for the second set of connections (JD-VCC) on the relay board -- to keep the Arduino isolated.

                    Clear as mud?

                    Looking at how to connect up power to the power relay board, if the power is not coming from Arduino, it’s the relay board’s external power supply (+) connecting to the on JD-VCC. The jumper for the JD-VCC needs to be removed; otherwise the jumper connects the JD-VCC and the VCC on the relay board (which would mean the power from the relay board’s external power supply would be connected to the Arduino. Then the relay board’s external power supply (-) connecting to the GND on the relay board. So, this connection JD-VCC and GND would then power the relay coils (posts 85 and 86 – see previous trackmate picture in above post as a reference) to open/close the normally closed connection of the track (+) power.

                    I also looked into using the VCC as a connect point (as you had suggested) in for the external (+) power source for the relay (normally used by the Arduino to power the relay); it appears that would be the same as connecting the relay board external power source to the JD-VCC (leaving the jumper on). In either case, for my particular situation because there is no power coming into the relay board from the Arduino board, there doesn’t seem to be any difference and probably no risk to the Arduino since the only power (+) in this little connection (between the VCC and JD-VCC points) is coming from the relay board’s external power source (i..e, no (+) coming in from Arduino). In either case here (connecting to JD-VCC, or VCC), the (-) off the relay board’s external power source would go to GND.

                    Still with me….

                    In either case, it looks like it won’t matter which of the 3 ways (connect to VCC, connect to JD-VCC jumper on OR jumper off) we connect the relay board’s external power source because it is the only (+) power coming into the relay board.

                    So I think the connection stuff seems to be addressed, however……… in our revised diagram below we will have 5 have ground wires all being wired into the relay board’s GND.



                    I’m worried this would create "common ground" which could lead to "ground loop" issues. In our circuit we have grounds connecting back to the Arduino (from the harness connected to IN1-IN4) and back to the relay board's external 5v power supply. The signals being sent into the Arduino board are at 5v (recall we tested that with a multi-meter).

                    So I think we're okay because I don't believe there's any difference in their respective ground potentials? I'm worried there could be some "electronic noise" due to this ground loop which would interfere with our Arduino or relay board; especially worried as our signals from the Arduino are in a low range (5v) and I'm concerned that it wouldn't take much noise to create an issue and cause the gear to self-protect and do nothing.

                    Thoughts anyone on the risk with the "common grounds"? If so, what sort of ground loop protection would be recommended?

                    Thanks in advance, as always!

                    Comment


                    • #11
                      Originally posted by RichD View Post
                      What is the amp rating of the relays on the relay board? If it is less than a couple of amps you will have to use them to switch a second set of relays with more capacity.
                      Do you really plan on having two controllers for each lane?


                      Hi Rich,

                      Thanks for weighing in, always appreciate your electrical insights

                      ....have you look at my diagram, picture posted --> the relays are 10A, which is matched to our track power supply which is 10A, 5-20VDC.

                      Now - I just used that picture for reference, we will have only 1 controller per lane...although two could be insanely fun and annoying

                      Comment


                      • #12
                        Originally posted by SlotsNZ View Post
                        Following this myself with some interest Tom and all.

                        Many cellphones have 5V DC chargers, and we all have deceased or at least superfluous cellphones lying around

                        Thanks mate, I've looked around the house, no dice.

                        I did find this, for less than $5 delivered...thoughts?
                        http://www.amazon.ca/Fosmon-100-240V...=dc+5v+adapter

                        Comment


                        • #13
                          Options to wire in VCC

                          So on an Arduino board, I've been getting some help from one of their Mods, who's been very helpful.

                          Let me clarify something I said in post #10, around having 3 options to wire in my external power relay power source. Basically, there is only one way, that's (+) to JD-VCC (jumper off) and GND (-).

                          What the Mod said on the subject of VCC:

                          "Consider a circuit consisting of 4 Light Emitting Diodes. All of them have their anodes connected to VCC, their cathodes are all connected to their respective input pins. This is exactly what you have on your board, but the Light emiitting diodes are buried within the opto-issolator chips.

                          The only use for the VCC connection is to power those LEDs. On the relay board there is a track that directly connects the VCC on the long header to the other VCC pin (on that jumper). This is purely to allow your VCC to power the relays as well. (not recommended for you)

                          To power the LEDs all you need to connect from your arduino is the VCC and the digital pins.

                          To power the relays and logic circuitry on the relay board, all you need to provide is GND and JD-VCC from your external power supply"


                          Hope this clears up the misinformation I had put out there.

                          Comment


                          • #14
                            I think that's all fine, so I would connect the following :-
                            Pin 6,7,8,9 to in1 in2 in3 & in4
                            5v external to JD-VCC
                            Gnd external to gnd

                            And try that, so no gnd from arduino, if that doesn't work then connect the gnd from arduino.

                            I'm still not 100% you can leave the vcc unconnected though?

                            Comment


                            • #15
                              Originally posted by Slingshotx View Post
                              I think that's all fine, so I would connect the following :-
                              Pin 6,7,8,9 to in1 in2 in3 & in4
                              5v external to JD-VCC
                              Gnd external to gnd

                              And try that, so no gnd from arduino, if that doesn't work then connect the gnd from arduino.

                              I'm still not 100% you can leave the vcc unconnected though?
                              Thanks Sling, I think it's because all that VCC does is either dower the coils and light up the LEDs.

                              Comment

                              Working...
                              X