My Profile
Active Members
TodayLast 7 Days
more...
Awards & Gifts
Online Exams
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian
cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
|
8 CHANNEL REMOTE CONTROL USING PC PRINTER PORT
Posted Date:
Total Responses: 0
Posted By: Hardik Panchal Member Level: Silver Points/Cash: 10
|
8 CHANNEL REMOTE CONTROL USING PC PRINTER PORT
GENRAL DISCRIPTION With the rapid progress in computer technology many people now have a surplus 8088 or 286 computer just gathering dust somewhere. Any thoughts that it could be given away magnamously to 'the kids' are quickly dashed when those same kids immediately recognize the offer for what it is, turn up their noses & bring out their own CDROM games & Pentium II, 450MHz computers conceited to the Internet. Thus these computers are free to be used as dedicated controllers for a variety of uses: turning on/off lights or other devices around the home, office, laboratory or factory come to mind. All that is needed is the interface to connect it to the real world. This Kit provides both the hardware and the software to do this. The hardware PCB plugs in directly to the parallel (printer) port of your computer. It carries 8 relays. Each relay is switched on or off by one bit of the output byte which usually goes to your printer to print a character. The software are provided operates under DOS.The kit is constructed on single-sided printed circuit.
TECHNICAL SPECIFICATION
• WORKING VOLTAGE - 12V AC/DC • OPRATING CURRENT - 1000MA • CONTACT RATING - 230V AC / 500
BASIC DISCRIPTION OF PRINTER PORT The Parallel Port (printer port) is the most commonly used port for interfacing home made projects. This port will allow the input of up to 9 bits or the output of 12 bits at any one given time, thus requiring minimal external circuitry to implement many simpler tasks. The port is composed of 4 control lines, 5 status lines and 8 data lines. It's found commonly on the back of your PC as a D-Type 25 Pin female connector. There may also be a D-Type 25 pin male connector. This will be a serial RS-232 port and thus, is a totally incompatible port.
Newer Parallel Port’s are standardized under the IEEE 1284 standard first released in 1994. This standard defines 5 modes of operation, which are as follows, 1. Compatibility Mode. 2. Nibble Mode. (Protocol not described in this Document) 3. Byte Mode. (Protocol not described in this Document) 4. EPP Mode (Enhanced Parallel Port). 5. ECP Mode (Extended Capabilities Mode).
The aim was to design new drivers and devices, which were compatible with each other and also backward compatible with the Standard Parallel Port (SPP). Compatibility, Nibble & Byte modes use just the standard hardware available on the original Parallel Port cards while EPP & ECP modes require additional hardware which can run at faster speeds, while still being downwards compatible with the Standard Parallel Port. Compatibility mode or "Centronics Mode" as it is commonly known, can only send data in the forward direction at a typical speed of 50 Kbytes per second but can be as high as 150+ Kbytes a second. In order to receive data, you must change the mode to either Nibble or Byte mode. Nibble mode can input a nibble (4 bits) in the reverse direction. E.g. from device to computer. Byte mode uses the Parallel's bi-directional feature (found only on some cards) to input a byte (8 bits) of data in the reverse direction. Extended and enhanced parallel Ports use additional hardware to generate and manage handshaking. To output a byte to a printer (or anything in that matter) using compatibility mode, the software must,
1] Write the byte to the Data Port.
2] Check to see is the printer is busy. If the printer is busy, it will not accept any data; thus any data which is written will be lost.
3] Take the Strobe (Pin 1) low. This tells the printer that there is the correct data on the data lines. (Pins 2-9)
4] Put the strobe high again after waiting approximately 5 microseconds after putting the strobe low. (Step 3)
This limits the speed at which the port can run at. The EPP & ECP ports get around this by letting the hardware check to see if the printer is busy and generate a strobe and /or appropriate handshaking. This means only one I/O instruction needs to be performed, thus increasing the speed. These ports can output at around 1-2 megabytes per second. The ECP port also has the advantage of using DMA channels and FIFO buffers; thus data can be shifted around without using I/O instructions.
Port Addresses The Parallel Port has three commonly used base addresses. These are listed in table 2, below. The 3BCh base address was originally introduced used for Parallel Ports on early Video Cards. This address then disappeared for a while, when Parallel Ports were later removed from Video Cards. They have now reappeared as an option for Parallel Ports integrated onto motherboards, upon which their configuration can be changed using BIOS.
LPT1 is normally assigned base address 378h, while LPT2 is assigned 278h. However this may not always be the case as explained later. 378h & 278h have always been commonly used for Parallel Ports. The lower case h denotes that it is in hexadecimal. These addresses may change from machine to machine.
When the computer is first turned on, BIOS (Basic input/output System) will determine the number of ports you have and assign device labels LPT1, LPT2 & LPT3 to them. BIOS first look at address 3BCh. If a Parallel Port is found here, it is assigned as LPT1, then it searches at location 378h. If a Parallel card is found there, it is assigned the next free device label. This would be LPT1 if a card wasn't found at 3BCh or LPT2 if a card was found at 3BCh. The last port of call is 278h and follows the same procedure than the other two ports. Therefore it is possible to have a LPT2 which is at 378h and not at the expected address 278h.
What can make this even confusing, is that some manufacturers of Parallel Port Cards, have jumpers who allow you to set your Port to LPT1, LPT2, LPT3. Now what address is LPT1? - On the majority of cards LPT1 is 378h, and LPT2, 278h, but some will use 3BCh as LPT1, 378h as LPT1 and 278h as LPT2. Life wasn't meant to be easy.
The assigned devices LPT1, LPT2 & LPT3 should not be a worry to people wishing to interface devices to their PC's. Most of the time the base address is used to interface the port rather than LPT1 etc. However should you want to find the address of LPT1 or any of the Line Printer Devices, you can use a lookup table provided by BIOS. When BIOS assigns addresses to your printer devices, it stores the address at specific locations in memory, so we can find them. CIRCUIT EXPLANATION The PCB contains eight identical switched relay positions; power input positions to the relays and a 25PIN D - connector to the parallel port of a PC. To keep the kit simple no input latches have been put on it. If your application is important then you should use UPS to keep the computer operating in the case of a mains power supply failure. If the board is accidentally disconnected from the parallel port then the 10K pulldown resistors will turn the Relay off. The diodes protect the transistors from the backemf which is occurs when the relay is turned off and its magnetic field collapses.
Solder the resistors into place first. Make sure to get the right ones in the right place. The components for the first relay position are given in the Components listing. Add the relays last. The relays are under direct control of the output byte (8 bits) from the parallel port. When a pin is high a nominal 5V is presented to the base resistor R1. Since there is a fixed 0.6V drop across the BE junction of Q1 there is 4.4V across R1 (5V - 0.6V). So by Ohms law 1.33 ma flows through the 5K6 resistor. There is also 0.6V across the 10K-pulldown resistor, which draws 0.06mA. If we assume a HFE of 100 for Q1 then 127mA flows through the CE leads of Q1 when it is turned on. Since the 12V relay turns on at around 30mA this current is more than enough to turn on the relay. The relay has a coil resistance of around 400 ohms and a coil power consumption of 30mW.
SOFTWARE EXPLANATION We have provided software with the kit, is a set of DOS-based utilities. If you have Some experience writing batch files then you can easily write a program to control the relay board. A sample test program is provided.
You can write your own programs in any language to output a byte to the printer port and the bits, which are high, will turn on the corresponding relay. The overlay on the PCB shows, which bit in the output byte, turns that particular relay on. For example, output 00010001 or 11 in hex turns on relays 1 & 5. Each relay number is also marked on the overlay for easy reference.
DOS-based Utilities. There are three utilities in the set: 1] RELAY outputs a hex byte to the designated parallel port
2] DELAY waits for a user-defined number of seconds.
3] WAITFOR waits until a specified time (HH: MM)
Batch files using these programs can be written to control the operation of any of the eight relays on the board. The programs were written using Borland Turbo C/C++ 3.0. The C source code & discretion is also provided with the kit.
|
Project Feedbacks
|
| Author: sophiya shaikh | Member Level: Bronze | Revenue Score:  | its cool. can u help me for this project
| | Author: srinivasulu kanaparthi | Member Level: Silver | Revenue Score:  | thank you very much. it is very use ful for so many like me.
|
|
|
| Post Feedback |
|
|
You must Sign In to post a feedback.
|
|
|
|
|
Advertise Here
Watch TV Channels
|