It’s been slow past few days – I squandered some of my time-off doing nothing, or driving around getting things, or just having hard time focusing. Maybe I should not be feeling guilty about it, time-off is supposed to be time off things, all of them. Oh well, onto the trains now.
For the past couple of weeks I’ve been experimenting with various methods of block occupancy detection. As I plan to have the entire railroad detectable (for automation purposes) and it’s a mid-size layout, there will be many, many (…many) blocks (probably a hundred or so across 3 decks). I built couple of circuits, namely the single transistor one based off of NCE BD20 and modified by Reinhard Müller, and another based on a similar Current Transformer detector but with a LM555, originally from Paisley, with modifications from Helmut Schäfer.
I’ve setup two lengths of track (24″ each) for two blocks. Left side is driven by a simple transistor circuit, on the breadboard closest to the camera. Right side is the LM555 circuit, on the breadboard farthest from the camera.
After a lot of going back and forth, the detection of both is similar because the input stages are about the same, while the accuracy is probably slightly better on the LM555 because it does hardware “debouncing” and adds a 1 sec delay for track clearing. Similar effect is achieved on the transistor circuit if the capacitor in the output stage (100nF) is replaced with a higher one, such as 1uF or more. Technically it adds a similar delay to 555 circuit, since the capacitor charge/discharge time becomes higher.
All of this is connected to my DCC++ setup with an Arudino Uno and a Motor Shield. This is hooked up via Raspberry Pi 3B+ to JMRI and it all looks like this:
Hard to see in the dark, but the left red track on the screen (block01) is where the locomotive sits currently, as can be seen in the photo.
Really, either circuits would work and it only depends on time and money spent to build them, being resource efficient and all. I’m still not sure which way I’ll go as I have a few more ideas to try first, one using opto-couplers. More about that later.