HOME

 

interfaces to gate openers

Announcer

rings the bell when someone's crossing the gate

Dear old bell... | Schematic diagram | Truth table | Prototype

 

Dear old bell...

Long time ago, it was usual for shop doors to have a tiny bell. Opening the door would cause the bell to ring, telling the shop personnel a new customer arrived.
Our electronic announcer works exactly in this way: except it uses electronic means in place of mechanical ones. It connects to the photocell that is already present in automatic gate or door openers, detecting when someone activates them. The photocell is always active, also when the gate is already open. The circuit connects also to the doorbell circuit, ringing it with a special rithmic pattern in order to distinguish it from common people at the front door. It is very useful wherever there is an automated gate or automatic barrier:

  • factories and warehouses
  • shops with private parking lots
  • yards
  • greenhouses and gardens
 

the prototype has been assembled on a experiment printed circuit board

Schematic diagram

The circuit is easy to master once we divide it in its four main bloks:

POWER SUPPLY:
it takes advantage of the 24V (dc or ac) normally present in automatic openers
INPUT:
"detects" the status of the existing photocell, without interfering with its normal function
LOGIC:
The Nutchip contains all control logic
OUTPUT:
rings the existing door bell

M1 is a clamp connected to the 24V (dc or ac) power from the gate opener. The diode bridge rectifies the alternate voltage (should the opener use dc current, it merely adjust the positive and negative rail to match circuit polarity), in order to get the power required by the 24 V relay. The same potential, limited in current by the series resistor R1, feeds the 5V regulator IC1. The 5V stabilized voltage from IC1 powers the Nutchip; the R3-C5 network ensures proper RESET to the chip.

The input stage consists of a double switch relay, RELAY1. The original photocell's output connects to M2, therefore it powers the relay. RELAY1 clones the situation it sees on M2: it is energized when the photocell contact is closed, and it is released when the photocell contact is open. As a consequence, relay switches follow the original photocell behaviour. One of the two switches available in RELAY1 is brought to M3, in order to act as a replacement of the original photocell which is now connected to M2. The other is used internally by the circuit in order to detect the photocell signal. This second switch connects to Nutchip input IN1, letting him to know when someone enters the photocell range.

The output stage consists of the relay RELAY2 and its driver transistor Q1. We adopted a 24V dc relay in order not to overload the 5V regulator IC. Limiting the load to the Nutchip alone limits the power required from IC1, making an heatsink unnecessary. It is important to limit heat as much as possible in circuits intended for continuous operation, as the less heat produced, the longer the circuit's life. The clamp M4 connects in parallel with the existing doorbell pushbutton (the doorbell rings when RELAY2 is energized). Al the relay is in parallel, the doorbell will also continue to work as an ordinary doorbell.

The circuit logic is managed entirely by the Nutchip, as described in the following.

Parts list

R1 390 ohm resistor 1/2W
R2 10 kohm resistor 1/4W
R3 100 kohm resistor 1/4W
R4 1000 ohm resistor 1/4W
C1 470 uF electrolytic capacitor, 50V       
C2, C3, C5 100 nF ceramic capacitor, 50V minimum
C4 47 uF electrolytic capacitor, 16V

D1 diode 1N4007
DB1 diode bridge 80V 1A
DL1 red LED
Q1 NPN transistor type BC337
IC1 5V voltage regulator IC 5V type 7805
IC2 Nutchip integrated circuit, programmed in advance with the file "annunciatore.nut"
OSC1 4 MHz ceramic resonator with integrated capacitors (3-pin type)
RELAY1 24 volt dc single switch relay. Amperage varies according to your gate charcteristics.
RELAY2 24 volt dc double switch relay. Amperage varies according to your gate charcteristics.
M1, M2, M3, M4 bipolar clamp (8 places in total)


Truth table

The inner logic is very straightforward. When the circuit is powered up for the first time, the doorbeel rings continuosly for a couple of seconds. This comes handy should you need to test if the circuit is working (the doorbell relay must energize as soon as the circuit is powered) and if the doorbell is connected correctly.

Once the 2 seconds period has elapsed, the circuit passes to state st01, where it wait indefinitely until the input IN1 goes to logic 0 (which means the photocell is activated). Here there is a little trick. As all circuits operating in harsh environments, because of the noise produced by contactors and nearby electric motors, it is possibile for the circuit to detect a noise spike. In the state st02 we wait as little as 10 mS (0.01 seconds), prior to to make a second check on the input IN1 (state st03). If it is still low, the we can reasonably assume that it was a real photocell signal; otherwise, it was a momentary condition due to external interference and we ignore it, getting back to state st01.

When a photocell signal is detected, we want to emit a special ring pattern. We selected a longer tone, followed by three short pulses (beeeeeeeep beep bepp beep). This pattern is very well distingushable, but you can change to a different one if you don't like it. We build that cadence with a series of timeouts, passing from state st04 up to st10.


Nutchip state table

file "annunciator.nut"
COMMENTS TRANSLATED
st00 initial bleep for testing
st01 is anyone crossing?
st02

maybe someone - wait a moment

st03 yes, it was a visitor, go bleep
no, it was an interference, start again
st04 long bleep!
st05 silence
st06 bleep!
st07 silence
st08 bleep!
st09 silence
st10 bleep!
st11 wait for the photocell to be free
st12 blind time

 

In case of many people crossing the gate, as in the case of a factory entrance during rush hours, a bell ringing continuously can be annoying. Another case is when someone stops right on the door threshold! In order to make circuit operation useful and enjoyable, the Nutchip acts with two countermeasures. State st11 wait for the photocell to be free from obstacles before continuing. Therefore, should someone stop in front of it, the bell rings only once. Moreover, state st12 iintroduces a 30 seconds "blind time" during which the circuit purposedly ignores any input. This time proven to be fine with our tests, but you can set it to any other period you think appropriate.

 

Prototype

This circuit should be easy to build on a piece of perf board (see photo). Usually, this circuit will be placed inside a small plastic or metal box: it's a good idea to get one before starting to assemble the prototype, just to be sure that everything fits nicely. Also, don't forget to keep some board space for fastening the board to the box.

As this circuit does not provide a programming connector, you need to program the Nutchip prior to place it on the board (a socket is recommended, tough). Always fit the Nutchip in place as the last component, after checking that all the other parts are correctly connected and working. In particular, check for the power regulator to supply the required 5V potential before fitting the Nutchip (of course, remove power while fitting it in!).