This document describes a project to control electrical appliances from a PC using a microcontroller. A mouse is used to control relays connected to appliances via the microcontroller. The microcontroller communicates with the PC over RS-232 using a MAX232 level shifter. The project allows centralized control of appliances like stage lighting from a PC. It could be improved with a GUI control panel and intensity control.
2. http://www.edgefxkits.com/
PC Mouse operated Electrical Load
Control Using VB Application
Introduction
The aim of this project is to control electrical appliances through a
personal computer (PC). For example, theatre lighting can be centrally
controlled form PC for a better stage management. Presently, these are
manually managed which makes it difficult to coordinate the lighting
with respective scene. With this system, one can control electrical
appliances on/off by just being seated at one place using a PC.
6. http://www.edgefxkits.com/
8051 Series Microcontroller
8051 is an 8-bit family of microcontroller developed by Intel in the year
1981.
This is one of the most popular family of microcontroller being used all
across the world.
PC Mouse operated Electrical Load
Control Using VB Application
7. 8051 Series Microcontroller
PC Mouse operated Electrical Load
Control Using VB Application
This microcontroller was also referred as “system on a chip” because it has
128 bytes of RAM, 4Kbytes of ROM, 2 Timers, 1 Serial port, and four ports
on a single chip.
The CPU can work for only 8bits of data at a time because 8051 is an 8-bit
processor.
http://www.edgefxkits.com/
8. http://www.edgefxkits.com/
8051 Series Microcontroller
In case the data is larger than 8 bits then it has to be broken into parts so
that the CPU can process conveniently.
Most manufacturers have put 4Kbytes of ROM even though the quantity
of ROM can be exceeded up to 64 K bytes.
The 8051 has been in use in a wide number of devices, mainly because it
is easy to integrate into a project or build a device around.
PC Mouse operated Electrical Load
Control Using VB Application
10. Power on Reset circuit
The power-on reset (PoR) is an electronic device incorporated into the
integrated circuit
That detects the power applied to the chip and generates a reset impulse
that goes to the entire circuit placing it into a known state.
PC Mouse operated Electrical Load
Control Using VB Application
+5V
30 pF
30 pF
8.2 K
10 uF
+
11.0592 MHz
EA/VPP
X1
X2
RST
31
19
18
9
http://www.edgefxkits.com/
11. http://www.edgefxkits.com/
Max232
The MAX232 is an integrated circuit that converts signals from an RS-
232serial port to signals suitable for use in TTL compatible digital logic
circuits.
The MAX232 is a dual driver/receiver and typically converts the RX, TX,
CTS and RTS signals.
When a MAX232 IC receives a TTL level to convert, it changes a TTL Logic 0
to between +3 and +15V, and changes TTL Logic 1 to between -3 to -15V,
and vice versa for converting from RS232 to TTL.
PC Mouse operated Electrical Load
Control Using VB Application
13. http://www.edgefxkits.com/
DB Connector
A DB connector is a connector that is in the shape of a horizontal D.
Common DB connectors include DB-9, DB-15, DB-19, DB-25, DB-37, and
DB-50, the number indicates how many active lines the connector has, but
not always how many pins it has.
PC Mouse operated Electrical Load
Control Using VB Application
14. http://www.edgefxkits.com/
DB9 and DB15 Connector
The DB9 (originally DE-9) connector is an analog 9-pin plug of the D-Sub
miniature connector family.
PC Mouse operated Electrical Load
Control Using VB Application
15. http://www.edgefxkits.com/
DB9 and DB15 Connector
Computer serial port Additional information and help with the DB-9 and
DB-15 or the standard PC serial port can be found on our serial port help
page.
The DB-9 and DB-15 are also found on Network cards. The DB-9 cable is
sometimes used for Token-Ring adapters, and the DB-15 is used for the
thick net coaxial cables.
Computer network help and support
The DB-9 port is also found on the NeXT computer is used to connect laser
printers.
PC Mouse operated Electrical Load
Control Using VB Application
16. http://www.edgefxkits.com/
DB19 Connector
The DB-19 is a connector found on the Apple Macintosh, NeXT, and some
Atari computers, and is used to connect external disk drives.
PC Mouse operated Electrical Load
Control Using VB Application
17. http://www.edgefxkits.com/
DB25 Connector
The DB-25 interface was an older serial connector. Additional information
and help with serial ports can be found on our serial port help page.
The DB-25 port is also a SCSI interface. Additional information and help
with SCSI can be found on our SCSI help page.
PC Mouse operated Electrical Load
Control Using VB Application
18. http://www.edgefxkits.com/
DB37 Connector
Connector found on various network devices used to connect network
hubs and other network devices and perform other functions.
Companies that utilize this cable include Cisco, Nortel, SMC, and others.
The DB-37 connector also connects devices such as sensors, switches,
satellite antennas, control systems, video studio automation, security
control systems, and other equipment.
Computer network and network card help and support.
PC Mouse operated Electrical Load
Control Using VB Application
19. http://www.edgefxkits.com/
DB50 Connector
SCSI connector that is rarely used or found today. Additional information
and help with SCSI can be found on our SCSI help page.
PC Mouse operated Electrical Load
Control Using VB Application
DB-50 Male Connector :
20. Relay
A relay is an electrically operated switch.
Current flowing through the coil of the relay creates a magnetic field
which attracts a lever and changes the switch contacts.
The coil current can be on or off so relays have two switch positions and
have double throw (changeover) switch contacts as shown in the diagram.
PC Mouse operated Electrical Load
Control Using VB Application
http://www.edgefxkits.com/
21. Relay
Relays allow one circuit to switch a second circuit which can be completely
separate from the first.
For example a low voltage battery circuit can use a relay to switch a 230V
AC mains circuit.
There is no electrical connection inside the relay between the two circuits,
the link is magnetic and mechanical.
To drive relay through MC ULN2003 relay driver IC is used
PC Mouse operated Electrical Load
Control Using VB Application
http://www.edgefxkits.com/
22. Relay Driver uln2003
ULN is Relay driver application
The ULN2003 is a monolithic high voltage and high current Darlington
transistor arrays.
PC Mouse operated Electrical Load
Control Using VB Application
http://www.edgefxkits.com/
23. Relay Driver uln2003
It consists of seven NPN Darlington pairs that features high-voltage
outputs with common-cathode clamp diode for switching inductive loads.
The collector-current rating of a single Darlington pair is 500mA.
The Darlington pairs may be paralleled for higher current capability.
PC Mouse operated Electrical Load
Control Using VB Application
http://www.edgefxkits.com/
24. Relay Driver uln2003
The ULN functions as an inverter.
If the logic at input 1B is high then
the output at its corresponding pin 1C
will be low.
PC Mouse operated Electrical Load
Control Using VB Application
http://www.edgefxkits.com/
25. http://www.edgefxkits.com/
Liquid Crystal Display (LCD)
Most common LCDs connected to the microcontrollers are 16x2 and 20x2
displays.
This means 16 characters per line by 2 lines and 20 characters per line by 2
lines, respectively.
The standard is referred to as HD44780U
It refers to the controller chip which receives data from an external source
(and communicates directly with the LCD.
PC Mouse operated Electrical Load
Control Using VB Application
26. http://www.edgefxkits.com/
Working Principle
The project uses a PC to control the loads.
The commands are received by the micro controller through level shifted IC
Max232.
When the program is executed, it drives relay from the microcontroller
through relay driver IC ULN2003.
Load’s are switched ON and switched OFF based on the corresponding
command sent from the keyboard through HyperTerminal.
As per the program, the loads will be turned ON and OFF through the
relays.
PC Mouse operated Electrical Load
Control Using VB Application
27. http://www.edgefxkits.com/
Working Principle
This system is integrated with the electrical loads and also connected to the
PC where centralized control takes place.
It uses an RS-232 protocol from the microcontroller to communicate with
the PC.
To turn on/off the appliances, we use Hyper Terminal on PC.
Once the connection is established with the PC, then the system starts
working.
The microcontroller used in this project belongs to 8051 family.
PC Mouse operated Electrical Load
Control Using VB Application
28. http://www.edgefxkits.com/
Future Enhancement
This project can be further enhanced by implementing a GUI based control
panel on the PC with appropriate embedded software.
The intensity control can also be incorporated using power electronics
devices.
PC Mouse operated Electrical Load
Control Using VB Application
29. http://www.edgefxkits.com/
Conclusion
PC Mouse operated Electrical Load
Control Using VB Application
PC Mouse operated Electrical Load Control Using VB Application project
was designed and implemented. This project can be further enhanced by
implementing a GUI based control panel on the PC with appropriate
embedded software. The intensity control can also be incorporated using
power electronics devices