IrDA Receiver Circuit for PC Serial Port
The IrDA standard for infrared data communication is utilized by various devices, including Palm Pilots. However, many Desktop PCs lack an integrated IrDA interface. This straightforward circuit serves as a solution by transforming the PC serial port into an IrDA receiver.
Pulse Detection and Signal Formatting
To function effectively, the circuit must be able to detect and elongate the received infrared pulses, ensuring the output signal adheres to the standard serial data format. Operating at a speed of 9600 Baud, the circuit achieves this by employing only two NPN transistors and a phototransistor.
The 22-nF capacitor performs the job of lengthening the signals. It is important to ensure that the DTR signal is set to a high state on the serial port settings because this signal is used as the power supply to the circuit.
The sample program listed below is written in HotPaw Basic for the Palm and tests the interface by sending a short greeting followed by a sequence of integers.
#irdatx. bas open “com1:”,9600, ir as #5 print#5,” Hello” for n= 1 to 100 print#5,n a= fn wait(1) next n close #5 end
Understanding NPN Transistors
NPN transistors, a category of bipolar transistors, consist of three layers and are primarily utilized for signal amplification. Their operation is governed by current flow. The term NPN signifies Negative-Positive-Negative, indicating the transistor’s layer composition. In NPN transistors, electrons serve as the predominant charge carriers, resulting in high electron mobility rates. This characteristic grants NPN transistors superior conductivity in comparison to their PNP counterparts. Their rapid switching capabilities make NPN transistors particularly advantageous for applications involving swift transitions.
Emitter-to-Collector Electron Flow
NPN transistors are structured to facilitate the flow of electrons from the emitter to the collector, implying that conventional current moves from the collector to the emitter. In this arrangement, the emitter releases electrons, which are then controlled by the base, regulating the quantity of electrons emitted. Various NPN-type transistors, such as 2N3904, BC547, BC548, BC549, etc., can be employed in these basic circuits. Although these circuits are foundational, they can be enhanced, for instance, by incorporating diodes for reverse voltage protection or simplified by integrating XOR and XNOR gates. For starters, we will focus on these fundamental configurations.