Sunday, 18 March 2012

Saturday, 17 March 2012

Distribution Board Panel Wiring Design

Figure 21: DB Wiring Design


In the above figure, it shown the wiring design for DB-Con distribution board.

Thursday, 15 March 2012

Control Board Circuit

Overall from the previous posts, they together create a complete control circuit to monitor the 1st RCCB situation and turn on the Backup RCCB when the 1st RCCB trip.

Figure 20: Control Board Circuit

Wednesday, 7 March 2012

ICSP: In-Circuit Serial Programming

In-System Programming (ISP) is a technique where a programmable device is programmed after the device is placed in a circuit board. In-Circuit Serial Programming (ICSP) is an enhanced ISP technique. ICSP (In-Circuit Serial Programming) mode is special programming protocols that allow read and write to PIC Microcontroller and is the most direct method used to program the device. The ICSP capability is microchip’s proprietary process for microcontroller programming in the target application. The ICSP interface uses two pins as its core. The programming data pin (PGD) functions as both an input and an output, allowing programming data to be read in and device information to be read out on command. The programming clock pin (PGC) clocks in data and controls the overall process.

Serial programming allows customers to manufacture boards with unprogrammed devices and then to program the digital signal controller just before shipping the product. Serial programming also allows the most recent firmware or a custom firmware to be programmed.
Figure 19: ICSP Connector

PGD - Data: usual port and connection RB7
PGC - Clock: usual port and connection RB6
RESET: for the reset input

These are the signals that do the work. Data (PGD) and clock (PGC) transmit data to the pic micro. First data is sent either high or low voltage (0/1). After a suitable time the clock is strobe low to high - rising edge clocking the data into the microcontroller. PGD is also the line driven by the pic micro during verify i.e. it is bi-directional.

Monday, 5 March 2012

AT Command

AT Command is a set of instructions used to control a modem. It is the abbreviation of ATtention. Each and every command of the set starts with “AT”. That's why modem commands are called AT commands. Many of the commands that are used to control wired dial-up modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data state), are also supported by GSM/GPRS modems and mobile phones. Besides this common AT command set, GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM technology, which includes SMS related commands like AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages).

Table 1: Common AT Command

Figure 18

Click here for more AT Command Classification information

Sunday, 4 March 2012

UART Circuit

Figure 16: UART circuit contain of MAX232 circuit and the DB9 pin socket

For this post, there will be discussing on the UART circuit which enable for the GSM Modem connection to the PIC16F877A.

Figure 17: DB9 Serial Port Female Connector and MAX232 IC

A serial port is used to connect devices or computers, and therefore it should be connected to another serial port. An external device or modem that is connected to the serial port has an identical built-in serial port. It is possible two connection types between serial ports: straight (pins2 on both sides are connected) or null-modem (pin2 is connected to pin3 on another side). First connection type is used between DTE (Data Terminal Equipment) and DCE (Data Communications Equipment) devices (for example, a computer and modem), and the second connection type is used between two DTE devices (for example, two computers or a computer and an external device).

All signals of the RS232 port is are unidirectional. For example, if pin 2 outputs data, then it is unable to receive any signal using this pin. Therefore, two devices that can send data out (DTE-DTE connection) can’t connect using a straight cable. If not, then they would both send out signals on the same wire but neither would be able to receive any signal. Initially, RS232 ports were used for connecting a dumb terminal (DTE) to a modem (DCE). Nowadays computers used as DTE instead of a terminal. The meaning of the pins is the same on both Data Terminal Equipment and Data Communications Equipment. The names: "receive" and "transmit" should be interpreted from the "point of view" of the computer (DTE).

For this project, the microcontroller works on TTL logic; Logic 1= 5V and Logic 0 = 0V. The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels during serial communication of PIC16F877A with GSM Modem. It is a dual driver/receiver that includes a capacitive voltage generator to supply RS232 voltage levels from a single 5V supply. Each receiver converts RS232 inputs to 5V TTL/CMOS levels. These receivers (R1 & R2) can accept ±30V inputs. The drivers (T1 & T2), also called transmitters, convert the TTL/CMOS input level into RS232 level. The transmitters take input from controller’s serial transmission pin and send the output to RS232’s receiver. The receivers, on the other hand, take input from transmission pin of RS232 serial port and give serial output to microcontroller’s receiver pin. MAX232 needs four external capacitors whose value ranges from 1µF to 22µF.

Friday, 2 March 2012

GSM / GPRS Modem

Figure 15: GSM Modem

A GSM modem is a wireless modem that works with GSM networks. A wireless modem behaves like a Hayes compatible dial-up modem. The main difference between a standard Hayes modem and a GSM modem is that a Hayes modem sends and receives data through a fixed telephone line while a GSM modem sends and receives data through radio waves. A GSM modem can be an external unit or a PCMCIA card (also called PC Card). An external GSM modem is connected to a PC through a serial cable, a USB cable, Bluetooth or Infrared. Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate.

GSM/GPRS Modules are similar to modems, but there's one difference: A GSM/GPRS Modem is external equipment, whereas the GSM/GPRS Module is a module that can be integrated within equipment. It is an embedded piece of hardware.

PC's use AT commands to control a modem. GSM modems and normal Hayes modems support a common set of AT commands. A GSM modem can be used just like a Hayes compatible modem. GSM modems support an extended set of AT commands. These extended AT commands are defined in the GSM standards. With the extended AT commands, the things that can be done are like:
  1. Read, write and delete SMS messages.
  2. Send SMS messages.
  3. Monitor the signal strength.
  4. Monitor the charging status and charge level of the battery.
  5. Read, write and searched phone book entries.
The number of SMS messages that can be processed by a GSM modem is pretty low, approx. six messages per minute.
A GPRS modem is a GSM modem with additional support for GPRS technology for data transmission. GPRS means: 'General Packet Radio Service'. It is based on a packet-switched technology, as an extension to GSM (note that GSM is a circuit-switched). An advantage of GPRS over GSM is that GPRS has a much higher data transmission speed. GPRS can be used as the bearer of SMS. If SMS over GPRS is used, an SMS transmission speed of about 30 SMS messages per minute may be achieved. This is much faster than SMS over GSM. A GPRS modem is required to send and receive SMS via GPRS. Some wireless carriers do not support the sending and receiving of SMS via GPRS. A GPRS modem is typically required for MMS.