From: eric p. <par...@ho...> - 2005-11-30 03:04:27
|
Just ran across this posting and it looks like this would be the solution to my problems. I am guessing that my laptop (IBM 600x) is not putting out a constant enough RS232 serial port voltage and that is the issue. Does anyone have the schematic that is mentioned in this post from 2002? Or a similar IR schematic that has been used with a laptop successfully? I have the parts for the advanced schematic mentioned on the lirc site but not sure that will work for me. Here is the post from Thomas Breuer: Hi everybody, here are some notes about the commonly used LIRC serial receiver and a suggestion for an improved but still very simple circuit. Caution ? technical stuff to follow ;-) Some people reported strange problems using the current circuit (http://www.lirc.org/receivers.html). This circuit relies on the fact that the threshold level of most modern RS232 line receivers is somewhere around +1...2 volts. Therefore, a simple asymmetric supply of 5 volts is sufficient and the usual RS232 signal levels of +5V...15V (Space) and ?5V...-15V (Mark) can be ignored (at least for a direct connection without long cables). But there is a problem related to the pullup resistor connected to the output of the IR receiver chip. The datasheets (I will only refer to the SFH5100-xx and the TSOP17xx here) specify external pullup resistors to be larger than 10k. This might be too small to pull up the signal as the line receivers have around 7k input impedance. Therefore, a 4k7 resistor is used. But this value is already critical (especially with the SFH5100) as now the internal output transistor may not pull the signal fully down anymore. Some RS232 receivers fail to read this as a valid low level so that it works on one PC while failing on another. Also, temporary failures may occur due to the influence of temperature and/or power load changes on the output and threshold levels. In other words: it may work, or it may not ;-) Another problem with this resistor is that a lot of power is wasted when the output of the IR chip goes low. This lowers the available output voltage swing. As mentioned above, the value of this resistor can not be increased as this would also lower the output voltage swing. So choosing the correct value is quite difficult and depends on the IR receiver chip and the RS232 line receiver of the connected PC. The following circuit suggestion eliminates this problem. It may even work with EIA-562 interfaces used in modern notebooks where the output voltage swing can be as low as +/- 3.7 volts. I couldn?t test this as my notebook doesn?t even have a serial interface :-( However, I simulated such a low voltage interface by reducing the supply voltage down to +/- 3.7 volts. The circuit was still working with an output swing of +/- 3 volts. The new circuit --------------- My suggestion for the improved circuit requires only three additional transistors. Here is a link: http://home.t-online.de/home/tb_electronic/vdr/lirc/lirc_rx.html The lirc_serial driver obviously sets RTS positive and DTR and TXD negative. So we can get a positive (as used in the standard circuit) and a negative supply. The circuit draws only about 1.5mA (SFH5110 used) out of these pins, causing only a slight voltage drop. Details: - Using a LP2950CZ5 instead of a normal 78L05 (pin-compatible). This draws only 0.1mA quiscent current and has less than 0.1V dropout voltage. - Using a Schottky diode (e.g. BAT46) for protecting the regulator. The voltage drop is only 0.2V at 1.5mA. BAT46 and LP2950 are available at http://www.reichelt.de - The voltage regulator is connected between RTS and DTR instead of GND. Therefore, even with only +/- 3.7 volts there is still enough input voltage. - A simple push-pull output stage (T2/T3) is added. This saves a lot of power (well, compared to the limited power available from the driver lines). This would otherwise be wasted in the pullup resistor, lowering the available supply voltage significantly. Now only R1 (100k) of the level shifter T1 adds 0.2mA quiescent current. Additional 1.4mA (@ +/-10V) will flow into the RS232 receiver input (usually around 7k input impedance). Notes: * The two capacitors at the input *and* output of the LP2950 regulator are mandatory (applies also to the 78L05). Without, voltage regulators will oscillate. * The labels with the voltage levels in the schematic are based on +/- 10 volts at RTS resp. DTR (with the circuit connected). * As T1 inverts the signal, the output of the receiver is active high. LIRC will autodetect this anyway. * For clarification, the internal output transistor and pullup resistor of the SFX5100-xx/TSOP17xx chip are shown in the schematic. * Anxious people may add a zener diode (27 volts) across C1 to protect the LP2950 (maximum 30 volts input) as the RS232 specs allow up to +/- 25 output level. However, no modern interface will exceed +/- 12 volts. With the suggested components the circuit should work under most conditions (please test it on notebooks with EIA-562 interfaces!). You may use a 78L05 instead of the LP2950 and a normal diode if the circuit is connected to a desktop PC. The output voltage swing will be reduced by 2 or 3 volts, but this is still more than enough. Hopefully, this suggestion is useful to some of the desperate LIRC users who couldn"t find any explanation for the strange reaction of their receivers. I myself encountered this problem when starting to build my VDR box. Meanwhile, I have developed a small IR Controller for this project (www.tb-electronic.de/vdr/ir_controller.html) where this is also fixed by using a simple level shifter. Thanks to all the LIRC developers for the great software! Thomas |