SCI Logo

Scalextric USA
Pioneer Slot Cars
SCIs  MarketPlace, the online slot car mall
Carrera Slot Cars
Fly Model Car
BRM Model Cars
NINCO
MRC
AFX
Slot.it
Slot Car Illustrated Forum
  #1  
Old 12-02-2014, 10:52 AM
Giddyup Giddyup is offline
Championship Contender
View Giddyup's Photo Album
 
Join Date: Jan 2006
Location: Calgary, Alberta Canada
Posts: 1,776
Exclamation 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!
Reply With Quote
  #2  
Old 12-02-2014, 12:42 PM
Slingshotx Slingshotx is offline
National Racer
View Slingshotx's Photo Album
 
Join Date: Mar 2009
Posts: 189
Default

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
Reply With Quote
  #3  
Old 12-02-2014, 02:08 PM
Giddyup Giddyup is offline
Championship Contender
View Giddyup's Photo Album
 
Join Date: Jan 2006
Location: Calgary, Alberta Canada
Posts: 1,776
Default

Quote:
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 at 02:15 PM.
Reply With Quote
  #4  
Old 12-02-2014, 02:33 PM
Slingshotx Slingshotx is offline
National Racer
View Slingshotx's Photo Album
 
Join Date: Mar 2009
Posts: 189
Default

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.
Reply With Quote
  #5  
Old 12-02-2014, 03:25 PM
daufderh daufderh is offline
Championship Contender
View daufderh's Photo Album
 
Join Date: Sep 2009
Location: Oakton, VA
Posts: 1,424
Default

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
Reply With Quote
  #6  
Old 12-02-2014, 10:27 PM
Slingshotx Slingshotx is offline
National Racer
View Slingshotx's Photo Album
 
Join Date: Mar 2009
Posts: 189
Default

Quote:
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
Reply With Quote
  #7  
Old 12-02-2014, 10:56 PM
SlotsNZ SlotsNZ is offline
Championship Contender
View SlotsNZ's Photo Album
 
Join Date: Nov 2006
Location: Napier, New Zealand
Posts: 2,436
Default small change add.

Quote:
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
Reply With Quote
  #8  
Old 12-03-2014, 06:20 AM
RichD RichD is offline
World Champion
View RichD's Photo Album
 
Join Date: Oct 2005
Location: East Haven, CT USA
Posts: 12,110
Default

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?

Reply With Quote
  #9  
Old 12-03-2014, 07:01 AM
Slingshotx Slingshotx is offline
National Racer
View Slingshotx's Photo Album
 
Join Date: Mar 2009
Posts: 189
Default

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.
Reply With Quote
  #10  
Old 12-03-2014, 10:12 AM
Giddyup Giddyup is offline
Championship Contender
View Giddyup's Photo Album
 
Join Date: Jan 2006
Location: Calgary, Alberta Canada
Posts: 1,776
Arrow Ground Loop issue?

Quote:
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!
Reply With Quote
  #11  
Old 12-03-2014, 10:31 AM
Giddyup Giddyup is offline
Championship Contender
View Giddyup's Photo Album
 
Join Date: Jan 2006
Location: Calgary, Alberta Canada
Posts: 1,776
Default

Quote:
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
Reply With Quote
  #12  
Old 12-03-2014, 10:34 AM
Giddyup Giddyup is offline
Championship Contender
View Giddyup's Photo Album
 
Join Date: Jan 2006
Location: Calgary, Alberta Canada
Posts: 1,776
Default

Quote:
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
Reply With Quote
  #13  
Old 12-03-2014, 10:44 AM
Giddyup Giddyup is offline
Championship Contender
View Giddyup's Photo Album
 
Join Date: Jan 2006
Location: Calgary, Alberta Canada
Posts: 1,776
Default 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.
Reply With Quote
  #14  
Old 12-03-2014, 12:22 PM
Slingshotx Slingshotx is offline
National Racer
View Slingshotx's Photo Album
 
Join Date: Mar 2009
Posts: 189
Default

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?
Reply With Quote
  #15  
Old 12-03-2014, 12:28 PM
Giddyup Giddyup is offline
Championship Contender
View Giddyup's Photo Album
 
Join Date: Jan 2006
Location: Calgary, Alberta Canada
Posts: 1,776
Default

Quote:
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.
Reply With Quote
Reply

Bookmarks
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   
  •   

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:22 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.