You are probably aware of the problem: how to ensure a minimum of security when you back out of a private property in a car, without visibility. Most of the time, people simply back out really slowly and hope that no one bumps into them. But you are still at the mercy of a distracted driver. Hence the idea of a light barrier triggering a light signal to warn oncoming traffic of the danger.
How to back out from there while minimizing collision risks?
We could have settled for a commercial light barrier which would drive a simple light bulb, but we preferred to make one with Yoctopuce modules, which allowed us to include a few subtleties.
The light barrier
For the barrier, we used a PNP photo-electric sensor connected to a Yocto-IO. A YoctoHub-Wireless-g drives the later.
The optical sensor at the heart of the system
We also added a Yocto-Color-V2 allowing us to display the state of the sensor. To power all this, we buried a wire carrying 12V. These 12V are converted into 5V before powering the hub. A Pololu regulator takes care of the conversion. Using 12V rather than 5V has two advantages:
- The sensor needs at least 10V to work
- The wire powering the system has a length of several tens of meters: if we used a 5V power supply, we would likely have far less than 5V at the other end of the wire because of online losses.
Diagram of the light barrier
Everything is cramped into a small aluminium waterproof enclosure. The difficulty is the optical sensor: it doesn't work very well when it is behind glass. As it is waterproof, we could have moved it outside of the enclosure, but for aesthetic reasons, we'd rather embed it in one of the enclosure walls.
The barrier control enclosure
Note that the optical sensor needs a reflector at the other end of the barrier. Installing this reflector exactly opposite from the sensor, in a stable location, was probably one of the most delicate operations of this implementation.
For the light beacon, we used a stick of 8 Adafruit leds driven by a Yocto-Color-V2, a Yocto-Light-V2 is present to measure ambient light and to adjust the led power accordingly: blinding passersby may be somewhat counterproductive. A YoctoHub-Wireless-g drives these two modules. The YoctoHub is powered, like the barrier, by a Pololu regulator powered in 12V by a buried wire.
Diagram of the light beacon
The led stick is put in an aluminium pipe behind an opening drowned in transparent resin. The light sensor is at the top of the pipe and is also sealed in transparent resin. The bottom of the pipe is closed off with silicone. The pipe goes through a waterproof enclosure in which we packed the control electronics.
The light beacon
The control application
The system is controlled by wifi from an application written in Python. When the application detects an obstacle in the light barrier, it waits for a second and if the obstacle is still here, it triggers the beacon blinking. The beacon stops blinking 5 seconds after the obstacle is removed or, at worst, after a minute. Thus the beacon is not triggered if a pedestrian crosses the light barrier. If someone parks through the barrier (yes, it does happen) the beacon doesn't stay on uselessly for hours. These small adjustments would probably not have been possible with a simple barrier.
And does it works?
It works rather well, but there remains to see whether it's effective. There is a small danger for the beacon to mesmerize passersby rather than to make them understand that there is a danger :-) We even have a short video of the working system.