Multipurpose Isolated Serial Input Output Module

Project code:- E50 Project Cost:- INR:- Rs. 8500/- USD:- 230$

Serial IO Module

Designed for control and sensing applications, this project provides 8 relay outputs and 4 optically isolated inputs. It can be used in various applications including load switching, external switch input sensing, contact closure and external voltage sensing.

Serial IO Block Diagram

Serial IO Block Diagram

It is controlled via a serial port using a set of simple text commands. Connection to the isolated inputs and relay outputs is via “pluggable type” screw terminal blocks The project presented here is based on world’s most powerful intel’s mcs-51 family of microcontroller atmel at89c51.In this project we are using AT 89C2051 microcontroller,since this controller has two ports are more than enough for our project.

Application area: the project can be used for various application wherever you require control using pc.

1 hotel power management

2.street light management

3.home automation

4.load shedding

5. High voltage grid control

6. Industrial automation

7.electro,hydrolic and pneumatic valve control

8. Robotic control and many more

All the above operation are possile from the ibm pc through com port.

User can control the devices using one of the following ways:-

1. Direct from pc using hyperterminal
2. Dialup network
3. Internet, using web applications
4. Through s.m.s.

User has to write his own codes for the pc , he is not require to write any code if he uses hyperterminal which is a part of all the window operating system .

This circuit can be connected to pc through com port provided. On pc normally two ports are available com1 & com2 this can be connected to any available com port, through a serial cable one normally used with modem ic max 232 is a level conver ter ic to convert ttl level data to +12v and –12v level for complete details on this ic, refer to manufacturer’s data sheet.

Using the serial port over a parallel port has several advantages:

1. Fewer wires are required (three instead of nine or more) 2. Serial cables can be a lot longer (up to 100ft),allowing “remote” control. 3. Serial ports can be used with any computer and operating system. The kit requires a 9-to-12V 1AMP AC power supply.

ASSEMBLY INSTRUCTIONS

Follow the component overlay on the PCB, starting with the resistors then diodes, IC sockets and crystal. Next fit the ceramic and monobloc capacitors, followed by the small electrolytic capacitors. Electrolytic capacitors are polarised, the positive lead is marked on the overlay, the negative is marked on the body of the capacitor.

Leave the large electrolytic until later.Fit the regulator next and use the 3mm screw and nut to attach the heatsink. All that remains is to fit the DC jack and D9 connector, followed by the relays and finally the large electrolytic capacitor.

Do not insert any ICs yet. Connect a power supply to the DC jack (centre positive) and measure the regulator output (5V). If OK disconnect the power and insert the ICs. Take care that the ICs are the correct way around and none of the leads are bent under the body of the IC.

Leds to the front panel. The PCB uses only four of the eight mounting posts on the bottom of the plastic case. Remove the four inner posts. They can be easily “snipped” off using wire cutters. Fit the front and rear panels to the PCB and hold in place.Slowly position the PCB into the base of the plastic case, making sure that the front and rear panels slide into the

Slots provided. Secure the PCB to the case using the selftapping screws. Fit and secure the lid.

CIRCUIT DESCRIPTION

This project started out as an extension of my previous project “HOTEL POWER MANAGEMENT”. . The circuit is very simple and straightforward. The brains of the kit is IC1, an 89C2051 microcontroller from Atmel. This was chosen because it has the required number of I/O pins and a built in serial port. It is pre-programmed to process all commands received via the serial port, control the relays and monitor the inputs. IC8 provides conversion between TTL and RS232 signals. To drive each of the relays. The opto-couplers, IC4-7, are used to provide electrical isolation between the inputs and the rest of the circuitry.At power-up, all relays are off (released) and the data LED is off. The data LED comes ON indicates proper functioning of microcontroller

OPERATION

Hyperterminal for Windows 98 . Start ® Programs ® Accessories ® hyperterminal

2. Double click on “Hypertrm.exe” to start the program. 3. In the “New Connection” dialog box, type in a name for this connection (eg. Myterm). Select an icon for this new connection then press OK. 4. The “Phone Number” dialog box will appear. Go to “Connect using” and select “Direct to Com 1” (orwhatever Com port the kit is connected to). Press OK

To continue. 5. The “Port Settings” dialog box will appear. Select the following then press OK.

· Bits per second : 9600

· Data bits : 8

· Parity : None

· Stop bits : 1

· Flow control : None

The program is now ready to go. When exiting you will be asked “Do you want to save session ?” Press “Yes”. A configuration file called “myterm.ht” is created with the” folder. Double click on this icon to start the program from now on. Way to test the kit is to use a terminal emulator program running on your computer. Run the program and set the communication parameters (asdescribed above). Connect the kit to the serial port on your PC using a straight through 9 pin cable. Switch on the power. The kit outputs an ‘#’ character as a prompt to indicate it is waiting to receive commands. Send a few commands to operate and release relays and check their status. Apply a voltage level to each of the inputs and read back its status. See also page 6 for this testing described in more detail.lator

COMMANDS

A set of simple text commands is used to control the relays, return their status or read the inputs. Each command consists of a string of ASCII characters followed by carriage return (Enter ¿). The ‘#’ character is output as a prompt to indicate the kit is waiting for a command. It should be on your screen. Each character received is echoed back. On completion of each command, good or bad, a carriage return/line feed combination is output followed by the ‘#’ prompt. If the command or parameter is invalid, the command is ignored and a ‘?’ is output before the next ‘#’ prompt. Note: · Commands are not processed until the carriage return character is received. · Commands can be in upper or lower case. · Relays are numbered 1 to 8. Relay number ‘0’ (zero) indicates ALL relays. · Inputs are numbered 1 to 4. Input number ‘0’ (zero) indicates ALL inputs.· Where a hex byte is used, each bit within the byte indicates its corresponding relay or input. Bit 0 indicates relay or input 1, bit 1 indicates relay or input 2, etc. Nx – Turn a relay ON (where x = relay number)

Eg. “N4” – turn on relay 4 “N0” – turn on ALL relays Fx – Turn a relay OFF (where x = relay number)

Eg. “F4” – turn off relay 4

“F0” – turn off ALL relays

Tx – TOGGLE a relay on/off (where x = relay number)

Changes the state of a relay (ON to OFF, OFF to ON)

Eg. “T6” – toggle relay 6

“T0” – toggle ALL relays

Rhh – Set ALL relays directly

“hh” is a hexadecimal byte. Each bit within the byte indicates whether the corresponding relay is operated or not. If the bit is ‘1’ then the relay is operated, if the bit is ‘0’ then the relay is released.

Eg. “R55” – relays 1,3,5,7 ON, all others OFF

“R0F” – relays 1-4 ON, all others OFF

Sx – relay STATUS (where x = relay number)

A ‘0’ (zero) is returned if the relay is released, ‘1’ if operated.

The command “S0” returns the status of ALL relays. In this case a hex byte is returned. Each bit within the byte indicates the status of the corresponding relay. Eg. “S3” – returns the status of relay 3 “S0” – returns the status of ALL relays

Ix – INPUT status (where x = input number) A ‘1’ is returned if the input is active or enabled, ‘0’ otherwise.

The command “I0” returns the status of ALL inputs. As with the ‘S’ command, a hex byte is returned. Bits 0-3 indicate the status of inputs 1-4. Bits 4-7 are unused and are set to ‘0’. Eg. “I1” – returns the status of input 1

“I0” – returns the status of ALL inputs A special command, ‘?’, will print the software revision date.

CONT………….

Click here on how to place an order for the project