GSM Voice Dialer with Automation Control using PIC18F46K20-I/PT
Connected to a burglar alarm or fire alarm in the event of making phone calls playing voice messages. Controlled via DTMF actuators can operate on the spot.
In recent years we have introduced several telecontrols based on the SIM900 GSM module. We released schematics and code for a gate opener (that activates when receiveing a call from a given number), a GSM thermostat to manage the temperature of remote houses with simple text messages, a remote alarm control with DTMF and, last but not least, a remote alarm with I/O and controlled via calls or SMS.
Many of these tools send text messages or place phone calls in response to changes to the electrical inputs. In some cases, especially when the receiver is a human, nothing is like a voice that clearly yields you screaming “fire in progress!”, or”thieves in the house!” etc. …
That’s why – and also since we love things that speak (see our Voice shield for Arduino) – we decided to design a remote alarm, with text to speech capabilities and able to send DTMF commands (which allows quick and easy remote configuration).
This device can be controlled by the phone keyboard and only accept calls from a defined group of numbers (8) that must be stored in the device or from any number, as long as a password is provided. Controls are there for management for output relays, inputs, as well as for some operational settings.
The most attentive of you will have noticed that the schematic is missing a component, ie: the DTMF decoder…where’s the mystery? Well, we can do without 8870 (the decoder that always equipped our telecontrols in the past) because since few months SIM900 module can directly handle DTMF decoding. This means that all new SIM900 are able to inform the microcontroller and clearly distinguishing a DTMF two-tone from another.
Also our breakout boards with SIM900 have this feature.
Well, let’s start with the analysis by the main component, ie the microcontroller that manages the GSM / GPRS module, checks the logical conditions of the two opto-isolated inputs and controls the two relays. Power supply is not stabilized DC voltage (applied to points named +PWR and -PWR) its value is between 9 and 32 V; it is filtered downstream the D1 protection diode from polarity inversion by means of the C1 and C2 capacitors. F1 fuse allows to protect the circuit and the power source in the event of a short circuit in the integrated controller that follows.
The microcontroller, the speech synthesis modules and GSM modules, as well as the rest of the circuit, are made to operate at 3.6 V, derived from a switching (U1) based on MC34063 integrated and used as series PWM regulator with inductance winding.
The UART inside the PIC18F46K20-I/PT, is accessible from pins 44 (transmission) to 1 (reception) and is used to give commands to the mobile phone and the voice module, sharing the same bus; the GSM module is cyclically interrogated using the TX in order to verify SMS arrival, while TX and RX together serve, during calls or messaging, to communicate between the microcontroller and the GSM module. With regadrs to the voice module, TX imparts commands and RX reads incoming data.
The GSM is also managed via RC5 and RD0: the first controls the on/off switch (via a transistor in mobile base), the second resets the mobile module.
The CTS (Clear To Send), RTS (Request To Send) and DCD (Data Carrier Detect) are actually not used as such, but they instead form the four-wire SPI bus the microcontroller uses to communicate with the speech module. The voice module is mounted on the base board and, upon it, it takes place the phone circuitry.
Now let’s see the alarm inputs read by the RB4 and RB5 I/O, both configured as input and provided with internal pull-up resistor; each reads the state of the output transistor of the corresponding optocoupler. Each input (IN1 and IN2) is active when subjected to a voltage value between 3 and 30 V. The collector of each optocoupler is connected to a pin of the microcontroller (14/U4 and 15/U5).
For more detail: GSM Voice Dialer with Automation Control using PIC18F46K20-I/PT
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w