INTRODUCTION
Can anybody imagine that this little wonder,
PIC12C509, be used to control a cordless mouse?
Incredible! Just a handful of components, that's all! In
fact the circuit is small enough and perfectly suitable to
be fitted in the mouse housing with batteries. Current
consumption is minimized by the power reducing
SLEEP mode of the chip.
The circuit consists of two parts. A transmitter, which is
enclosed in the mouse, and the receiver, connected to
the PC via RS 232 link.
APPLICATION OPERATION
Transmitter
The PIC12C509 forms the heart of the circuit. Thanks
to the PIC12C509, it's use greatly simplifies hardware
design and the software. It senses the mouse movements,
mouse buttons and transmits the information to
the PC through infra red light emitting diodes (IR
LED's). The internal oscillator of the PIC12C509
enables one to use all of the I/O pins. The power-on
reset feature of the PIC12C509 rules out any need for
external reset circuitry, thereby saving one precious I/O
pin. Out of six I/O pins, one pin is configured to be output,
while the rest of the five pins are used as inputs.
The output pin drives two IR LED's through a MOSFET
BS170. Note that the MOSFET and one IR LED can be
saved and current consumption reduced by driving the
IR LED directly through the PIC12C509 pin at the
expense of limiting the range.
Three input pins out of the five are interfaced to the
three mouse buttons. Of course, two mouse buttons
can be used if desired. Flexibility of the design is evident.
Thanks to the PIC12C509 again! The remaining
two input pins are movement sensing inputs. Optical
sensing is used, which consists of an opto coupler with
a toothed wheel in between the LED and the phototransistor.
There are two such wheels, one for horizontal
movement and another for the vertical movement.
The wheels are mechanically coupled to the mouse ball
so that they rotate and electrical pulses are generated
with mouse movement. PIC12C509 senses the pulses
and converts the information into the appropriate format,
to be transmitted to the receiver via IR LED's. The
information, in the form of pulses, is then fed to the IR
LED through the driving MOSFET BS170. Thus the
information gets transformed into infra red light which is
transmitted to the receiver. When the microcontroller
transmits the motion information it produces exactly the
same pulses as would be produced by a regular
mouse.
Receiver
This is also a very simple circuit consisting of an IR
receiver, SFH505A, for instance and an op-amp
CA3140. The IR receiver receives the IR pulses and
transfers them into equivalent electrical pulses. The opamp
acts as an amplifier cum lavel shifter so as to make
these pulses compatible to RS 232 voltage levels. Note
that no extra power supply is needed for the receiver
circuit as it derives the power from the serial port itself.
Since this arrangement appears as a regular mouse to
the PC, there is no need to write device driver, and the
mouse can be used with the existing driver. Just plug
and play!
Can anybody imagine that this little wonder,
PIC12C509, be used to control a cordless mouse?
Incredible! Just a handful of components, that's all! In
fact the circuit is small enough and perfectly suitable to
be fitted in the mouse housing with batteries. Current
consumption is minimized by the power reducing
SLEEP mode of the chip.
The circuit consists of two parts. A transmitter, which is
enclosed in the mouse, and the receiver, connected to
the PC via RS 232 link.
APPLICATION OPERATION
Transmitter
The PIC12C509 forms the heart of the circuit. Thanks
to the PIC12C509, it's use greatly simplifies hardware
design and the software. It senses the mouse movements,
mouse buttons and transmits the information to
the PC through infra red light emitting diodes (IR
LED's). The internal oscillator of the PIC12C509
enables one to use all of the I/O pins. The power-on
reset feature of the PIC12C509 rules out any need for
external reset circuitry, thereby saving one precious I/O
pin. Out of six I/O pins, one pin is configured to be output,
while the rest of the five pins are used as inputs.
The output pin drives two IR LED's through a MOSFET
BS170. Note that the MOSFET and one IR LED can be
saved and current consumption reduced by driving the
IR LED directly through the PIC12C509 pin at the
expense of limiting the range.
Three input pins out of the five are interfaced to the
three mouse buttons. Of course, two mouse buttons
can be used if desired. Flexibility of the design is evident.
Thanks to the PIC12C509 again! The remaining
two input pins are movement sensing inputs. Optical
sensing is used, which consists of an opto coupler with
a toothed wheel in between the LED and the phototransistor.
There are two such wheels, one for horizontal
movement and another for the vertical movement.
The wheels are mechanically coupled to the mouse ball
so that they rotate and electrical pulses are generated
with mouse movement. PIC12C509 senses the pulses
and converts the information into the appropriate format,
to be transmitted to the receiver via IR LED's. The
information, in the form of pulses, is then fed to the IR
LED through the driving MOSFET BS170. Thus the
information gets transformed into infra red light which is
transmitted to the receiver. When the microcontroller
transmits the motion information it produces exactly the
same pulses as would be produced by a regular
mouse.
Receiver
This is also a very simple circuit consisting of an IR
receiver, SFH505A, for instance and an op-amp
CA3140. The IR receiver receives the IR pulses and
transfers them into equivalent electrical pulses. The opamp
acts as an amplifier cum lavel shifter so as to make
these pulses compatible to RS 232 voltage levels. Note
that no extra power supply is needed for the receiver
circuit as it derives the power from the serial port itself.
Since this arrangement appears as a regular mouse to
the PC, there is no need to write device driver, and the
mouse can be used with the existing driver. Just plug
and play!
0 comments:
Post a Comment