Click images to expand
The track sensors are simply Hall Effect sensors that detect magnetic fields. In order for them to work, you'll need to attach magnets to the bottom of your engines. Some of my magnets are 2 mm thick and some are only 1 mm thick. It just depends on what vehicle you're attaching the magnets to as to what size you'll need. The A3144 sensors can detect a magnetic field about 1/2 inch away in plain air, but when placed under track, that distance is lowered, so you'll need to get them as close to the underside of the track as possible.
Review the datasheets:
Test the sensor:
Attach magnets to engines/trolley. I used super glue, but I'm sure there's other ways that will work fine too. I wouldn't recommend the baking soda trick as you'll want to keep your engine or trolley nice and baking soda can get messy quick.
Attach the sensor to the bottom of the track [click here]:
Please test your sensor to make sure you know what the correct orientation is before attaching it to your track. The numbers in the image are the order of the pin numbers. Also note, I do recommend soldering as opposed to using the Dupont connectors like I did originally. Soldering is especially important if you plan to transport your train set in a vehicle. I used plain super glue to attach my sensors, but the next time I do this, I plan to use the super glue + baking soda tick as shown in this video: [click here]
Schematic: [click here]
It may also be helpful to have the mcp23017 pintout handy [clik here]
Software: [click here]
Note that in the example programs, there is a "knob test" program that is very handy and will easily test if the sensors are working correctly or not.