logo1.bmp (61374 byte)

home

nutchips

designs f.a.q.

provokations

crc guide who am I ? awards

 

Wireless Alarm

easily customizable to your needs - and suitable for wired sensors, too

Schematic | How it works | Truth table | Assembling | Testing | Parts list

Versatile, agile, tailored upon your size

Making yourself an alarm is both useful and interesting: but the best part is when you take the remote control out of your pocket, and switch on the alarm while saying to your friends: "I've done it in a weekend".
Making yourself an alarm gives you maximum flexibility: as this project works according to the Nutchip truth table, you can change it to suit your needs. Some people would like to have like a "panic" button, in order to sound the siren. Some other pepople need a very long time to leave the house. Or you might be looking for an alarm that keeps that special sensor on even if you are at home. Possibilites are unlimited!

Wired + wireless

This alarm is controlled by an handy radio remote control. It is compatible with a variety of sensors:

  • wireless* passive infrared sensors (PIR), capable to detect human body heat in a room of normal size
  • common wired volumetric sensors, radar or infrared
  • magnetic switches (reed switches), immediate or delayed, in order to sense door or windows openings
  • wireless* magnetic sensors

All of these sensors can be configured for either immediate or delayed alarm. Delayed alarms are required to allow some time for the legitimate user to get in an switch the alarm off.
You can mix sensors of different types. Almost all alarm sensors adopt "normally closed" contacts in order to detect wire cuts.
(*) transmitters must be compatible with one of these encoders: MM53200, UM3750 or UM86409.

 

ADDITIONAL INFO

Schematic

Let's approach the main schematic as if it was made of blocks in order to understand it more easily. These blocks are: radio front end, contact inputs, reset generator, outputs, power supply and, of course, core logic provided by the Nutchip.
A wireless alarm sensor is similar to a remote control. When someone enters its detection range, a wireless sensor sends an impulse train as if someone pressed a special remote control key. A radio receiver module on the main board detects the pulse train, and forwards it to Nutchip' REMOTE control pin. The Nutchip decodes the signal, differentiating between immediate and delayed sensors (aside from true remote control signals used for switching the circuit on and off). As for all radio-based designs, always remember that a good radio receiver cannot replace a good antenna. The circuit works well with an home made antenna (straight insulated wire), unless if your budget has enough room for a better one.

Wireless sensors aside, our schematic provides also inputs for wired sensors. Such sensors are treated as normally closed contacts, that break when someone enters their range or opens a door or window. It is often the case that they provide a second anti-tamper contact, that breaks if you open the case or attempt a sabotage.

Therefore we need two inputs: one for connecting anti tamper and immediate contacts and another one for connecting the delayed contacts. The "immediate" input is connected to the Nutchip pin IN1, and the "delayed" on to pin IN2. As the wires are usually long enough to collect any sort of noise and interference, a couple of identical networks provide quite an energic cleanup and clipping on the input signal before it arrives to the chip. These networks are built around R7-R9-C5-DZ2 and R6-R8-C4-DZ1 respectively.
Capacitor C1 is a bypass for the main power supply. It is recommended to place it as near as possible to the Nutchip.
All of the output are connected to a LED diode (DL1,DL2,DL3,DL4), in order to display the status of the main board. A siren is connected to the fourth output, through RELAY1.

As this circuit is designed for uninterrupted service, brown-outs are a possibility that cannot be excluded. A brown-ut is a big decrease in the mains voltage level that does not end into a black out. Brown-outs are dangerous for electronics devices, because it can result in improper or partial reset with impredictable consequences.

This is why whe have added IC2, a special voltage detector and RESET generator. Together with the delay network R10-C6, it ensures a graceful reset to the circuit even in worst cases.

schematic
Project schematic. This alarm is switched on and off using a remote control. It is suitable for wired as well as for or wireless sensors.

Power supply

The board requires a 12Vdc power supply. It is common practice to power an alarm from a battery (kept under constant recharging), in order to be immune from power shortages. Most alarm sensors require a 12Vdc power supply as well. The battery must be big enough to power the central AND the sensors for an appropriate period of time. To create a stabilized 5 volt power source required by the Nutchip, we adopted a "classic" regulator, based on the 7805 (IC3), as shown in the schematic on the left.

 

The 5 volt regulator is included in the main circuit board

How it works

To engage the alarm system press the first pushbutto on the remote control (key1). LED DL1 will lights up: starting now, we have 3 minutes to leave the home, after that time the alarm will be active (this state is signalled by LED DL2). Exit time, as well as any other time on the system, can be changed in order to suit your needs: all you need to do is to modify the cells marked as "timeout" on the truth table.

Now let's imagine that someone attempts to break in a protected area. Opening a window o a door protected by an immediate contact (be it connected with wires or wireless) will sound immediately the siren connected to RELAY1. According to European regulations, the siren will sound for a 30 seconds time, after that the system is automatically re-engaged. It will sound again only if the cause of the alarm has not disappeared.

Sometimes it is impossible or impractical to protect all of the windows and doors around a perimeter. Let's see what happens if our intruder triggers an area protected by a delayed input, typically a pathway in the range of a passive infrared (PIR) sensor. In this case, the system will turn to "pre-alarm" mode (LED DL3 turns on). The siren is going to sound within 1 minute, a period long enough for the legitimate user for switching the system off, pressing key2 on the remote control. Otherwise, the siren will sound as in the case of immediate sensors.

system status
DL1
DL2
DL3
DL4
not engaged (OFF)
off
off
off
off
laving home delay
on
off
off
off
engaged (ON)
off
on
off
off
delayed alarm detected (siren will sound within 1 minute) 
off
on
on
off
alarm (siren is sounding!)
off
on
on
on

four LEDs give a visual representation of system status.
Note how this five lights combination match the five truth table states.

 

Truth table

This project practically demonstrates how effective a Nutchip can be doing relatively complex tasks. the truth tables counts only five different states.
State zero (st00) is the state automatically selected when the board is first powered on. In this state the system is not engaged, and all we have to do is to wait for the user to press the first key (key1) on its remote control.

State 1 (st01) defines the time for leaving the home. It consists of a timeout (3 minutes), before going to next state (st02); meanwhile, the remote control is checked to see if the user wants to switch off the system.

When in state 2 (st02), the system is fully engaged. Now it's time to remember that wireless sensors are handled as if they were remote control keypresses. Here we assume that a delayed wireless sensor transmits the code of the fourth key (key4) of the remote control, and an immediate sensor the code of the fifth key (key5).
As regards wired sensors, delayed inputs are connected to input IN2 and immediate ones to input IN1. Under normal operation, such sensors act as a short circuit to the GND (sensor contact breaks only when triggered), keeping both inputs to logic level 0.

 

The truth table counts only five states. This file is alarm.nut

 

State st02 lists five conditions:

State st03 is the pre-alarm state. It defines a timeout: if the legitimate user does not turn the system off pressing key2 on the remote within 1 minute, the state changes to st04.
Note how during this time, immediate inputs are checked as well.

Finally, state st04 is active when the siren sounds! The only allowed functions in this state are switching the system off (pressing key2 on the remote, as seen before) or, if you are a burglar, to run away like the hell. The timeout here defines the siren time (30 seconds for Europe), after that the system is re-engaged automatically jumping to state st02.

 

Assembling

Thank to its low componenent count, this project is suitable even for less experienced experimenters, especially if you use the printed circuit board. Alternatively the circuit can be built on a breadboard: all components are placed on a 100 mils lattice (gray grid).
Start from the wire jumper JP1 (in red), then continue with resistors and the socket for the Nutchip. Next place and solder the diodes, being careful not to reverse or overheat them: the cathode is marked whit a white o colored band that must match with the drawing below. Next step is the placement of ceramic capacitors, ceramic resonator, and connectors. Continue with TR1, IC2 (they look quite the same, be careful not to swap them), and IC3. The last parts to solder are the most cumbersome: electrolytic capacitors C8 and C9 (follow polarity as shown) and the relay. There are just too many different relays available, so please check yours with a multimeter before soldering it. And if your siren requires a normally closed contact instead of a normmally open, you must change the PCB tracks accordingly.


Follow this PCB layout to build the project.
Don't forget jumper JP1. The gray grid marks a 100 mils spacing, as used for breadboards.

Depending on the case you choose, you can solder the LEDs straight on the PCB or place the on the front panel connected with short wires. Whatever your layout, be careful to not reverse their polarity (A=anode, K=cathode, the short pin).

The last part is the RF module. Solder it aligning PIN1 towards the antenna pad (left side). We soldered a 16.5 cm straight wire tho the antenna pad in place of a "real" antenna, getting a range of about 25 meters for the remote control.

Testing

Start testing without the Nutchip. Connect a 12Vdc power source to M3. With a multimeter in Vdc mode, touch the pin 10 on IC1 socket with the black probe, and while holding it in place, touch pins 20, 1, 8, 9 with the red one. If you read a value between 4.7 and 5.1 volts for all of these pins, then disconnect power and place the Nutchip in its socket (be careful not to reverse it).

Connect the board to the PC (plug the interface to CN1), power it again, and start Nutstation.
Load the truth table, then customize the key codes to suit dip switch settings in your radio remote control and wireless sensors (see table on the right).

Time is right to download the truth table to the Nutchip, and the board will be ready to run.

Remember to short unused inputs with a wire jumper, otherwise the system will detect an alarm condition!

 

 
KEY
USED FOR...
KEY1 engage system: first pushbutton on the remote control
KEY2 switch system off: second pushbutton on the remote control
KEY4

code sent by immediate wireless sensors
e.g.: window or door sensors

KEY5 code sent by delayed wireless sensors
e.g.: infrared sensors on main entrance

All the remote keys used by the system.
You can learn them from your remote and sensors with the "self learning" window from Nutstation

Parts list

R1, R2, R3, R4 = resistor 820 ohm 1/4 W
R5 = resistor 4700 ohm 1/4 W
R6, R7 = resistor 1 kiloohm 1/4 W
R8, R9 = resistor 22 kiloohm 1/4 W
R10 = resistor 100 kiloohm 1/4 W
C1, C2, C3, C6, C7 = ceramic capacitor 100 nF
C4, C5 = ceramic capacitor 470nF
C8 = electrolytic capacitor 470uF/25V
C9 = electrolytic capacitor 100uF/16V
OSC1 = ceramic resonator (three pin type) 4 MHz
D1 = diode 1N4007
DZ1, DZ2 = zener diode 4.7V 0.25W
TR1 = transistor, BC337
IC1 = Nutchip NUT01AK or NUT01DEA
IC2 = MC34064-5
IC3 = voltage regulator, UA7805 or similar
RF = radio receiver module 433 MHz, AUREL NB-CE or MIPOT 2-5000650
CN1 = option: 4 pin connector for Nutchip programming interface
DL1, DL2, DL3 = LED, any colour
M1 = 4 pole terminal block clamp
M2, M3 = 2 pole terminal block clamp
RELAY1 = relay, 5V coil
PAD1 = 433 MHz antenna.

 

 

SIRENS

The schematic uses the normally open switch on the relay. It's the easiest way to connect a piezo-electric siren. Despite of the relatively low price, piezos are very powerful and effective.

On the other hand, if you are looking for a siren to be mounted outside, ask for a self-powered siren with a normally closed (NC) input. This gives you extra protection in the case of a burglar cutting its wires.

To use an NC siren you need to change the printed circuit board in order to take advantage of the unused relay pin.
Alternatively, you can reverse the OUT4 logic state in the truth table.

home

nutchips

designs f.a.q.

provokations

crc guide who am I ? awards
home | nutchips | designs | f.a.q. | provokations | crc guide | who am I ? | awards