Searching \ for 'Isolated serial to RB0 interrupt...' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/ints.htm?key=interrupt
Search entire site for: 'Isolated serial to RB0 interrupt...'.

Truncated match.
PICList Thread
'Isolated serial to RB0 interrupt...'
2000\04\03@223537 by Jeffrey Siegel

flavicon
face
I'm having this difficult problem that is beyond my abilities.  I'm hoping
someone has a creative direction to set me on to figure out how to do
this...

I have a battery-powered device with a 3-wire RS232 serial connection that
must be isolated (optoisolators).  I've tied the serial input to the
appropriate PIC USART pin and also to RB0.  The PIC is always sleeping until
a byte is received (interrupt on change).  This all works great with a
non-isolated system.  The real kicker is that I cannot parasitically take
ANY current from the serial connection - none, zippo.  I can't really figure
out how to do this without having two batteries (which I definitely don't
want to do).  How can I isolate the serial port with enough current to cause
the interrupt on the PIC to come alive?  Battery life is critical...of
course - so there are some issues with transformers (for noise too).  I just
need a way to have that first start bit fire everything up.

Thanks if you can just point me in a direction.  I'm happy to figure out all
the details...

2000\04\04@054008 by Alan B Pearce

face picon face
One of the definitions of RS232 is that it has to be able to drive enough
current to maintain a +/-3 volt swing across 3k ohms load. This should give you
enough current to drive the opto of a high CTR opto. The next trick is to use
two optos with the LEDs wired reverse parallel, and the outputs wired so one
transistor pulls the pin high. and the other transistor pulls the pin low on the
PIC. by selecting which opto pulls which way you will get the inversion normally
seen in an RS232 driver chip, if you need that.

To isolate the send, you may need to get the remote device to hold RTS in one
state (say negative voltage), and DSR in the other state (positive voltage). Now
wire the transistors of the opto so that when your output pin is high, the RXD
line is pulled to one voltage, and when the pin is low, the other opto pulls the
RXD line to the other voltage.

2000\04\04@080034 by Jeffrey Siegel

flavicon
face
> One of the definitions of RS232 is that it has to be able to drive enough
> current to maintain a +/-3 volt swing across 3k ohms load. This should
give you
> enough current to drive the opto of a high CTR opto.

Nope.  Like I said, I can't rely on parasitically taking any current from
the serial RS232.  There are lots of implementations of "RS232" that don't
have a +/-3V swing.  The PalmOS series of devices is a good example.

The issue is isolation with a single battery source.  How can I generate
that RB0 change interrupt from this isolated serial interface?  Once the PIC
wakes up, I have a lot of resources to help with powering the device...


> To isolate the send, you may need to get the remote device to hold RTS in
one
> state (say negative voltage), and DSR in the other state (positive
voltage).

All I have is receive, transmit, and ground.  There are no RTS/DSR/DTR that
I can reliably use.

Thanks for your help.  I know that this is a tough one...

2000\04\04@110333 by M. Adam Davis

flavicon
face
So what you are saying is that you have an rs-232 signal that you need to read
without taking *any* current from the signal?

You'll find that to read the signal (using any method) you'll need to use some
of its current(either initially and upon change, or continuously).

What it looks like you are saying is that you need to limit current consumption,
ie, you don't have enough to drive an LED inside an opto, but you might have
enough to drive a fet or transister?  You really have not given us enough info.
Is this a specific device you are connecting to (ie, palm PDA?) are there
current limitations?  Are they set by you, or the device?  Are you 'snooping' on
communications between two devices (ie, the signal is being consumed by another,
so you really can't draw any more)

There are a few ways to isolated electrical signals from each other, but optical
is generally the easiest to do.

If you do some searching you can find optoisolators which require only 5mA to
turn on the LED, and probably some which require less.

If you absolutely cannot, under any circustances, draw more than a few uA to
read the signal, then you can use an isolated power supply from your circuit to
power the isolation circuit which reads the signal.

You have the device with the rs-232 you are trying to interface and your
circuit.  Let's say your circuit uses a PWM output, or a 555 to drive a
transformer.  The other side of the transformer is then rectified, and that
power is used to drive the transister and optoisolater circuit interface.  The
power requirements on the interface side should be very low(both in current and
voltage), so you could use a small transformer (ie, custom-designed coil).

Now you only have to use one battery to supply power to both circuits.  Just
keep in mind that the power losses are greater than if you had two batteries.

-Adam



Jeffrey Siegel wrote:
{Quote hidden}

2000\04\04@205242 by Djula Djarmati

flavicon
face
Here's a thought:

              2n2?  470k?
RB0 O-----o---- C --- R ----O  Tx
         |

PIC       R 10M?              RS232

         |
GND O-----o---- C --- R ----O  GND
              2n2?  470k?
                  (9600bps)

Ok, it is not *isolated*, but it's close. I suppose that neither
the PIC nor the RS232 will be connected to AC or anything
dangerous like that. It's simple and your battery will "live
long and prosper". The bad thing is that it feels to me a bit
unreliable, I don't know... I used a similar circuit for level shift
and it worked fine, but I never tried this one...

Djula

P.S. Why do you need to isolate a battery powered device?

----------
> From: Jeffrey Siegel <spam_OUTjeffrey.siegelTakeThisOuTspamactivecenter.com>
> To: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
> Subject: Isolated serial to RB0 interrupt...
> Date: 04 April, 2000 4:24
>
> I'm having this difficult problem that is beyond my abilities.  I'm
hoping
> someone has a creative direction to set me on to figure out how to do
> this...
>
> I have a battery-powered device with a 3-wire RS232 serial connection
that
> must be isolated (optoisolators).  I've tied the serial input to the
> appropriate PIC USART pin and also to RB0.  The PIC is always sleeping
until
> a byte is received (interrupt on change).  This all works great with a
> non-isolated system.  The real kicker is that I cannot parasitically take
> ANY current from the serial connection - none, zippo.  I can't really
figure
> out how to do this without having two batteries (which I definitely don't
> want to do).  How can I isolate the serial port with enough current to
cause
> the interrupt on the PIC to come alive?  Battery life is critical...of
> course - so there are some issues with transformers (for noise too).  I
just
> need a way to have that first start bit fire everything up.
>
> Thanks if you can just point me in a direction.  I'm happy to figure out
all
> the details...

2000\04\05@005644 by Jeffrey Siegel

flavicon
face
> Ok, it is not *isolated*, but it's close. I suppose that neither
> the PIC nor the RS232 will be connected to AC or anything
> dangerous like that. It's simple and your battery will "live
> long and prosper". The bad thing is that it feels to me a bit
> unreliable, I don't know... I used a similar circuit for level shift
> and it worked fine, but I never tried this one...
>
> Djula
>
> P.S. Why do you need to isolate a battery powered device?

It's a medical device and them there are the rules...it's gotta be
completely isolated too...

2000\04\05@045051 by Alan B Pearce

face picon face
>It's a medical device and them there are the rules...it's gotta be
>completely isolated too...

Thats fair enough, but then it would probably pay to use your own protocol
between the battery powered box attached to the patient to feed the data down a
fibre optic cable to another device which could be mains powered and meet all
the intrinsically safe specs, that would then attach to the serial interface.
Having a long fibre optic cable (I'm thinking a metre or so) with pulsed led as
the sending device may well be the easiest way to meet the leakage current
specs.

>From one who worked on a radio link heart monitor many years ago...

2000\04\05@050956 by William Chops Westfield

face picon face
IF:

1) you really only need pic power for the time necessary to wake from
  sleep on a portB interrupt,

AND

2) The device sits on the rs232 port for some time before this first
  start bit arrives

THEN...

you should be able to charge a capacitor large enough to power the
PIC (or whatever) at an arbitrarilly low current, so that when it
wakes up it can run long enough to bootstrap some other power source.

I take it you're "tapping" an existing rs232 port that has some other
receiver?  That'd be the best excuse for "no current draw allowed."
If that's the case, perhaps you can use a pulse transformer of some
kind in series with the existing receiver, instead of something in
parallel...  I don't know much about pulse transformers, though.

BillW

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...