Block Occupancy Current Detector

Basic electrical and electronics, such as DC/Analog control.
Post Reply
aleopardstail
Posts: 224
Joined: Thu Apr 29, 2021 9:48 pm

Block Occupancy Current Detector

Post by aleopardstail »

Simple circuit for DCC current detection and block occupancy, won't work with DC as it needs the alternating waveform to drive the current transformer.
Block-detection-circuit.png
this produces a voltage output the Analogue to Digital converter can read, each ADS1015 is able to monitor four blocks - you could add logic switching with transistors to monitor more (thats basically what the device does internally), and can put four on the same I2C bus, so say an Arduino can monitor 16 blocks and then do "something" with the information.

could adapt with a comparator circuit to provide a digital output, however by the time you have done that the ADS1015 board may well be easier.

this will pick up a 10k resistor in a block output is a "1" though so this is marginal unless you up the ADS board gain - need to watch the top end though so as not to overload the device - a 16 bit ADS1115 would be better but unless you want to build your own board most advertised as a 16 bit ADS1115 seem to be the 12 bit ADS1015.

code is simply a read command, if the value is greater than zero, there is something in the block, higher values indicate more current so you could start to see if whats in the block is rolling stock a stationary locomotive or a moving one if it matters.

components are simple, the orange thing is a 5A/5V current transformer, note the load resistor is not present, you can adjust the 1k resistor to change the sensitivity but needs care or you will overload the ADC inputs
Suzie
Posts: 456
Joined: Tue Dec 17, 2013 11:46 pm

Re: Block Occupancy Current Detector

Post by Suzie »

It does become a bit software heavy when you have to read the converter and do the noise filtering in software too.

I think that the few extra components used in the MERG DTC make life a lot easier - after all what you need is just a digital occupied or not occupied indication, and reading a shift register is quite straightforward.
aleopardstail
Posts: 224
Joined: Thu Apr 29, 2021 9:48 pm

Re: Block Occupancy Current Detector

Post by aleopardstail »

Suzie wrote:It does become a bit software heavy when you have to read the converter and do the noise filtering in software too.

I think that the few extra components used in the MERG DTC make life a lot easier - after all what you need is just a digital occupied or not occupied indication, and reading a shift register is quite straightforward.
plenty of ways to remove the skin from the cat without question - the software is pretty basic though here, read a 16 bit value into a variable, and see if its larger and a threshold value and job done.

the front end of the circuit could probably quite easily drive a switching transistor to feed into "something", or just light an LED.

noise filtering is largely mitigated by the half wave rectification and the capacitor, not entirely, still a bit of jitter but with a decent range its ok to ignore lower values - I was experimenting with software conditioning - taking multiples and an averaging routine, that works but not really needed.
Post Reply