0 Members and 1 Guest are viewing this topic.
Petski- I think you're missing a sensor somewhere. A basic crossing needs four sensors, two on each side. One further out to trigger the gates, and one close in (on the opposite side) to indicate when the crossing is clear. In order to get speed information, you need a pair of sensors in the further out position instead of one. That's three sensors per direction for a total of six.
Has anyone experimented with a Hall effect sensor, aka, magnetic field sensor? This has me intrigued. How sensitive is the sensor, and how far does it detect.
OK, I see what you're getting at. Since trains are different lengths, I presume the programming would look something like:When occupancy is tripped, calculate speed.Given speed, calculate delay until activation.Activate gates so that they are closed X seconds before train arrives.When occupancy clears, calculate speed (or if you want to risk it, just use previous speed)Given speed, calculate delay until deactivation.*Deactivate gates so they they do not open until just after train is clear.
Doesn't work if the train stops (or slows way down) where I put the asterisk.Personally I care quite a bit less about the timing of it going down than about it staying down until clear, regardless of what happens. Which is why I would want at least one optical detector for the crossing itself, regardless of the method used to detect the approach.
Proof of concept!Tomorrow I'll add servos!