Skip to main content

I realize that you can have a common connection between the two without problems. I am just wondering if there are circumstances where it might cause problems. I have AC and DCS on the tracks and 12VDC from a PC power supply for building lights and signals. I also plan on using the 5VDC for arduino relays and sensors that I haven't tried yet. Right now they are not connected, but some wiring might be simpler to use the same common.

Original Post

Replies sorted oldest to newest

I also recommend powering the Arduino off of the 12v and let the Arduino step it down to 5v, since you may get less than 5v off of the 5v line out of the pc power supply assuming you are using an uno or mega. 

https://www.arduino.cc/en/Main/ArduinoBoardUno

This statement is from the power management section from the link above for the uno, but would the same for the mega:

The board can operate on an external supply from 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

Last edited by crood58

Specifications

 

  • Polarity: Active Low - you must ground the control input to switch this device ON
  • Channels: 4 Opto-isolated for protection
  • Relay Max Switch Voltage: 250 Volts AC
  • Relay Max Switch Current: 10 Amps AC
  • Relay Control Voltage: 3.3 - 5.0V directly via microcontroller (Arduino, AVR, PIC, ARM, BoardX, Raspberry Pi, MSP430, etc)
  • Relay Control Current: 20-30 mA

This is what I have . Do I need another board to power this one?s-l200

Attachments

Images (1)
  • s-l200
crood58 posted:

No. You will plug 5v and gnd from the arduino to your relay board. Then attach the pins from the Arduino to the relay pins to control the relays. There are some relays that do require 12v.

The 5V relays (Songle SRD-05VDC-SL-C) on the board shown draw 90 mA each when active or 360 mA if all 4 happen to be on.  That means any Arduino with the typical 5V linear-regulator power supply would incrementally dissipate 2.5 Watts = (12-5)V x 0.36 Amps in wasted heat.  In my opinion, you'd be better off using the 5V from the PC supply to power the relay board.

As for sharing AC and DC common, it appears this is for wiring convenience - as opposed to, say, establishing a common reference for measurement or signaling purposes.  In the latter case, you would consider the outer-rail can carry nasty hi-current spikes which manifest themselves as rather obnoxious voltage pulses after running thru the inductance of the outer rails.  But if just to share the common to transport "boring" AC and DC power...

If you use the 5V line from the PC power supply to run the relay board. Just make sure you connect the ground from the Arduino board to the relay board. Just so you don't have problems, which I don't think you would since the Arduino and Relay power supply are coming from the supply board. I my opinion this is good practice. 

I still recommend using the 12v source from the PC power supply to power the Arduino (if using a 5V logic board). You can try it with just 5v and see if you get the results you need, but it is recommended to use a 7-12 volts into the Arduino as specified on their products page.  

 

Ahh.  Another layer of the onion gets peeled!

OK so it looks you're going for the $2 ITAD?! 

Yes, if it helps wiring you can share the +5V common with the track common...and then power both the IR sensors modules and the relay modules with the +5V.   The "OUT" line from the IR sensor which goes low (to 0V) when an object is detected would then drive one of the 4 "IN" or "CTRL" lines (active-low) on the relay module.

Note that there are (at least) 2 variants of those IR modules on eBay.  IF you find that ambient lighting or whatever makes it difficult to get reliable triggering with the module you show, the IR module shown below might give better results.  They use slightly different methods of generating/detecting the optical IR beam.  It is essentially the difference between MTH ITADs and Lionel ITADs but no need to go down that rabbit-hole (yet!).

IR variants

Also.  If you are indeed trying to roll-your-own ITAD and don't mind cobbling together a few components between the IR module and the relay module, you can add the ITAD time-delay feature (e.g., 10 second delay) for maybe 50 cents per channel.  But best to get the basic detector/relay running first...can patch in the delay later.

Attachments

Images (1)
  • IR variants
Last edited by stan2004

Crood58, you can power an arduino just fine off of a 5v supply, it will actually work with a bit less.  the 7-12v rating is for the on-board voltage regulator, which requires at least 7 volts to insure the board gets 5v (6v min).  If you have a 5 volt dc source you can connect that directly to the 5v pin on the Arduino to power the board.  Generally I find it useful to use the on-board regulator only with simple, low-power circuits, and use a separate 5v supply for most projects, where that supply can also be used to power other components.  

JohnH, looks like Stan has you covered, but to answer the original question... for signaling such as you plan, there is no problem at all in sharing common.  However there could be in other applications, so it is good to keep it in mind.  The common wire has to carry all the current from both power supplies.  For your signals here we're talking milliamps, and it won't affect anything, but if you were powering something more substantial, you would have to make sure the common wire was thick enough for the combined current of both power sources.  

JGL

Sorry I made it confusing. I saw the Arduino in the relay description and thought I was describing what I had.I was looking for people more knowledgeable than me and we accomplished that. Stan, thanks for the alternative sensor. I'll save that listing in case my sensors don't work. JGL and Chris, many thanks also. I guess we could have stopped at Rich's post, but the added info sure helps me.

JohnGaltLine posted:

Crood58, you can power an arduino just fine off of a 5v supply, it will actually work with a bit less.  the 7-12v rating is for the on-board voltage regulator, which requires at least 7 volts to insure the board gets 5v (6v min).  If you have a 5 volt dc source you can connect that directly to the 5v pin on the Arduino to power the board.  Generally I find it useful to use the on-board regulator only with simple, low-power circuits, and use a separate 5v supply for most projects, where that supply can also be used to power other components.  

JohnH, looks like Stan has you covered, but to answer the original question... for signaling such as you plan, there is no problem at all in sharing common.  However there could be in other applications, so it is good to keep it in mind.  The common wire has to carry all the current from both power supplies.  For your signals here we're talking milliamps, and it won't affect anything, but if you were powering something more substantial, you would have to make sure the common wire was thick enough for the combined current of both power sources.  

JGL

John,

Exactly what I was saying. If you are using the DC barrel jack you are putting it through the regulator which will require 7v min. to get 5v. You can use the Vin pin and gnd pin with 5v supply as you said.

 

John H, did you have any ideas on mounting the sensors you have? I got some a while back and they seem to work pretty well, at least in my fiddling with them on the bench, but my tracks are too close together where I was wanting to put some and they don't fit so good. Just wondering if you had given that any thought?

After reading Stan's post above, I was forced had to order a few of those other Lionel ITAD sensors too. Not sure how that happens, but it seems to happen much more frequently when reading about electronic stuff around here. 

Last edited by rtr12

I plan to use them where I have scenery (Fusion Fiber) up on the side of  Fastrack and I don't have the rail isolated. I have room in the places I want to try them. They will just have to be disguised in trackside scenery. Funny how that buy impulse shows up after a session on this forum; that's how I have the ones I pictured and Stan's somehow showed up on my Watch list. I wonder if they would work vertical through a hole under the track?

John H posted:

I plan to use them where I have scenery (Fusion Fiber) up on the side of  Fastrack and I don't have the rail isolated. I have room in the places I want to try them. They will just have to be disguised in trackside scenery. Funny how that buy impulse shows up after a session on this forum; that's how I have the ones I pictured and Stan's somehow showed up on my Watch list. I wonder if they would work vertical through a hole under the track?

Yes it is! I keep getting those 'Thanks for your Purchase' notices from ebay after reading things here.   I have been cleaning off my work bench and have forgotten why I have a couple of the things I found in the pile?   This probably never happens to the more experienced...

I have been thinking about mounting them vertically myself, only next to the track in some kind of scratch built housing, ITAD like, but just a tad larger than the device. I think they would work just fine in a hole under the track, but the space between cars might cause problems? I will see if I can try that here one of these days, I am getting ready to make a few track changes if my gantry crane track ever shows up. These things work very well in the bread board fiddling I have been doing, but I have not tried to measure the on/off times to see (or guess) if they would remain sensing between cars on the train or drop out?  Sounds like your plan is a better one than mine though.

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×