I have lots (~20?) of #4050 digital distance sensor on my train track that tell me when a train goes by. The issue is that they all go into a raspberry pi (either 4, 5, or pico), so I need 3.3V compatibility. But if I power the sensors at 3.3V, startup is unreliable because of the long wires powering them (an extra capacitor at each fixes that; there’s a forum topic about it).
So, what I’d like to do is power them at 5V and translate to 3.3V on the way to controller. There are many ways to do that, but a super cool way would be if I could remove a shunt (or do something) on the sensor so it’s output changes from driven to open collector. Then I could wire directly and set the pi’s input to pull up.
I don’t know how the output is driven - whether it’d take more components or could be something really simple. But if easy to do it would make my use case much simpler (5V power to the sensor, 3.3V input back at the micro).
I notice the sensors were recently re-spun, and I’m looking at a new layout where sensor startup seems to have gone intermittent, which made me think of this again. (I had hoped the wires on this one were not too long, but I guess they are.)
