Isolated Serial Level Converter
Rec 14-jan-2008 21:36
In
my previous post I mentioned that I wanted an isolated serial level converter
for my power glitch monitor project. Here's what I came up with:
Here's a picture of my test setup using an ATmega8 with a very simple firmware
to generate patterns and act as an echo server:
It works quite nicely, using the serial port's own signals as power supply.
It derives the positive voltage from the RTS signal, so remember to use it
with hardware flow control enabled (although there is actually no flow
control -- the CTS line is shunted with RTS).
The negative voltage comes from the TXD line -- the large capacitor stores it
up for use when transmitting and the diode prevents it from losing it too fast.
So it will provide a good "full duplex" as long as there are more marks
("1" bits, meaning negative voltage) than spaces ("0" bits) in the line.
If you remove this capacitor, you will get a hardware loopback, receiving
back everything you transmit.
I was a tad disappointed that when I cranked the speed up to 19,200 bps,
the data came out garbled. Perhaps this can be fixed with better optocopulers.
I used those
TIL111s
just because I had a few of them lying around. However, at 9,600 bps it worked
just fine, which I believe will be adequate for the glitch monitor project.
Follow-up posts:
top