Skip to main content
2 of 3
edited body
Trevor_G
  • 47k
  • 8
  • 73
  • 158

Olin's suggestion of micro-controlled system will definitely provide you with the most control and flexibility but if you want to mess around with a linear solution the following circuit sort of works in the simulator at least.

enter image description here

DIFFERENTIAL CHANGE SENSOR

I decided to go with a differential input using a photo-transistor. There are a lot of choices on the market so you may want to buy a few to test for the best results.

The amount of illumination present is supposed to change how much current bypasses R3 changing the voltage difference across it. The change in voltage here when the headlights flash is passed through the two high-pass capacitor C2 and C3, the output of which are biased at half-rail.

LOW PASS DIFFERENTIAL AMPLIFIER

This block takes the differential edges than make it through the sensor circuit, filter out high frequency noise, and amplify the result to produce a waveform biased around half rail that will modulate when light transients occur at the sensor.

SCHMIDT EDGE DETECTOR AND INTEGRATOR

This section uses a comparator with a threshold value to detect when the waveform generated by the above is strong enough. The edges of that are extracted by C1 and R20 and fed to the integrator U5.

As each flash occurs the voltage at the output of U5 will grow in steps.

THRESHOLD DETECTOR

This comparator is set up to generate a low level output that will trigger the 555 timer when the voltage on the integrator reaches the threshold level and will maintain it low till the voltage drops back close to mid-rail.

1 to 3 MINUTE GATE OPEN TIMER

I decided to use a standard 555 one-shot circuit to generate a long pulse output suitable to flip a relay to drive the gate. Since you did not seem to have any information regarding what was needed to do the latter, I kept it simple. (Before I get yelled at for using a 555... yes I know.. it's cheating.. but hey, for something simple like this they are still the cheapest, less fuss, way to do it.)

OUTPUT DRIVER

As you can see, the output driver uses a MOSFET that, for not, turns on an LED, but you can hook in a relay coil, with a fly-back diode, in parallel to R24 and D2.

VIRTUAL GROUND REGULATOR

I decided you probably want to use a simple power supply for this and I chose 12V for the simulation. It will however work on a variety of voltages though some tweaking of values may be required. In order to make it single supply, this little circuit generates a virtual ground, basically half-rail which is used in a few places as indicated by VG.


As I say, the above seems to work in LTSPICE, but whether it works in practice in your actual setup conditions is not guaranteed. The circuit seems quite sensitive, but in no way is optimized, and without actual parts and conditions it is impossible to tell if it is even close. I definitely suspect you will need to play with R1,R2 and R3 with the actual devices and in sunlight vs darkness to get some sort of compromise. Be aware though, circuits like this are notoriously finicky. Either way, the circuit may give you some ideas of where to start. Anyways, good luck.

Trevor_G
  • 47k
  • 8
  • 73
  • 158