Alarm with pic 16f628, ds275 transceiver, motion sensor and old modem

I have an old external 2400 b.p.s. modem that somebody gave me and I had the idea of creating an alarm with it. The advantage of modems is that you can interact with the phone line for making calls.

A passive infrared sensor (PIR) is waiting for a person to enter a room. If some movement is detected, it reports to a pic microcontroller. Finally the pic dials a phone number through the modem to alert the user.

Stuff I have used:

To make the circuit as easy as possible I have used a 16f628a pic because I don’t have to use a quartz crystal, I can disable the MCLR pin and use the integrated USART (also a 16f88 pic should use). In the same way I used the ds275 because it can communicate with a serial port without a capacitor (unlike MAX232). I have soldered some wires directly to the modem (1 for GND, 1 for 5 v. and 1 for 9 v.), so It doesn’t need an external power supply.

This is the circuit schema:

The PIR sensor has a digital output and it’s connected to the RB0 pin of the pic, which can be programmed as interrupt, so the pic can be in sleep mode until it receives a signal from the sensor. When this happens, it starts sending AT commands to make the alarm call. As the pic can’t talk directly to a serial port, the transceiver converts the pic signals to RS232 signals for both receiving and sending. Once the call has been made and the modem detects that the call is ended, it returns a numeric code that the pic receives and change to detection mode again.

A picture of the whole system:

A demostration video:

What you can see in the video is: The modem is turned on and the pic configures it to disable command echo, change to return numeric responses and turn off the volume of the modem speaker. The user has 15 seconds to leave the room, then the pic waits a motion detection. When it is detected the pic dials a fixed phone number and the user will receive the alert.

The pic is programmed in CCS and the source code is this:

main.h

main.c

You have to replace XXXXXXXXX by the phone number you want to call.

3 comentarios en “Alarm with pic 16f628, ds275 transceiver, motion sensor and old modem

  1. Bob Wilson

    It’s a great idea !!!

    I have an inexpensive motion sensor auto dialer that dials my cell phone if it detects motion.

    I would love to find a device that would do the same thing and send me a pic.

    Your invention is great but it helps if you have the technical smarts to do it.

    Do you know if there is an off-the-shelf version of a picture sending auto dialer ???

    Thanks for your time

    Bob

    Responder
  2. wanda

    I have an inxpensive motion sensor w/auto dialer. Since it is analog it does not work on digital phone lines. Do they make a digial sensor that will work or is there a attachment that will change analog to digital. Does not include photo attachment.

    Thanks for your help.

    wanda

    Responder

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *


El periodo de verificación de reCAPTCHA ha caducado. Por favor, recarga la página.