TTL level RS232 signal into Sout and Sin of BS2p using TxIR Infrared IC
Archiver
Posts: 46,084
I am building a wireless infrared RS232 connection for the BS2p.
I am using TxIR IC (which is basically PIC12C508A programmed to
generate 40 KHz PWM)from Rentron (which generates a modulated, say,
40KHz, bit stream to drive an IRED. I use TSOP1140 IR receiver which
strips the 40KHz modulation and gives the data out directly but it is
active low. I use an inverter based on NPN or PNP transistor and give
the inverted output to the Sin pin of the BS2p.
So, basically what I have is a TTL level signals into the BS2p.
instead of -10 volt level for 1, I will have 0 volt and logic 0 will
be represented by a positive voltage, say 5 V.
But I noticed that the RS232 driver circuit onboard the BS2p has a
4.7K between the Sout and Sin pins. Basically, the inverter used to
get Sout pin is based on a PNP transistor inverter with the collector
connected to the 4.7K and to the Sout pin. The other end of the 4.7K
pin is connected to the Sin pin.
WHen the (BS2p)Sout is transmitting into the TxIR IC, I expect to get
a TTL level signal at 5 volt for 0 and it comes out alright. However,
instead of 0 volt for 1, I get some high voltage about 2 or 3 Volts
into the TxIR input, which means it treats it as a TTL high and does
not give out the expected bit stream. (I also observed the TSOP1140
receiver output is also loaded because of this and does not maintain
a high voltage even though no light is falling on it. Has anyone come
across this problem or shed some light on this.
Thanks a lot
I am using TxIR IC (which is basically PIC12C508A programmed to
generate 40 KHz PWM)from Rentron (which generates a modulated, say,
40KHz, bit stream to drive an IRED. I use TSOP1140 IR receiver which
strips the 40KHz modulation and gives the data out directly but it is
active low. I use an inverter based on NPN or PNP transistor and give
the inverted output to the Sin pin of the BS2p.
So, basically what I have is a TTL level signals into the BS2p.
instead of -10 volt level for 1, I will have 0 volt and logic 0 will
be represented by a positive voltage, say 5 V.
But I noticed that the RS232 driver circuit onboard the BS2p has a
4.7K between the Sout and Sin pins. Basically, the inverter used to
get Sout pin is based on a PNP transistor inverter with the collector
connected to the 4.7K and to the Sout pin. The other end of the 4.7K
pin is connected to the Sin pin.
WHen the (BS2p)Sout is transmitting into the TxIR IC, I expect to get
a TTL level signal at 5 volt for 0 and it comes out alright. However,
instead of 0 volt for 1, I get some high voltage about 2 or 3 Volts
into the TxIR input, which means it treats it as a TTL high and does
not give out the expected bit stream. (I also observed the TSOP1140
receiver output is also loaded because of this and does not maintain
a high voltage even though no light is falling on it. Has anyone come
across this problem or shed some light on this.
Thanks a lot
Comments
The Sin pin needs to be pulled down actively when it is not receiving
data. The collector of an NPN transistor should do that. It needs a
couple of pullup resistors added too:
4.7k (internal)
,--/\/\----Sout
pullup | 10k
10k ,--o--/\/\----Vdd <--pullup
Vdd--/\/\--; / `
Sin
| |/
TSOP1140 -o--| NPN or n-ch inverter
active |\
low `
Vss
Because of the internal 4.7k resistor connection between Sin and Sout
terminal, all characters received on Sin are echoed out Sout. That
is just the nature of the Stamp RS232 circuit. When the TSOP1140 is
high, the NPN inverter will be turned on and will provide a solid
pulldown for the internal 4.7k to Sout.
-- Tracy
>I am building a wireless infrared RS232 connection for the BS2p.
>I am using TxIR IC (which is basically PIC12C508A programmed to
>generate 40 KHz PWM)from Rentron (which generates a modulated, say,
>40KHz, bit stream to drive an IRED. I use TSOP1140 IR receiver which
>strips the 40KHz modulation and gives the data out directly but it is
>active low. I use an inverter based on NPN or PNP transistor and give
>the inverted output to the Sin pin of the BS2p.
>
>So, basically what I have is a TTL level signals into the BS2p.
>instead of -10 volt level for 1, I will have 0 volt and logic 0 will
>be represented by a positive voltage, say 5 V.
>
>But I noticed that the RS232 driver circuit onboard the BS2p has a
>4.7K between the Sout and Sin pins. Basically, the inverter used to
>get Sout pin is based on a PNP transistor inverter with the collector
>connected to the 4.7K and to the Sout pin. The other end of the 4.7K
>pin is connected to the Sin pin.
>
>WHen the (BS2p)Sout is transmitting into the TxIR IC, I expect to get
>a TTL level signal at 5 volt for 0 and it comes out alright. However,
>instead of 0 volt for 1, I get some high voltage about 2 or 3 Volts
>into the TxIR input, which means it treats it as a TTL high and does
>not give out the expected bit stream. (I also observed the TSOP1140
>receiver output is also loaded because of this and does not maintain
>a high voltage even though no light is falling on it. Has anyone come
>across this problem or shed some light on this.
>
>Thanks a lot
from the base of the NPN to Vdd. But the circuit you gave did not
work as it is. It loaded the TSOP1140 whose output is a NPN collector
with a 25K between the collector and Vdd. So I put a high impedance
about 82 K betweem the output of the TSOP1140 and the base of the NPN
used for inverting the active low output of TSOP1140 and it worked.
Thanks again for your suggestion. I appreciate it very much.
Mohammed
--- In basicstamps@yahoogroups.com, Tracy Allen <tracy@e...> wrote:
> Hi Mohammed,
>
> The Sin pin needs to be pulled down actively when it is not
receiving
> data. The collector of an NPN transistor should do that. It needs
a
> couple of pullup resistors added too:
>
> 4.7k (internal)
> ,--/\/\----Sout
> pullup | 10k
> 10k ,--o--/\/\----Vdd <--pullup
> Vdd--/\/\--; / `
Sin
> | |/
> TSOP1140 -o--| NPN or n-ch inverter
> active |\
> low `
Vss
>
>
> Because of the internal 4.7k resistor connection between Sin and
Sout
> terminal, all characters received on Sin are echoed out Sout. That
> is just the nature of the Stamp RS232 circuit. When the TSOP1140
is
> high, the NPN inverter will be turned on and will provide a solid
> pulldown for the internal 4.7k to Sout.
>
> -- Tracy
>
>
>
> >I am building a wireless infrared RS232 connection for the BS2p.
> >I am using TxIR IC (which is basically PIC12C508A programmed to
> >generate 40 KHz PWM)from Rentron (which generates a modulated, say,
> >40KHz, bit stream to drive an IRED. I use TSOP1140 IR receiver
which
> >strips the 40KHz modulation and gives the data out directly but it
is
> >active low. I use an inverter based on NPN or PNP transistor and
give
> >the inverted output to the Sin pin of the BS2p.
> >
> >So, basically what I have is a TTL level signals into the BS2p.
> >instead of -10 volt level for 1, I will have 0 volt and logic 0
will
> >be represented by a positive voltage, say 5 V.
> >
> >But I noticed that the RS232 driver circuit onboard the BS2p has a
> >4.7K between the Sout and Sin pins. Basically, the inverter used to
> >get Sout pin is based on a PNP transistor inverter with the
collector
> >connected to the 4.7K and to the Sout pin. The other end of the
4.7K
> >pin is connected to the Sin pin.
> >
> >WHen the (BS2p)Sout is transmitting into the TxIR IC, I expect to
get
> >a TTL level signal at 5 volt for 0 and it comes out alright.
However,
> >instead of 0 volt for 1, I get some high voltage about 2 or 3
Volts
> >into the TxIR input, which means it treats it as a TTL high and
does
> >not give out the expected bit stream. (I also observed the TSOP1140
> >receiver output is also loaded because of this and does not
maintain
> >a high voltage even though no light is falling on it. Has anyone
come
> >across this problem or shed some light on this.
> >
> >Thanks a lot
I got a problem. What I meant by working in my previous posting was
only when the stamp is transmitting. The circuit as explained before
(with a 10 K pullup between the base of the NPN and Vdd)made the
transistor ON all the time , meaning the Sin pin is held at 0 V all
the time and I had problem receiving data into the stamp, even when
the TSOP1140 was receiving bit stream and its output is going low.
Any thoughts?!!
Thanks
Mohammed
--- In basicstamps@yahoogroups.com, "mohammedrasiq"
<mohammedrasiq@y...> wrote:
> Thanks a lot Tracy. The circuit I tried did not have the 10K pullup
> from the base of the NPN to Vdd. But the circuit you gave did not
> work as it is. It loaded the TSOP1140 whose output is a NPN
collector
> with a 25K between the collector and Vdd. So I put a high impedance
> about 82 K betweem the output of the TSOP1140 and the base of the
NPN
> used for inverting the active low output of TSOP1140 and it worked.
>
> Thanks again for your suggestion. I appreciate it very much.
> Mohammed
>
> --- In basicstamps@yahoogroups.com, Tracy Allen <tracy@e...> wrote:
> > Hi Mohammed,
> >
> > The Sin pin needs to be pulled down actively when it is not
> receiving
> > data. The collector of an NPN transistor should do that. It
needs
> a
> > couple of pullup resistors added too:
> >
> > 4.7k (internal)
> > ,--/\/\----Sout
> > pullup | 10k
> > 10k ,--o--/\/\----Vdd <--pullup
> > Vdd--/\/\--; / `
Sin
> > | |/
> > TSOP1140 -o--| NPN or n-ch inverter
> > active |\
> > low `
Vss
> >
> >
> > Because of the internal 4.7k resistor connection between Sin and
> Sout
> > terminal, all characters received on Sin are echoed out Sout.
That
> > is just the nature of the Stamp RS232 circuit. When the TSOP1140
> is
> > high, the NPN inverter will be turned on and will provide a solid
> > pulldown for the internal 4.7k to Sout.
> >
> > -- Tracy
> >
> >
> >
> > >I am building a wireless infrared RS232 connection for the BS2p.
> > >I am using TxIR IC (which is basically PIC12C508A programmed to
> > >generate 40 KHz PWM)from Rentron (which generates a modulated,
say,
> > >40KHz, bit stream to drive an IRED. I use TSOP1140 IR receiver
> which
> > >strips the 40KHz modulation and gives the data out directly but
it
> is
> > >active low. I use an inverter based on NPN or PNP transistor and
> give
> > >the inverted output to the Sin pin of the BS2p.
> > >
> > >So, basically what I have is a TTL level signals into the BS2p.
> > >instead of -10 volt level for 1, I will have 0 volt and logic 0
> will
> > >be represented by a positive voltage, say 5 V.
> > >
> > >But I noticed that the RS232 driver circuit onboard the BS2p has
a
> > >4.7K between the Sout and Sin pins. Basically, the inverter used
to
> > >get Sout pin is based on a PNP transistor inverter with the
> collector
> > >connected to the 4.7K and to the Sout pin. The other end of the
> 4.7K
> > >pin is connected to the Sin pin.
> > >
> > >WHen the (BS2p)Sout is transmitting into the TxIR IC, I expect
to
> get
> > >a TTL level signal at 5 volt for 0 and it comes out alright.
> However,
> > >instead of 0 volt for 1, I get some high voltage about 2 or 3
> Volts
> > >into the TxIR input, which means it treats it as a TTL high and
> does
> > >not give out the expected bit stream. (I also observed the
TSOP1140
> > >receiver output is also loaded because of this and does not
> maintain
> > >a high voltage even though no light is falling on it. Has anyone
> come
> > >across this problem or shed some light on this.
> > >
> > >Thanks a lot
20kohm pullup to Vdd. The low level is <0.5 volt and the high level
is >4.8 volt.
Could you point me to a URL for the TSOP1140 data sheet?
If the TSOP1140 is not getting down to less than 0.6 volt when light
hits it, the inverter transistor will stay on and leave Sin low.
Have you measured that or looked at it on a 'scope? Maybe a second
resistor from the base to the emitter would help. I don't want to
say, without looking at the TSOP1140 data sheet.
-- Tracy
>Tracy:
>I got a problem. What I meant by working in my previous posting was
>only when the stamp is transmitting. The circuit as explained before
>(with a 10 K pullup between the base of the NPN and Vdd)made the
>transistor ON all the time , meaning the Sin pin is held at 0 V all
>the time and I had problem receiving data into the stamp, even when
>the TSOP1140 was receiving bit stream and its output is going low.
>
>Any thoughts?!!
>Thanks
>Mohammed
>
>--- In basicstamps@yahoogroups.com, "mohammedrasiq"
><mohammedrasiq@y...> wrote:
>> Thanks a lot Tracy. The circuit I tried did not have the 10K pullup
>> from the base of the NPN to Vdd. But the circuit you gave did not
>> work as it is. It loaded the TSOP1140 whose output is a NPN
>collector
>> with a 25K between the collector and Vdd. So I put a high impedance
>> about 82 K betweem the output of the TSOP1140 and the base of the
>NPN
>> used for inverting the active low output of TSOP1140 and it worked.
>>
>> Thanks again for your suggestion. I appreciate it very much.
>> Mohammed
>>
>> --- In basicstamps@yahoogroups.com, Tracy Allen <tracy@e...> wrote:
>> > Hi Mohammed,
>> >
>> > The Sin pin needs to be pulled down actively when it is not
>> receiving
>> > data. The collector of an NPN transistor should do that. It
>needs
>> a
>> > couple of pullup resistors added too:
>> >
>
> > > 4.7k (internal)
>> > ,--/\/\----Sout
>> > pullup | 10k
>> > 10k ,--o--/\/\----Vdd <--pullup
>> > Vdd--/\/\--; / `
Sin
>> > | |/
>> > TSOP1140 -o--| NPN or n-ch inverter
>> > active |\
>> > low `
Vss
> > >
>> >
>> > Because of the internal 4.7k resistor connection between Sin and
>> Sout
>> > terminal, all characters received on Sin are echoed out Sout.
>That
>> > is just the nature of the Stamp RS232 circuit. When the TSOP1140
>> is
>> > high, the NPN inverter will be turned on and will provide a solid
>> > pulldown for the internal 4.7k to Sout.
>> >
>> > -- Tracy
>> >
>> >
>> >
>> > >I am building a wireless infrared RS232 connection for the BS2p.
>> > >I am using TxIR IC (which is basically PIC12C508A programmed to
>> > >generate 40 KHz PWM)from Rentron (which generates a modulated,
>say,
>> > >40KHz, bit stream to drive an IRED. I use TSOP1140 IR receiver
>> which
>> > >strips the 40KHz modulation and gives the data out directly but
>it
>> is
>> > >active low. I use an inverter based on NPN or PNP transistor and
>> give
>> > >the inverted output to the Sin pin of the BS2p.
>> > >
>> > >So, basically what I have is a TTL level signals into the BS2p.
>> > >instead of -10 volt level for 1, I will have 0 volt and logic 0
>> will
>> > >be represented by a positive voltage, say 5 V.
>> > >
>> > >But I noticed that the RS232 driver circuit onboard the BS2p has
>a
>> > >4.7K between the Sout and Sin pins. Basically, the inverter used
>to
>> > >get Sout pin is based on a PNP transistor inverter with the
>> collector
>> > >connected to the 4.7K and to the Sout pin. The other end of the
>> 4.7K
>> > >pin is connected to the Sin pin.
>> > >
>> > >WHen the (BS2p)Sout is transmitting into the TxIR IC, I expect
>to
>> get
>> > >a TTL level signal at 5 volt for 0 and it comes out alright.
>> However,
>> > >instead of 0 volt for 1, I get some high voltage about 2 or 3
>> Volts
>> > >into the TxIR input, which means it treats it as a TTL high and
> > does
>> > >not give out the expected bit stream. (I also observed the
>TSOP1140
>> > >receiver output is also loaded because of this and does not
>> maintain
>> > >a high voltage even though no light is falling on it. Has anyone
>> come
>> > >across this problem or shed some light on this.
>> > >
>> > >Thanks a lot
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the
>Subject and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>The IR receiver I have used is the PNA4602, and it has a built-in
>20kohm pullup to Vdd. The low level is <0.5 volt and the high level
>is >4.8 volt.
>
>Could you point me to a URL for the TSOP1140 data sheet?
>
>If the TSOP1140 is not getting down to less than 0.6 volt when light
>hits it, the inverter transistor will stay on and leave Sin low.
>Have you measured that or looked at it on a 'scope? Maybe a second
>resistor from the base to the emitter would help. I don't want to
>say, without looking at the TSOP1140 data sheet.
>
> -- Tracy
Tracy -
The TSOP series of Vishay I/R receivers can be found here:
http://www.vishay.com/ir-receiver-modules/
Bruce
1. It holds the TSOP1140 output high during idle periods. [noparse][[/noparse]a must]
2. It holds the Stamps Sin pin low. [noparse][[/noparse]idle state for inverted, also a must]
Works great, and it's simple. I use this with the TX-IR & Scott Edwards serial
LCD backpacks. Instant wireless LCDs.
Send data from your Stamp to your wireless IR LCDs anywhere in the room.
Same circuit works for the Stamps Sin pin.
Note: The lower circuit section 2N3904, 10K, LED and 470 resistor are optional.
I use this for a visual indicator the LCD is receiving data.
If you still have problems, let me know.
Regards,
-Bruce
tech@r...
http://www.rentron.com
Original Message
From: "mohammedrasiq" <mohammedrasiq@y...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, June 20, 2003 11:17 AM
Subject: [noparse][[/noparse]basicstamps] TTL level RS232 signal into Sout and Sin of BS2p using
TxIR Infrared IC
> I am building a wireless infrared RS232 connection for the BS2p.
> I am using TxIR IC (which is basically PIC12C508A programmed to
> generate 40 KHz PWM)from Rentron (which generates a modulated, say,
> 40KHz, bit stream to drive an IRED. I use TSOP1140 IR receiver which
> strips the 40KHz modulation and gives the data out directly but it is
> active low. I use an inverter based on NPN or PNP transistor and give
> the inverted output to the Sin pin of the BS2p.
>
> So, basically what I have is a TTL level signals into the BS2p.
> instead of -10 volt level for 1, I will have 0 volt and logic 0 will
> be represented by a positive voltage, say 5 V.
>
> But I noticed that the RS232 driver circuit onboard the BS2p has a
> 4.7K between the Sout and Sin pins. Basically, the inverter used to
> get Sout pin is based on a PNP transistor inverter with the collector
> connected to the 4.7K and to the Sout pin. The other end of the 4.7K
> pin is connected to the Sin pin.
>
> WHen the (BS2p)Sout is transmitting into the TxIR IC, I expect to get
> a TTL level signal at 5 volt for 0 and it comes out alright. However,
> instead of 0 volt for 1, I get some high voltage about 2 or 3 Volts
> into the TxIR input, which means it treats it as a TTL high and does
> not give out the expected bit stream. (I also observed the TSOP1140
> receiver output is also loaded because of this and does not maintain
> a high voltage even though no light is falling on it. Has anyone come
> across this problem or shed some light on this.
>
> Thanks a lot
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
With this PNP based inverter, the stamp receives data alright.
However, when the stamp is not receiving data from the external PC's
COM port through the infrared link, the TSOP's output stays at high
leaving the PNP transistor open. One would expect the collector to
remain at 0 V, since the collector is grounded throught a 10K
resistor and the transistor is off.
However, the TxIR IC acts a 5V source with about 15K resistance, I
think. When the PNP inverter circuit connected to Sout pin inside the
BS2p is open and the NPN inverter circuit connected to the Sin pin
inside the BS2p is open, what we have is a 4.7K between Sout and Sin.
The 10K pullup resistor in your PNP inverter after the TSOP2140 is in
parallel with a 20 K (10K between Sin and the base of the NPN
transistor connected to Sin inside the stamp and the 10K between the
base and ground or emitter of the NPN connected to the Sin inside the
stamp). Thus, between the TxIR IC's pin 7 and ground there is a 4.7 K
followed by about (20K || 10K = 6.66K). This results in a voltage
drop of about 2.5 V at Sout and about 1V at Sin pin even when the
stamp is not receiving any data and the TSOP output is at high.
Because Sout remain about 2.5, the data cannot be properly
transmitted from Stamp through the TxIR IC.
On the other hand, the circuit using NPN transistor inverter at the
output of the TSOP2140 (which was initially described by Tracy and I
modified it slightly, introducing a series resistance between the
base of the NPN transistor and the output of TSOP2140), holds the Sin
pin at about 0 V, thus enabling proper tranmission from the stamp
through the TxIR IC. However, I noticed this circuit has problem
receiving data.
I have come to the conclusion, that the 4.7K resistor between Sout
and Sin is causing all this interaction and messing up things. Will
someone tell me if it is alright to ground the 4.7 K resistor between
the Sin and Sout pin inside the stamp rather than connecting it to
the Sin pin.
I did not notice any of these problems on the external PC's COM port
where I used the TSOP2140 followed by the PNP inverter described in
RENTRON's webpage(posted by Bruce) and I use the TxIR IC there with a
10 K resistor between the COM ports Tx and the pin 7 of TxIR as
described in the Rentron's schematic for a TxIR application.
Thanks a lot for your time and thoughts on this issue.
--- In basicstamps@yahoogroups.com, <tech@r...> wrote:
> Try this circuit: http://www.rentron.com/Files/Snap1.gif
>
> 1. It holds the TSOP1140 output high during idle periods. [noparse][[/noparse]a must]
> 2. It holds the Stamps Sin pin low. [noparse][[/noparse]idle state for inverted, also
a must]
>
> Works great, and it's simple. I use this with the TX-IR & Scott
Edwards serial
> LCD backpacks. Instant wireless LCDs.
>
> Send data from your Stamp to your wireless IR LCDs anywhere in the
room.
> Same circuit works for the Stamps Sin pin.
>
> Note: The lower circuit section 2N3904, 10K, LED and 470 resistor
are optional.
> I use this for a visual indicator the LCD is receiving data.
>
> If you still have problems, let me know.
>
> Regards,
>
> -Bruce
> tech@r...
> http://www.rentron.com
>
>
>
>
>
>
Original Message
> From: "mohammedrasiq" <mohammedrasiq@y...>
> To: <basicstamps@yahoogroups.com>
> Sent: Friday, June 20, 2003 11:17 AM
> Subject: [noparse][[/noparse]basicstamps] TTL level RS232 signal into Sout and Sin of
BS2p using TxIR Infrared IC
>
>
> > I am building a wireless infrared RS232 connection for the BS2p.
> > I am using TxIR IC (which is basically PIC12C508A programmed to
> > generate 40 KHz PWM)from Rentron (which generates a modulated,
say,
> > 40KHz, bit stream to drive an IRED. I use TSOP1140 IR receiver
which
> > strips the 40KHz modulation and gives the data out directly but
it is
> > active low. I use an inverter based on NPN or PNP transistor and
give
> > the inverted output to the Sin pin of the BS2p.
> >
> > So, basically what I have is a TTL level signals into the BS2p.
> > instead of -10 volt level for 1, I will have 0 volt and logic 0
will
> > be represented by a positive voltage, say 5 V.
> >
> > But I noticed that the RS232 driver circuit onboard the BS2p has
a
> > 4.7K between the Sout and Sin pins. Basically, the inverter used
to
> > get Sout pin is based on a PNP transistor inverter with the
collector
> > connected to the 4.7K and to the Sout pin. The other end of the
4.7K
> > pin is connected to the Sin pin.
> >
> > WHen the (BS2p)Sout is transmitting into the TxIR IC, I expect to
get
> > a TTL level signal at 5 volt for 0 and it comes out alright.
However,
> > instead of 0 volt for 1, I get some high voltage about 2 or 3
Volts
> > into the TxIR input, which means it treats it as a TTL high and
does
> > not give out the expected bit stream. (I also observed the
TSOP1140
> > receiver output is also loaded because of this and does not
maintain
> > a high voltage even though no light is falling on it. Has anyone
come
> > across this problem or shed some light on this.
> >
> > Thanks a lot
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the
Subject and Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
What chip number is that? I can't understand why it would have a
15k pullup. Usually Tx chips have a high impedance input. That is a
problem, because the 15k forms a voltage divider with the 4.7k in the
Stamp from Sout to Sin, so Sout could only swing from +5 down to 1.25
volts, not all the way to Vss. You may need a buffer between the
Sout pin and your TxIR chip. That could be as simple as a diode or
emitter follower, to keep current from the 15k from flowing into the
stamp, but that depends on how the TxIR chip input is set up
internally.
I don't understand your result. It seems to me that the stamp would
have trouble transmitting, but not with receiving (with the NPN
inverter circuit). That is the opposite of what you stated??!!
The TSOP2140 does have its own built-in 25kohm pullup resistor, so
the base of the NPN inverter circuit should not need an additional
pullup resistor. I don't understand why you needed to put the 82k
in the between the TSOP2140 and the base. The low level output of
the TSOP2140 is speced less than 0.25 volt, which should turn off the
NPN quite well. If, not, the extra resistor of, say, 24 kohms ,
should go in parallel from the base to Vss, not in series between the
TSOP output and the base.
-- Tracy
>Infact this is the first circuit I tried. (Found it in your webpage).
>With this PNP based inverter, the stamp receives data alright.
>However, when the stamp is not receiving data from the external PC's
>COM port through the infrared link, the TSOP's output stays at high
>leaving the PNP transistor open. One would expect the collector to
>remain at 0 V, since the collector is grounded throught a 10K
>resistor and the transistor is off.
>
>However, the TxIR IC acts a 5V source with about 15K resistance, I
>think. When the PNP inverter circuit connected to Sout pin inside the
>BS2p is open and the NPN inverter circuit connected to the Sin pin
>inside the BS2p is open, what we have is a 4.7K between Sout and Sin.
>The 10K pullup resistor in your PNP inverter after the TSOP2140 is in
>parallel with a 20 K (10K between Sin and the base of the NPN
>transistor connected to Sin inside the stamp and the 10K between the
>base and ground or emitter of the NPN connected to the Sin inside the
>stamp). Thus, between the TxIR IC's pin 7 and ground there is a 4.7 K
>followed by about (20K || 10K = 6.66K). This results in a voltage
>drop of about 2.5 V at Sout and about 1V at Sin pin even when the
>stamp is not receiving any data and the TSOP output is at high.
>
>Because Sout remain about 2.5, the data cannot be properly
>transmitted from Stamp through the TxIR IC.
>
>
>On the other hand, the circuit using NPN transistor inverter at the
>output of the TSOP2140 (which was initially described by Tracy and I
>modified it slightly, introducing a series resistance between the
>base of the NPN transistor and the output of TSOP2140), holds the Sin
>pin at about 0 V, thus enabling proper tranmission from the stamp
>through the TxIR IC. However, I noticed this circuit has problem
>receiving data.
>
>
>
>I have come to the conclusion, that the 4.7K resistor between Sout
>and Sin is causing all this interaction and messing up things. Will
>someone tell me if it is alright to ground the 4.7 K resistor between
>the Sin and Sout pin inside the stamp rather than connecting it to
>the Sin pin.
>
>
>
>I did not notice any of these problems on the external PC's COM port
>where I used the TSOP2140 followed by the PNP inverter described in
>RENTRON's webpage(posted by Bruce) and I use the TxIR IC there with a
>10 K resistor between the COM ports Tx and the pin 7 of TxIR as
>described in the Rentron's schematic for a TxIR application.
>
>Thanks a lot for your time and thoughts on this issue.
>
First of all, I appreciate very much your thoughtful comments and my
sincere thanks to you.
(i) I did mention about the TxIR IC in my very first post on this
topic. (I am cutting and pasting it below)
>I am building a wireless infrared RS232 connection for the BS2p.
>I am using TxIR IC (which is basically PIC12C508A programmed to
>generate 40 KHz PWM)from Rentron (which generates a modulated, say,
>40KHz, bit stream to drive an IRED.
Here is the link for TxIR IC
http://www.rentron.com/remote_control/TX-IR.htm
(ii) The use of a NPN based inverter at the output of TSOP2140 as you
suggested results in connecting base of the NPN to the output of the
TSOP (which is the collector of a NPN inside the TSOP2140). During
idle state, TSOP2140 goes to high but connecting it directly to the
NPN brings the output of TSOP2140 to 0.7 V. I think this results in
somewhat unpredictable behaviour by the TSOP2140. THe manufacturer
specifies that the output of TSOP2140 should not be held below 3.3 V
continously. That is why I thought I will introduce a 82K between the
base of the external NPN and the output of the TSOP2140 so that I can
maintain about 4 V at the output of the TSOP2140 while still driving
the NPN on and getting a low at the Sin pin.
This helps in keeping the output of the NPN inverter (connected
directly to the Sin pin of BS2p) at low during idle state. (i.e.
TSOP2140 is not receiving any data stream). THis helps in maintaining
a voltage of about 1 V at Sout (due to the TxIR IC) and the Sout pin
transmits properly with a lowlevel at 1V and high level at 5 V, which
is interpreted correctly by the TxIR IC to drive the IRED.
However, even during receiving, the NPN transistor at the output of
the TSOP2140 is still switched on because of the 10K resistor between
the base of transistor and Vdd, thus not allowing to receive data
properly. (because of the presence of the 82K resistor I put in
between the base and the output of TSOP2140).As I said, not having
this resistor pulled down the output of TSOP2140 to 0.7V even when
the TSOP is idle, which is not recommended and did not work properly
either.
I understand from the Parallax Tech support guys that I cannot ground
the 4.7K resistor and still be able to program the stamp. I am hoping
using a buffer between the Sout and the TxIR would solve the problem.
Thanks again. I will keep you posted of the results.
-Mohammed
--- In basicstamps@yahoogroups.com, Tracy Allen <tracy@e...> wrote:
> You had not mentioned the additional TxIR chip in your previous
post.
> What chip number is that? I can't understand why it would have a
> 15k pullup. Usually Tx chips have a high impedance input. That is
a
> problem, because the 15k forms a voltage divider with the 4.7k in
the
> Stamp from Sout to Sin, so Sout could only swing from +5 down to
1.25
> volts, not all the way to Vss. You may need a buffer between the
> Sout pin and your TxIR chip. That could be as simple as a diode or
> emitter follower, to keep current from the 15k from flowing into
the
> stamp, but that depends on how the TxIR chip input is set up
> internally.
>
> I don't understand your result. It seems to me that the stamp
would
> have trouble transmitting, but not with receiving (with the NPN
> inverter circuit). That is the opposite of what you stated??!!
>
> The TSOP2140 does have its own built-in 25kohm pullup resistor, so
> the base of the NPN inverter circuit should not need an additional
> pullup resistor. I don't understand why you needed to put the 82k
> in the between the TSOP2140 and the base. The low level output of
> the TSOP2140 is speced less than 0.25 volt, which should turn off
the
> NPN quite well. If, not, the extra resistor of, say, 24 kohms ,
> should go in parallel from the base to Vss, not in series between
the
> TSOP output and the base.
>
> -- Tracy
>
>
>
>
> >Infact this is the first circuit I tried. (Found it in your
webpage).
> >With this PNP based inverter, the stamp receives data alright.
> >However, when the stamp is not receiving data from the external
PC's
> >COM port through the infrared link, the TSOP's output stays at high
> >leaving the PNP transistor open. One would expect the collector to
> >remain at 0 V, since the collector is grounded throught a 10K
> >resistor and the transistor is off.
> >
> >However, the TxIR IC acts a 5V source with about 15K resistance, I
> >think. When the PNP inverter circuit connected to Sout pin inside
the
> >BS2p is open and the NPN inverter circuit connected to the Sin pin
> >inside the BS2p is open, what we have is a 4.7K between Sout and
Sin.
> >The 10K pullup resistor in your PNP inverter after the TSOP2140 is
in
> >parallel with a 20 K (10K between Sin and the base of the NPN
> >transistor connected to Sin inside the stamp and the 10K between
the
> >base and ground or emitter of the NPN connected to the Sin inside
the
> >stamp). Thus, between the TxIR IC's pin 7 and ground there is a
4.7 K
> >followed by about (20K || 10K = 6.66K). This results in a voltage
> >drop of about 2.5 V at Sout and about 1V at Sin pin even when the
> >stamp is not receiving any data and the TSOP output is at high.
> >
> >Because Sout remain about 2.5, the data cannot be properly
> >transmitted from Stamp through the TxIR IC.
> >
> >
> >On the other hand, the circuit using NPN transistor inverter at the
> >output of the TSOP2140 (which was initially described by Tracy and
I
> >modified it slightly, introducing a series resistance between the
> >base of the NPN transistor and the output of TSOP2140), holds the
Sin
> >pin at about 0 V, thus enabling proper tranmission from the stamp
> >through the TxIR IC. However, I noticed this circuit has problem
> >receiving data.
> >
> >
> >
> >I have come to the conclusion, that the 4.7K resistor between Sout
> >and Sin is causing all this interaction and messing up things. Will
> >someone tell me if it is alright to ground the 4.7 K resistor
between
> >the Sin and Sout pin inside the stamp rather than connecting it to
> >the Sin pin.
> >
> >
> >
> >I did not notice any of these problems on the external PC's COM
port
> >where I used the TSOP2140 followed by the PNP inverter described in
> >RENTRON's webpage(posted by Bruce) and I use the TxIR IC there
with a
> >10 K resistor between the COM ports Tx and the pin 7 of TxIR as
> >described in the Rentron's schematic for a TxIR application.
> >
> >Thanks a lot for your time and thoughts on this issue.
> >
Sorry, I lost track of the beginning of the thread where you
mentioned the TxIR.
Okay, I'd say to leave out the 10k pullup resistor, you don't need it
because of the 25k pullup built in to the TSOP2140.
4.7k (internal to Stamp)
,--/\/\----Sout
|
| 10k
,--o--/\/\----Vdd <--pullup
/ `
Sin
82k |/
TSOP1140 --/\/\--| NPN or **n-ch inverter**
active low |\
*
Vss
(has 25k pullup to +5)
If you want to avoid the loading problem entirely, substitute an
n-channel mosfet for the NPN transistor. (Use a logic threshold
mosfet, source to Vss.) Or you could use a CMOS inverter chip, such
as the CD4069, instead of the transistor.
I still don't understand why the TxIR chip acts as if it has a pullup
of ~15k to Vdd. As far as I can tell it is simply a logic input to
the Rentron PIC16C508, which should be a very high impedance. Is it
running from the same Vdd power supply as the Stamp?
-- Tracy
>Tracy,
>First of all, I appreciate very much your thoughtful comments and my
>sincere thanks to you.
>
>(i) I did mention about the TxIR IC in my very first post on this
>topic. (I am cutting and pasting it below)
> >I am building a wireless infrared RS232 connection for the BS2p.
> >I am using TxIR IC (which is basically PIC12C508A programmed to
> >generate 40 KHz PWM)from Rentron (which generates a modulated, say,
> >40KHz, bit stream to drive an IRED.
>
>Here is the link for TxIR IC
>http://www.rentron.com/remote_control/TX-IR.htm
>
>(ii) The use of a NPN based inverter at the output of TSOP2140 as you
>suggested results in connecting base of the NPN to the output of the
>TSOP (which is the collector of a NPN inside the TSOP2140). During
>idle state, TSOP2140 goes to high but connecting it directly to the
>NPN brings the output of TSOP2140 to 0.7 V. I think this results in
>somewhat unpredictable behaviour by the TSOP2140. THe manufacturer
>specifies that the output of TSOP2140 should not be held below 3.3 V
>continously. That is why I thought I will introduce a 82K between the
>base of the external NPN and the output of the TSOP2140 so that I can
>maintain about 4 V at the output of the TSOP2140 while still driving
>the NPN on and getting a low at the Sin pin.
>
>This helps in keeping the output of the NPN inverter (connected
>directly to the Sin pin of BS2p) at low during idle state. (i.e.
>TSOP2140 is not receiving any data stream). THis helps in maintaining
>a voltage of about 1 V at Sout (due to the TxIR IC) and the Sout pin
>transmits properly with a lowlevel at 1V and high level at 5 V, which
>is interpreted correctly by the TxIR IC to drive the IRED.
>
>However, even during receiving, the NPN transistor at the output of
>the TSOP2140 is still switched on because of the 10K resistor between
>the base of transistor and Vdd, thus not allowing to receive data
>properly. (because of the presence of the 82K resistor I put in
>between the base and the output of TSOP2140).As I said, not having
>this resistor pulled down the output of TSOP2140 to 0.7V even when
>the TSOP is idle, which is not recommended and did not work properly
>either.
>
>I understand from the Parallax Tech support guys that I cannot ground
>the 4.7K resistor and still be able to program the stamp. I am hoping
>using a buffer between the Sout and the TxIR would solve the problem.
>
>Thanks again. I will keep you posted of the results.
>
>-Mohammed
>of ~15k to Vdd. As far as I can tell it is simply a logic input to
>the Rentron PIC16C508, which should be a very high impedance. Is it
>running from the same Vdd power supply as the Stamp?
I bet the PIC16C508 is programmed with the weak pullup enabled. That
would explain this result. Looking at the TxIR data sheet, the
schematic for the "remote momentary relay controller" shows a
pushbutton connected directly from Din to common, and that would
only work only if the internal pullup is enabled.
I guess you got it working with a transition from 1 to 5 volts. If
that is marginal, you could include buffer between Sout and the TxIR.
-- Traccy
switch operation, but this isn't normally a problem with a connection to
a standard Stamp output pin.
If the internal pull-up causes problems due to an external input you have
no control over, i.e., the Sin/Sout configuration, we could provide you with
a version that has the internal pull-up option turned OFF, but you'll still
need to deal with the parallel 4.7K resistor on the Stamps Sin/Sout pins,
and make sure none of the TX-IR inputs are floating if you have power applied.
Regards,
-Bruce
tech@r...
http://www.rentron.com
Original Message
From: "Tracy Allen" <tracy@e...>
To: <basicstamps@yahoogroups.com>
Sent: Wednesday, June 25, 2003 8:51 AM
Subject: [noparse][[/noparse]basicstamps] Re: TTL level RS232 signal into Sout and Sin of BS2p
using TxIR Infrared IC
> >I still don't understand why the TxIR chip acts as if it has a pullup
> >of ~15k to Vdd. As far as I can tell it is simply a logic input to
> >the Rentron PIC16C508, which should be a very high impedance. Is it
> >running from the same Vdd power supply as the Stamp?
>
> I bet the PIC16C508 is programmed with the weak pullup enabled. That
> would explain this result. Looking at the TxIR data sheet, the
> schematic for the "remote momentary relay controller" shows a
> pushbutton connected directly from Din to common, and that would
> only work only if the internal pullup is enabled.
>
> I guess you got it working with a transition from 1 to 5 volts. If
> that is marginal, you could include buffer between Sout and the TxIR.
>
> -- Traccy
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Bruce, I will contact you off the forum to get the TxIR IC with the
internal pullup turned off. The inverter circuits off the TSOP2140
and the TxIR IC work without any problem when used with any of the
I/O pins of hte stamp but not with the Sout and Sin.
Following Tracy's idea and my own thought on using a buffer between
the Sout and the TxIR pin works. I basically used a diode with a 1K
to ground from the cathode (or the input to the TxIR).
I actually later noticed that even without the diode, just a 1K
resistor across the Sout (input to TxIR) and the ground works.
However, there are problem with programming. THe first problem is the
programming is done default at 9600 baud which the TSOP2140 cannot
handle. So I decided to hard wire using 4 plain wires (one each for
Tx,Rx,DTR,GND)(bypassing the IR link) for just programming.
However, this does not work due to the presence of the 1K resistor
between the Sout and the Ground and on the Basic Stamp side includes
the infrared transceiver circuitry which cannot be disconnected. Then
I figured, if use a 1K or less resistance between the Sout and Sin
(in parallel with the internal 4.7K), programming also works, (even
with the TxIR and TSOP2140 and their associated circuit present and
powered in circuit).
This basically solved my problem. However, I still plan to get the
TxIR IC without the pullup and try again to see if it works without
the additional resistance between Sout and Gnd. Thanks Tracy and
Bruce for your all your suggestions and comments.
Mohammed
--- In basicstamps@yahoogroups.com, Tech <tech@r...> wrote:
> The TX-IR does have the internal pull-up option enabled for push-
button
> switch operation, but this isn't normally a problem with a
connection to
> a standard Stamp output pin.
>
> If the internal pull-up causes problems due to an external input
you have
> no control over, i.e., the Sin/Sout configuration, we could provide
you with
> a version that has the internal pull-up option turned OFF, but
you'll still
> need to deal with the parallel 4.7K resistor on the Stamps Sin/Sout
pins,
> and make sure none of the TX-IR inputs are floating if you have
power applied.
>
> Regards,
>
> -Bruce
> tech@r...
> http://www.rentron.com
>
>
>
Original Message
> From: "Tracy Allen" <tracy@e...>
> To: <basicstamps@yahoogroups.com>
> Sent: Wednesday, June 25, 2003 8:51 AM
> Subject: [noparse][[/noparse]basicstamps] Re: TTL level RS232 signal into Sout and Sin
of BS2p using TxIR Infrared IC
>
>
> > >I still don't understand why the TxIR chip acts as if it has a
pullup
> > >of ~15k to Vdd. As far as I can tell it is simply a logic input
to
> > >the Rentron PIC16C508, which should be a very high impedance. Is
it
> > >running from the same Vdd power supply as the Stamp?
> >
> > I bet the PIC16C508 is programmed with the weak pullup enabled.
That
> > would explain this result. Looking at the TxIR data sheet, the
> > schematic for the "remote momentary relay controller" shows a
> > pushbutton connected directly from Din to common, and that
would
> > only work only if the internal pullup is enabled.
> >
> > I guess you got it working with a transition from 1 to 5 volts.
If
> > that is marginal, you could include buffer between Sout and the
TxIR.
> >
> > -- Traccy
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the
Subject and Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >