This circuit is a DCC (model rail) controller combined with a Railcom detector circuit.
The reference circuit for the detector is published by the NRMA under document S-9.3.2. this circuit uses an LM393. However, the LM393 would be at its limit as it needs to decode 250kbs serial and its response time is 1uS+
For this reason I reworked the detector using an LM319 which is a faster comparator and it also allows you to split the supply rails and reference its output to a floating ground (OUT2 in the schematic). Additionally this means the output stage (open collector) will be driving the opto LED to ground from the 5v supply and not impact the -ve supply which is based around a halfwave rectifier, cap and yellow LED to give a 2v reference.
In practice, with no load on the model rail track (i.e. less than say 50mA) the LM319 oscillates on the comparator 2 side (i.e the side with the +ve voltage reference). The comparator 1 side with negative voltage ref behaves. I cannot figure out why. After a lot of experimenting, I resorted to rigging up an LM393 on a DIL8 chip header and this plugs into pins 4-7 and 8-11 of the LM319 socket. The LM393 is stable and actually out performs the LM319. This is counter intuitive, but perhaps the 317 is more susceptable to oscillation? Looking for some suggestions from the forum. The other odd behaviour is the LM317 is supposed to have an input bias of 1uA, but in practice the IN2+ seems to be drawing 6uA and pulling down the +ve reference voltage 10mV. I think this is probably due to the oscillations, but its odd never the less.
The whole is built on custom PCB, all chips are decoupled, as are supplies. There is some breakthrough of the underlying DCC signal on the supply lines, however this is true for both the 317 and 393 so why is it the supposedly inferior 393 device behaves better?
The reference circuit for the detector is published by the NRMA under document S-9.3.2. this circuit uses an LM393. However, the LM393 would be at its limit as it needs to decode 250kbs serial and its response time is 1uS+
For this reason I reworked the detector using an LM319 which is a faster comparator and it also allows you to split the supply rails and reference its output to a floating ground (OUT2 in the schematic). Additionally this means the output stage (open collector) will be driving the opto LED to ground from the 5v supply and not impact the -ve supply which is based around a halfwave rectifier, cap and yellow LED to give a 2v reference.
In practice, with no load on the model rail track (i.e. less than say 50mA) the LM319 oscillates on the comparator 2 side (i.e the side with the +ve voltage reference). The comparator 1 side with negative voltage ref behaves. I cannot figure out why. After a lot of experimenting, I resorted to rigging up an LM393 on a DIL8 chip header and this plugs into pins 4-7 and 8-11 of the LM319 socket. The LM393 is stable and actually out performs the LM319. This is counter intuitive, but perhaps the 317 is more susceptable to oscillation? Looking for some suggestions from the forum. The other odd behaviour is the LM317 is supposed to have an input bias of 1uA, but in practice the IN2+ seems to be drawing 6uA and pulling down the +ve reference voltage 10mV. I think this is probably due to the oscillations, but its odd never the less.
The whole is built on custom PCB, all chips are decoupled, as are supplies. There is some breakthrough of the underlying DCC signal on the supply lines, however this is true for both the 317 and 393 so why is it the supposedly inferior 393 device behaves better?
Attachments
-
117.1 KB Views: 17
-
145.8 KB Views: 15