Skip to main content

If anyone has followed my posts in the other forums you will notice that I am building a second generation modular layout for subway trains.  There are 16 modules.  Each of these modules will have electronics to control accessories such as block current detection, station lighting, tunnel lighting, building lights, and street lights.  There is also a controller that is the brains behind signal control.  Usually there is a separate circuit for the accessories and the controller for each module (section).  In some cases there may be multiple circuits depending on the complexity.  For one section (#5) the accessory and controller circuits are combined.

 

Here is the section shown as part of an RR-Track file for the entire project.  The current detectors are shown as DA5-01 and DA5-02.  The signals are also displayed.  The layout will consist of two three track lines (A and B).  The "A" designation is for Line A.  The "5" designation is for Section 5.  The signals shown in italics are repeating signals from other sections.  Section 5 is a 2 track loop section off the main 3-track trunk line.  This allowed me to build a simpler circuit and I was able to combine the accessory and controller circuits on a single board.  Mind you some sections will have up to 13 current detectors and between 15 and 20 signals.

 

Section.05

 

The circuit below was designed using a product called LochMaster.  It is assembled on Radio Shack perfboard.  To the left are the current limiting resistors to control the station lights.  The are heavy duty (1 watt) as there are many LEDs to light for each section.  The resistors at the bottom will control street lights and building lights.  At the top are the inputs from the track and the two blocks that require current detection.  There are inputs for trickle power that will allow for current detection should the main power be shut off.  The current detectors are using the bridge rectifier/optoisolator/555 design.  The downside here is the 1.4 volt drop to the train power.  I supplied an LED for each detector as a troubleshooter in case of any failure.  The detector outputs are fed into the signal controller circuit on the right.  They also have outputs designated DA5-01 and DA5-02.  These signals will be used by neighboring sections.  Also note there are inputs DA4-01 and DA1-07 from neighboring sections.  The outputs to the signal LEDS are shown.  Each has a current limiting resistor and the design uses the common anode technique.

 

 

20150228_113832_resized

 

I considered using Arduino as this would eliminate the controller circuitry, but decided against it since it would be easy to short pins and damage the board.  PCB would be nice, but it is very expensive.  For heavier duty inputs 18 AWG wire is used instead of the 22 AWG.  This is shown here. All bus wire between sections is 12 AWG.

 

20150228_130003_resized

Attachments

Images (3)
  • Section.05
  • 20150228_113832_resized
  • 20150228_130003_resized
Last edited by Joe P
Original Post

Replies sorted oldest to newest

Arduino would be nice.  For this section I guess the Uno version would suffice.  I would be unable to use my regulated 5 volt DC power for the board because the specs state that it requires between 7 and 12 volts DC.  My controller uses one 7400 quad NAND gate chip and one hex inverter 7400 chip each supplied by 5 volts DC power.  I guess it would not make a difference if I used a different voltage for DC power as the only thing I would need to do is change the values of the current limiting resistors for LEDs.

 

My worry with Arduino is its durability to withstand the many mistakes made as electronic hobbyists.  I have many times accidentally shorted my DC supply voltage or created solder bridges. Situations like that would play havoc on an Arduino I think.  It is also easy to destroy an IC chip, but they have performed near flawless regardless of the mistakes I make.  If I destroy an Arduino Mega (as some of the more complicated modules would require) I am out $50.

Actually, my first stillborn signal controller was pre-Arduino, but used the same

basic chip: an Atmel ATMega CPU. Easy enough to swap out the controller on the module should it gets zapped. But it's still pretty hard on those chips. But a

replacement CPU for an Arduino module is also cheap: about 3 bucks.

 

Here is Section 6 on the "A" line.  There are 3 tracks, 2 Local and 1 express.  Each is a block containing a single current detector.

 

Section.06A

 

The "B" line has 5 blocks (not shown).  Normally I would construct a single board containing 8 current detectors for the entire section.  However I have single detectors on a Radio Shack dip perfboard that I used on my previous layout.  I have additional additional hardware that I wish to reuse also.  So I constructed a triple current detector accessory board with reused parts.  There is no controller in this circuit, so there are 6 outputs, 3 for the section 6 controller yet to be built (white labels), and 3 of the same outputs (gray labels) for neighboring sections.

 

 

20150303_151408_resized

Attachments

Images (2)
  • Section.06A
  • 20150303_151408_resized

Elevated section 6B has 5 current detectors. It is part of a proposed elevated station where detectors DB6-01 and DB6-02 are in the station and DB6-03 is on a layup track. Detectors DB6-04 and DB6-05 are on express tracks on the upper level. So it is a double elevated structure.

 

Section.06B

 

The 5 current detectors are constructed by reusing detectors from my previous layout. There are accessories for station, street, and building lighting. All detector outputs are duplicated and used in neighboring sections.

 

20150407_220606_resized

Attachments

Images (2)
  • Section.06B
  • 20150407_220606_resized

Here is Section 03 of the new layout.  The track design is for BOTH subway and elevated.  The elevated line will have a two tier design (double el) and support part of a station.

 

Section.03

 

There will be a 12 block current detector to control the signals (7 subway(A), 5 elevated(B)).  Additional accessory lighting is also supported by the circuit for station lighting, tunnel lights, buildings, and streets. Outputs will also be used by signals in adjoining sections.

 

20150508_113911_resized

Attachments

Images (2)
  • Section.03
  • 20150508_113911_resized

Well I'm back at building these detectors. I have 123 to build and am nearly done with 95.  The parts list consist of building a basic current detector using an 8-amp bridge rectifier, 120K, 330, and 33 ohm resistors, a 2506 optoisolator, 555 timer, 0.1 micro farad capacitor, 10 micro farad electrolytic capacitor, and a 0.01 micro farad capacitor. The current detector design was derived from this documentation.

 

http://www.gatewaynmra.org/199...on-systems-circuits/

This is subway Section 1A of the layout. This configuration is quite complex as there are switches to the looped station in Section 5 or the continuous oval.  There is an additional switch to a non-electrified stub end that will be used to add trains to the layout.  Also section 1AB is part of the ramp that will connect the subway section (A) to the elevated section (B).  There are 9 blocks in this section.

 

Section.01A

 

This is section 1B which is the elevated portion.  There are 3 blocks.

 

Section.01B

 

Section 01 uses a 12 block current detector, one for each block, as well as for accessories such as circuitry for structure, street, and station lighting. Also some outputs are used for neighboring sections.

 

 

20151111_210640_resized

20151111_210702_resized

 

This is subway Section 2A of the layout. Also section 2AB is part of the ramp that will connect the subway section (A) to the elevated section (B).  There are 5 blocks in this section.

 

Section.02A

 

This is elevated section 2B of the layout.  There are 4 tracks here where the middle 2 tracks are a ramp to the double elevated section and there are 8 blocks.

 

Section.02B

 

Section 02 uses a 13 block current detector, one for each block, as well as for accessories such as circuitry for structure and street lighting. Also some outputs are used for neighboring sections.

 

20151111_210728_resized

20151111_210749_resized

Attachments

Images (8)
  • Section.01A
  • Section.01B
  • 20151111_210640_resized
  • 20151111_210702_resized
  • Section.02A
  • Section.02B
  • 20151111_210728_resized
  • 20151111_210749_resized

While these designs seem repetitive, they are crucial for my signalling system. These current detectors are of the bridge rectifier variety and will knock down track voltage by 1.4 volts.  This design also accepts a 12VAC trickle voltage which will allow for current detection should there be no transformer power to the rails.  This is designed for conventional mode.

 

Section 10A is illustrated here.  The design allows for 3 detectors in the subway and 2 more for the ramp to the elevated.

 

 

Section.10A

 

Section 11A is designed with 8 detectors. There are 3 in the tunnel, 3 in the station that straddles Sections 11A ans 12A, and 2 on the ramp to the elevated.

 

Section.11A

 

Sections 10B and 11B are the elevated section.  Each section contains 3 detectors and an elevated station straddles both sections.

 

 

Section.10-11B

 

Here is the circuit for Section 10.  These are 2 circuits separated by parts A and B.  The reason for this design is that I decided to reuse components from my old layout.  This is done for Sections 6, 7, and 8 also.  Part A has 5 detectors as well as resistors for tunnel lighting.  Part B has 3 detectors with resistors for station, street, and structure lighting. Detector outputs are also available for neighboring sections.

 

 

20151117_120040_resized

 

The circuit for Section 11 is a combination of both parts A and B.  There are 14 total detectors.  The resistors control lighting for BOTH stations on the elevated and subway portions, tunnel, structure, and street lighting.  Detector outputs are also available for neighboring sections.

 

 

20151117_115937_resized

Attachments

Images (6)
  • Section.10A
  • Section.11A
  • Section.10-11B
  • 20151117_120040_resized
  • 20151117_120040_resized
  • 20151117_115937_resized

Joe, For several decades I've had fantastic memories of growing up in Bronx, NY and traveling through all 5 Burroughs by Subway and the elevated sections. I wish you would have done a complete How-to Videos from start to finish. 

Do you think you can start from where you left off to finish the rest of the project in video Please. 

Sincerely 

Allan Martinez 

Note that GRJ is simply referring to the current sensing function of the OP's circuit.

Untitled

From my understanding of the OP's circuit, the eBay current-sensing module replaces the bridge-rectifier.  As OP says, his 8-Amp bridge rectifier drops about 1.4V.  This is quite a burden; in other words if a subway car is pulling, say, 2 Amps, then the current sensor (i.e., the bridge rectifier) is burning 1.4V x 2A = 2.8 Watts!  The eBay module uses a different current sensing technology which burns less than 1% of that (i.e., only milliWatts) and does not impose a 1.4V "tax".

As I understand GRJ's comment, the eBay current sensors would be hooked to a microprocessor (Arduino) which would perform the additional signal-conditioning and timing functions presently performed by the other components of the OP's circuit.

What's nice about the "Hall sensor" sensing technology in the eBay module is it senses both DC and relatively high-frequency AC.  This means it can be used with DC track systems like in HO/G-gauge, 60 Hz AC O-gauge, and high-frequency DCC systems.  The current-transformers (doughnut-type current sensors) used in some O-gauge AC systems cannot sense DC currents and may not adequately sense the high-frequency AC currents in DCC systems.  Obviously an end-user doesn't care about a universal sensing solution - just one that works for the layout at hand - in which case if this is an O-gauge 60 Hz AC system I'd suggest looking at ~$1 eBay current transformer modules which would also burn less than 1% of the power (and no 1.4V voltage-drop tax) relative to the bridge-rectifier sensor...for example eBay 201614919336:

201614919336

 

 

 

Attachments

Images (2)
  • Untitled
  • 201614919336
Last edited by stan2004
christhetrainguy09 posted:

So basically this senses current draw when a loco is near the drop in the track? Gap the center rail and it senses the current draw in that block?

Yes.  What nice about the OP's bridge-rectifier "current sensor" is that it generates a 1.4V (or so) output voltage for a wide-range of currents.  1.4V is plenty of voltage to trigger down-stream circuits for signaling or whatever.  An 8 Amp bridge rectifier is less than 50 cents on eBay:

Untitled

OTOH, the current-sensor in GRJ's eBay module or the current-transformer doughnut sensor generate an output voltage proportional to current flowing in the circuit.  So if your consist consists of un-powered cars, you need to figure out a way to draw current for non-engine rolling stock which do not draw current.  Otherwise you have an occupancy detector that only detects occupancy of current-consumers (engines, lighted cars, etc.).  In HO systems this is routinely done by replacing wheel-axles in non-powered cars with wheel-axles that have a resistor built-in to draw current between the 2 rails! 

This current-sensing approach to occupancy detection is applicable to the OP's layout because it is a subway where consists (typically) have all lighted/powered cars so you are "guaranteed" to draw some current from end-to-end.  As mentioned, in HO you replace insulated axles with ones with a resistor built-in to draw some current.  In O-gauge I suppose you could replace an un-powered wheel truck with a powered wheel truck (i.e, one that has a center-rail roller/pickup) and insert a resistor, lamp, or some other electrical load that draws current.

Attachments

Images (1)
  • Untitled
Last edited by stan2004

Stan thanks, we at the club run a caboose on every train, so i think i have that covered. But i am open to ideas for the non caboose trains.

 

using GRJ module, simply run track power to one terminal and the power drop to the other terminal and plug the rest of the pins up to Arduino and write a little code and bazinga you have a block detection   

GRJ, i would love to do the isolated blocks but the layout was wired by a wire happy guru 20years ago and grounds are tied together all over the place. Would take too much time to redo the wiring as it stands now. So i created a photocell method works fine at evening times but during the day its haywire (environmental light) o i thought this might be a better solution. 

Well, if you can't do the insulated tracks, the optical solution is the other method that doesn't involve current sensing.  One thing you can do to improve the reliability of optical sensing is to use modulated beams and a smarter detector to sense the beam.  If you simply drive the beam with an 8khz signal, for instance, you can then have the receiver look only for a signal that's modulated at 8khz.  That eliminates the normal issues with stray light triggering the sensor.

christhetrainguy09 posted:

...using GRJ module, simply run track power to one terminal and the power drop to the other terminal and plug the rest of the pins up to Arduino and write a little code and bazinga you have a block detection   

Well, it depends on your definition of "a little code" and your definition of "bazinga"!

The IC sensor in GRJ's module uses the relatively recent ACS712 IC chip manufactured by Allego Microsystems which generates a voltage proportional to sensed current.  The scale for the 20 Amp sensor chip is 100mV per Amp.

Untitled

So even if you have a caboose at the end of every consist, let's say its lamp draws 5 Watts.  At 18V command voltage, that's less than 300 mA (0.3 Amps).  The eBay ACS712 module generates "only" 100mV per Amp...so when the caboose rolls by, the output voltage to the Arduino would be a modest 100mV/Amp x 0.3 Amps = 30 millivolts!  I'm not saying 30mV is difficult to detect but to quote GRJ, no job is easier than the one you imagine someone else doing!!! 

As mentioned, the "beauty" of the bridge-rectifier detector method is that even if the current is "only" 0.3 Amps, the output of the detector will be about 1.4 Volts...or some 50 times greater than the eBay sensor!  In the OP's case, this 1.4 Volts is used to trigger an opto-isolator (which trips at about 1 Volt).

So, as GRJ points out, if you can't or don't want to use the isolated outer-rail method, you need to consider something like an IR/ITAD detector if occupancy detection is the objective.

Attachments

Images (1)
  • Untitled

 In line with the modulated optical sensor method GRJ mentions you can buy an eBay module for about $2 that consists of a modulated/pulsed infrared LED at about 40 kHz and a mating infrared detector.  This way you can operate without issue during the daytime or with bright train room lighting.

modulated IR sender-receiver

IMG_1511

The spectre of replacing un-powered wheel trucks with powered trucks loaded by a light-bulb or resistor or whatever (to create a current load) seems like a non-starter in the O-gauge world.  Again, I think the current sensing approach is fine for the OP's subway application because all cars are lighted and/or motorized and hence draw current.

Attachments

Images (2)
  • IMG_1511
  • modulated IR sender-receiver
Last edited by stan2004

Well, if your passenger cars have been converted to LEDs, it's likely they each draw far less than 5 Watts of an incandescent caboose.  For example, the Hennings LED passenger car module might be set to as little as 10 mA.  So using the ACS712 eBay current sensor module, that would generate a voltage output of only 0.1 V/A x 0.01 A = 10 milliVolts when a passenger car is running by that block sensor.  10mV is arguably difficult to easily detect.   I understand a block can be longer than 1 car length so you'd be detecting multiple cars and hence the current to be measured would be higher, but I think you get my point.

Anyway, the emitting LED and detecting sensor on the modulated eBay module are of the 5mm ilk.  So, yes, you could drill 5mm holes in your track bed or something like that.

Note that the "trick" to this modulated IR infrared occupancy detection is the integrated IR detector chip tuned to 40 kHz or whatever.

Untitled

These are 3-terminal chips with the photodetector and all the electronics to detect just a pulsed/modulated IR reflection.  So if you are configuring a system/layout you only need one generator of 38/40 kHz driving multiple LEDs all pulsing at a common frequency...and one of these 15 cent IR receiver modules detecting the reflections when a block is occupied.  Note that the current detection method might generate a somewhat difficult to detect millivolt range output whereas this IR Receiver chip swings a full 5V or so between detect and no-detect!

Attachments

Images (1)
  • Untitled
Last edited by stan2004

Agreed. I'd think the effort to create isolated outer-rail blocks vs. isolated center-rail blocks would be similar.  That is, you'll be creating gaps between track sections and running additional wires to the newly formed electrical "islands".  An obvious advantage of the isolated outer-rail method is the amount of current flowing when the block is occupied is negligible...measured in the, say, milliAmps.  The isolated center-rail method using current-sensing carries the full current of the train which can be in the Amps.  This has implications on the type of wiring used.  And has been discussed there are tradeoffs in current-sensing technique.  The outer-rail method has negligible current flow as you are simply detecting the presence/absence of the common outer-rail voltage supplied via one or more wheel axles - a relatively simple circuit.

Agreed. It's the same effort as center rail gaps. The relays we had under the layout for the first test of isolated blocks were from Azatrax, he has great products but don't think these were the right thing for this layout. 

Ive seen you're previous threads with the one channel boards for about 2$ 

I have a 8 channel Arduino relay module. Just a little confused at where to hook the wires up to. (Coffee hasn't kicked in yet) 

christhetrainguy09 posted:
...I have a 8 channel Arduino relay module. Just a little confused at where to hook the wires up to. (Coffee hasn't kicked in yet) 

Is this a question or a statement?   I seem to recall drawing up a diagram for another thread on how to use these $1/channel multi-relay modules but can't seem to quickly find it.

Anyway, if you're seeking suggestions on how to hook it up for isolated outer-rail, I suggest starting another thread to keep the hi-jacking police at bay.   What I'd want to know is:

1. What voltage is your 8-channel module (5V, 12V, etc.)?

2. Is it "hi" or "low" level triggered?  Or what is the eBay listing #.

3. These modules do not have any timing or delay to demote or mask intermittent axle contact (relay chatter) when the first few axles enter the block or when the last few axles exit the block.  Is this feature of interest - which would add, say, 25 cents per channel and assembling a few components (capacitor, etc.).

Hi. I see there has been an interesting discussion here. With the ACS712 I guess I can eliminate the optoislator, but what about the filters for compensating for "dirty track" that may cause flickering in my output signal?  Would I then need an Arduino to capture the output and then perform my signal logic via software?  I was once a software engineer so this is not a daunting task for me.  This was something I considered but decided against given the complexity of my signal modules and the very fact that Arduino cannot handle the number of inputs and output needed for some of my modules, let alone issues when wiring up an Arduino (i.e. solder bridges destroying inputs/outputs). What I see here is a possible software solution which I ruled out, however will the ACS712 provide the needed output voltage to drive my signal logic if I go with the hardware solution (i.e. NAND gates) that will be part of my design.  My guess is that it does not.

I know that the 1.4 Volt "tax" is a downside.  I am reluctantly willing to live with that.

Actually, the ACS712 is not a good match to your application.  It is a linear sensor which means you get a voltage output proportional to the measured current.  This comes at a cost - both the IC chip (relative to a cost of a bridge-rectifier) and, to your point, additional circuitry to convert the output to a yes/no digital signal as needed by the downstream circuitry.  It appears the 1.4V "tax" and arguably punitive power dissipation are acceptable so really all I can say is thanks for sharing! 

One observation about the thread topic of "current detectors".  From what I've seen the big effort in block current detectors is for 2-rail applications like HO where they don't have the luxury of the extra isolated rail for "free" occupancy detection.  2-rail being generally DC, the bridge-rectifier and ACS712 operate/detect DC currents as well as 60 Hz AC and high-frequency DCC.  I suspect if 2-rail had historically been 60 Hz AC, there would be more published circuits taking advantage of doughnut current-transformers as occupancy detectors without the 1.4V "tax".  Not quite apples-apples but we all have current detector circuits protecting our safety - the GFCI (Ground Fault Circuit Interrupter).  Generally implemented with a low-cost application-specific IC chip, it is a clever circuit which can detect remarkably small AC currents generating what amounts to a yes/no output.

 

If I was to use an ACS712, software would need to sample the output. That sample would be in the form of a loop that would check the output say 1000 times. That would replace the filter. In order to achieve the voltage needed to drive the logic, that resulting output from the loop could be fed into another softwate program that drives an Arduino output signal which could be 5 volts DC.  That output could then drive the signal logic via hardware or software. Just another way of achieving the same goal. The advantage here is that there would be no 1.4V drop. I may have considered this, but all 123 detectors are now wired and tested.

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.
×
×