Most viewed

23 Nov 2011

Control electrical appliances using PC UPDATED



 Introduction

In this article I will first tell you about how to build the LED interface circuit for the Parallel Port and then how to control the circuit using software. With this very basic prototype you will be able to learn a lot how the parallel port works. So, I'll start with the circuit first.



                                              




Circuit Description

Components Used:-
Eight RED colored LEDs
DB-25 Male Connector
Zero PCB
Ribbon WireAll you need to do is to connect each data pin from the parallel port (pins 2 to 9) to positive terminal of a LED and one ground pin (any one from 18 to 25) to the negative terminal of all the LEDs.
Since LEDs have polarity, you should pay attention to correctly locate its positive and negative terminals. If you pay close attention, you will see that LEDs are not completely rounded, the cathode side is a little bit flat. Also the longer leg of LED is anode or positive terminal and the shorter leg is cathode or negative terminal.

                                          




How the circuit works?

Working of this circuit is pretty simple. When data at any pin 2 - 9 is '1' , that particular LED will glow, else if data is '0', the LED will stop glowing.

When data at any pin from 2 - 9 is '1',then it means that 5 volts is coming out of that pin and is going towards +ve terminal of LED. Circuit gets completed through ground pin (any from 18 to 25) and the LED glows until data at that particular pin is not '0'.

This data flow is controlled using software discussed below.

Software

To control any port we need a kernel mode driver software. Softwares generally run in USER mode. But to control theParallel Port we need a software running in kernel mode. I have used C#.Net for developing this software.
Download and install Microsoft .NET Framework Version 2.0.
Now download and install My Parallel Port Control Setup.
Download the source code in C#.Net.

In The End

This article was just an building block to the parallel port interfacing.
 

Based on your view




You have to try this

This is trending now #