Forgot Login?   Sign up  
Sunday, August 09, 2020

Forum Search


Track Occupancy Detector

1 year 4 weeks ago #18297 by chaz
Track Occupancy Detector was created by chaz
While recuperating from a mild illness, I wondered if I could create a DC (not DCC) train occupancy detector using a Hall Effect current to voltage transducer. The short answer is “I think I can.”

I wanted to keep it simple and cheap, but given that I wanted to detect such small currents, I wasn't sure that both could be achieved.

My goals:

1. Detect both, positive and negative currents, as low as, 20mA.
2. Produce a logic low when a train is detected, commonly used by signal controllers and Arduino.
3. Keep the design as simple as possible.


1. Hall Effect devices are notoriously noisy. They produce a voltage that is proportional to the sensing the magnetic field created by the current. Small currents create small fields and we live in an ocean of magnetic fields.


1. A stopped train will not be detected. No current, no field.

What I did:

I started by looking for a bidirectional Hall Effect device with a small current range and reasonable noise performance. The ACS723LLCTR-05AB-T from Allegro with a range from -5A to +5A seemed about right for model trains. The trans-conductance of 0.4 Volts out per each Amp in seemed OK, but the noise. Fortunately, they published the Input Referenced Noise Density. I calculated that I could use the ASC723 if I limited the bandwidth of the measurement to around 10Hz. The ACS723 operates off a single +5V supply. 0 Amps produces a +2.5V voltage, so I will need to compensate for any offsets in the measurement system.

I needed a little amplification to make the math easier. I wanted the final trans-conductance to be 1 Volt out for each Amp in. That is, 1:1. To achieve that, I needed a times 2.5 gain. I added a low pass filter to the amplifier to limit the measurement bandwidth and thus reduce the noise in the measurements to well below the level of the voltages I'm looking to detect.

And finally, I added an open collector, comparator to detect when the output of the amplifier exceeds the current thresholds. Recall that 0 Amps is 2.5Volts.

Please Log in or Create an account to join the conversation.

Time to create page: 0.180 seconds