Searching \ for '[PIC]: Serial Port Powered WDT' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=serial
Search entire site for: 'Serial Port Powered WDT'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Serial Port Powered WDT'
2002\02\22@181237 by Barry Michels

flavicon
face
We have a problem at work where our DSL line goes down randomly and is fixed
by a simple reset of the modem.  There's a request into the phone company to
have the line checked, but who knows how long that will take...

Anyway, this gave me an idea: write a small app that pings the internet side
of the modem and if it ever loses communication, send a signal to a PIC on
the serial port to cut power to the modem for a few seconds.

After searching for about an hour, I came up with 2 circuits that show how
to get 5mA @ 5VDC from a serial port.  According to the datasheet for the SX
chip (I have several that I have no use for) it draws 150ua at 32khz.  Also,
there are some very small soild-state relays that pull only 2-3ma.  I
haven't looked into the current draw of a slowly clocked PIC yet...

Here's what I would like to know: am I re-inventing the wheel?  Has this
already been done?  Also, maybe it doesn't require a PIC.  I was thinking
that a 555 may be used, but I wouldn't know how to go about that...


Any ideas?

Barry

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\02\22@184857 by Aaron K

flavicon
Something that I think would work well and be very low power (and simple)
would be to make a small one shot timer out of a 555 (the monostable setup)
thas is triggered by the first RS232 '0' bit in the byte (which would be a
+5 to +17 or so DC). So you could set up the timing so once this '0' bit is
recieved, it would start the 555 timer triggering the relay. Then, when ever
you wanted to turn on the relay, you'd just send any byte out (as long as it
has a '0' bit in it) on the serial port. You wouldn't need a RS232 converter
either, just hook up the RX pin directly to the 555 with a resistor and
(probably) some protection diodes, similar to the way the PICs do it on
their pins.

Aaron

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\02\22@185726 by Aaron K

flavicon
Some 555 links (there is a lot of info on the net about these):

http://www.uoguelph.ca/~antoon/gadgets/555.htm
http://ourworld.compuserve.com/homepages/Bill_Bowden/555.htm

Also, just after sending that last message out, I realized that the byte you
would need to send out would probably have to be binary 01111111, and the
serial port would have to be setup with no stop bit, to keep the byte from
triggering the relay more than once.

Aaron

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\02\22@210224 by Barry Michels

flavicon
face
----- Original Message -----
From: "Aaron K" <spam_OUTaaronTakeThisOuTspamLUMINUS.CX>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Friday, February 22, 2002 6:54 PM
Subject: Re: [PIC]: Serial Port Powered WDT


> Some 555 links (there is a lot of info on the net about these):
>
> http://www.uoguelph.ca/~antoon/gadgets/555.htm


Great tutorial!  Thanks!

Barry

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\02\23@025255 by Barry Michels

flavicon
face
Well, it took 4 hours, one 555, 3 resistors, 2 diodes, 1 cap, a piece of
perf board and several inches of solder.  It's alive!  When there's no data
flowing on the serial port, the relay stays energized (I'm using a small,
low current reed relay).  All it takes is 1 or 2 characters to de-energize
the relay for a few seconds.  I'm going to try it out at the office next
week.  I just hope it doesn't burn out the serial port...

Thanks for the help

Barry

{Original Message removed}


'[PIC]: Serial Port Powered WDT'
2002\03\04@165232 by Peter Tran
flavicon
face
Please let me know if your design works? I am interesting in this
application for my DSL at home also. Thanks.

{Original Message removed}

2002\03\04@220747 by Barry Michels

flavicon
face
It works, although I didn't feel comfortable drawing that much power from
the serial port (10-15mA) for extended periods and having 120VAC that close
to the port, so I redesigned it to pull power from a 24VAC transformer and
uses an opto-isolator to fire a larger relay.  Also, the relay I was using
kept sticking and required a thump or 2 to get it to release once it had
engaged.  I'm using a batch file that sends the results from a ping command
to the serial port only if the ping failed.  The file is set to run every
hour and the 555 holds the relay in for about 5 seconds after the characters
are sent over the serial port.


Barry

{Original Message removed}

2002\03\05@134903 by Peter Tran

flavicon
face
Thanks, Barry, for your info. I guess that you use perl to send the results
from a ping command to the serial port. Could you send me your perl script?
Thanks.

peter
{Original Message removed}

2002\03\05@141944 by Barry Michels

flavicon
face
Nope, even easier.  It's a batch file:

ping -l 1 -n 2 x.x.x.x > C:\test.txt
type C:\test.txt | find "Request timed out." > COM1
type C:\test.txt | find "Hardware error" > COM1
del C:\test.txt

Replace x.x.x.x with the IP you want to confirm communication with.  In our
case it's the internet side of the router.

I had to do 2 ping messages (-n 2) in order to have enough data to trigger
the 555.  For some reason, the port speed wouldn't change from 115k no
matter what I set it to in the port's settings dialog.  At 9600 it only
takes 1 or 2 characters.


Barry

{Original Message removed}

2002\03\05@144056 by Robert Rolf

picon face
Is there some reason you don't just use one of the serial port handshake
lines (RTS, DTR) to drive an opto isolated relay directly? There are hundreds
of opto relays to choose from, many with zero crossing turn on.
The LED will draw a few MA, and you'll have a -safe- UL/CSA approved device
and won't have to worry about 'sticky' relays or an external transformer.
You could even use the TX line directly by sending
out a 'break' command, and with the port programmed for it's lowest possible
baud rate (150baud IMS) you get a 1/2 second break, more than enough for
a reset.

You can also get packaged units (power cord, fuse, socket) from any
large theatrical supply house. They are used as light dimmers
(0-10V = 0=100%) so the 12V output of a serial port will get you simple binary
control.

KISS.

For -real- WDT applications (this one isn't since it relies on
proper program execution to EFFECT the reset) I would use a 4060
running with a low frequency osc value, and use the 2^14 bit overflow to trigger
the reset. Periodic pinging from the protected system resets the counter,
preventing overflow.
It's easy to get 1 hour plus periods with uA of standy current.

Robert

And please trim the footers on such long threads.

Peter Tran wrote:
>
> Thanks, Barry, for your info. I guess that you use perl to send the results
> from a ping command to the serial port. Could you send me your perl script?
> Thanks.
>
> peter
> {Original Message removed}

2002\03\05@182112 by Barry Michels

flavicon
face
I couldn't have built it out of junk parts laying around my apartment... :)

----- Original Message -----
From: "Robert Rolf" <Robert.RolfspamKILLspamUALBERTA.CA>
To: <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>
Sent: Tuesday, March 05, 2002 2:37 PM
Subject: Re: [PIC]: Serial Port Powered WDT


> Is there some reason you don't just use one of the serial port handshake
> lines (RTS, DTR) to drive an opto isolated relay directly? There are
hundreds
> of opto relays to choose from, many with zero crossing turn on.
> The LED will draw a few MA, and you'll have a -safe- UL/CSA approved
device
> and won't have to worry about 'sticky' relays or an external transformer.
> You could even use the TX line directly by sending
> out a 'break' command, and with the port programmed for it's lowest
possible
> baud rate (150baud IMS) you get a 1/2 second break, more than enough for
> a reset.
>
> You can also get packaged units (power cord, fuse, socket) from any
> large theatrical supply house. They are used as light dimmers
> (0-10V = 0=100%) so the 12V output of a serial port will get you simple
binary
> control.
>
> KISS.
>
> For -real- WDT applications (this one isn't since it relies on
> proper program execution to EFFECT the reset) I would use a 4060
> running with a low frequency osc value, and use the 2^14 bit overflow to
trigger
> the reset. Periodic pinging from the protected system resets the counter,
> preventing overflow.
> It's easy to get 1 hour plus periods with uA of standy current.
>
> Robert
>
> And please trim the footers on such long threads.
>


Will do!

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\03\06@132732 by Peter Tran

flavicon
face
I see. Look like you are running your application on a Windows machine. In
my case, I use a Linux box to act as a gateway/router for my home network,
so I wrote a simple perl script to do the "ping" and communicate with serial
port. I can set any period for checking the connection. If you like it, I
can send it to you. However I need to build hardware to test it first. ;>)

peter
{Original Message removed}

2002\03\07@233339 by Dwayne Reid

flavicon
face
At 12:37 PM 3/5/02 -0700, Robert Rolf wrote:

>For -real- WDT applications (this one isn't since it relies on
>proper program execution to EFFECT the reset) I would use a 4060
>running with a low frequency osc value, and use the 2^14 bit overflow to
>trigger
>the reset. Periodic pinging from the protected system resets the counter,
>preventing overflow.
>It's easy to get 1 hour plus periods with uA of standy current.

Even better - how would you like a little PC card already designed to do
the above?  It uses a 4060 and a 4528, has a dual opto for the input
(either polarity works) and footprints for any one of: SIP reed relay,
Aromat JS1E-5, or dual opto for the reset output.

We built several hundred of these for people who run telephone chat
lines.  The original spec was to cause a reset if there was no hard drive
activity for some selectable period of time (1 min, 5 min, 10 min, 20
min).  A bunch of radio stations also use them for the same purpose.

I still have a bunch of bare cards and the docs to build them. . .

dwayne


Dwayne Reid   <EraseMEdwaynerspam_OUTspamTakeThisOuTplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 18 years of Engineering Innovation (1984 - 2002)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


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