A problem to solve...

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
nmasson
Posts: 7
Joined: Wed Jun 18, 2003 1:01 am
Location: Los Angeles
Contact:

A problem to solve...

Post by nmasson »

Dear All,

I'm wondering if I may ask for some ideas, but firstly the problem.

I have a cable modem, a router and Network Attached Storage all working perfectly. 3 different boxes working in perfect harmony serving our household....until power is lost, or the cable company has a disruption or something similar.

In order to reset the system and restore email for my wife (which is really what this is about), all these devices need to be recycled in a particular order. Cable modem first who then hands an IP address to the router who in turn hands an address to the NAS.
Currently that involves climbing behind the rack, physically removing the power cords and plugging them in...on at a time.

An elegant solution would be a reset switch that performs the following:

1) Removes power to all devices
2) Powers the modem
3) Waits 30 secs
4) Powers the Router
5) Waits 30 secs
6) Powers the NAS
7) Stays on, doesn't overheat, cause a fire and ruin my day.

Now I could do this with a micro controller and relays, but I'm wondering if there is a simpler solution...or a better solution.

By way of background I should add the following.

The modem and router are powered by external 9 volt wall packs and have no power switch on the units. This makes it easy.
The NAS is 120 V AC Powered and has a power switch, so I will have to internally modify it so that any relay acts on behalf of the power switch on the NAS.

Any thoughts?

My level of expertise in this field is moderate. I could program my way out of this, but I was hoping to broaden my knowledge instead.

Cheers and thanks in advance.

NM
User avatar
Janitor Tzap
Posts: 1707
Joined: Sat Aug 12, 2006 5:17 pm
Contact:

Re: A problem to solve...

Post by Janitor Tzap »

nmasson wrote:Dear All,

I'm wondering if I may ask for some ideas, but firstly the problem.

I have a cable modem, a router and Network Attached Storage all working perfectly. 3 different boxes working in perfect harmony serving our household....until power is lost, or the cable company has a disruption or something similar.

In order to reset the system and restore email for my wife (which is really what this is about), all these devices need to be recycled in a particular order. Cable modem first who then hands an IP address to the router who in turn hands an address to the NAS.
Currently that involves climbing behind the rack, physically removing the power cords and plugging them in...on at a time.

An elegant solution would be a reset switch that performs the following:

1) Removes power to all devices
2) Powers the modem
3) Waits 30 secs
4) Powers the Router
5) Waits 30 secs
6) Powers the NAS
7) Stays on, doesn't overheat, cause a fire and ruin my day.

Now I could do this with a micro controller and relays, but I'm wondering if there is a simpler solution...or a better solution.

By way of background I should add the following.

The modem and router are powered by external 9 volt wall packs and have no power switch on the units. This makes it easy.
The NAS is 120 V AC Powered and has a power switch, so I will have to internally modify it so that any relay acts on behalf of the power switch on the NAS.

Any thoughts?

My level of expertise in this field is moderate. I could program my way out of this, but I was hoping to broaden my knowledge instead.

Cheers and thanks in advance.

NM
Simple huh?

Ok....
How about putting them on a AC Computer Work Center.
Image
http://matelectronics.com/cgi-bin/sh000 ... 4588#a4588

Heres how I setup mine.
Image
This way I don't have to leave my desk to turn on the printer when I need it.


Signed: Janitor Tzap
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Post by philba »

I think he wants it automated. My AV rack has a power controller that does something similar. It's way over priced and actually kind of flaky (monster cable crap). but I digress...

This is a pretty simple thing to do. You could use TRIACs (or relays) and 555 timers. Or a little micro controller like you suggest for more timing flexibility. You could build that into a power center like JT pointed out. I see them for cheap at the computer recycle stores.

Are you sure the NAS doesn't have a boot on power option? I thought that was pretty standard in that class of device.

by the way, I have something similar (cable modem, router, switch, servers) and they all manage to come back up with out any sequencing. My router has no problem seeing the cable modem even though it takes longer to come up. All of my servers (running debian linux distro) handle finding the online connection at arbitrary times.
nmasson
Posts: 7
Joined: Wed Jun 18, 2003 1:01 am
Location: Los Angeles
Contact:

Post by nmasson »

Thanks for replying chaps....much appreciated.

Unfortunately the Power Center idea won't work as it stands. I do want the "boot sequence" to be automated. (Also, I was hoping for this to be a fun project to build..and hopefully learn things along the way) Building a timer control inside the power center might be a good path except then I'm switching mains power instead of the 9 volt supplies.

In answer to the NAS question.... I will look in the manual (It's a D-Link DNS 323) but I don't believe it will auto boot on applying mains power. Although that would be a smart option.

As the most recent anecdote..... last night the internet connection was down for many hours. When it came back up, the modem sprung to life but the Router had to be rebooted. This is performed by removing the 9V power cable, wait a moment and re-insert.

I know it "shouldn't" be this way....and some combinations of routers and modems live more harmoniously than others.

Anyway, just saying to my wife on the phone "Just hit the red reset switch" is a lot less aggravating to her than "I'll be home in a few hours".

....and it would be cool to build it. (with your help of course)

Cheers,
NM
nmasson
Posts: 7
Joined: Wed Jun 18, 2003 1:01 am
Location: Los Angeles
Contact:

Post by nmasson »

I was trolling the net and came across this. (reprinted without permission but credited to Rob Paisley)

[/img]Image

Multiply by three, with different values for each timer and maybe this should be the foundation.....or not.
User avatar
Lenp
Posts: 1529
Joined: Thu Oct 26, 2006 8:11 pm
Location: Maryland
Contact:

Post by Lenp »

Hi NM

I think a low end processor, a few lines of code, driver transistors and relays would make t all happen. If you prefer solder logic, the old standby 555 would get the job done. Put them in series so A triggers B and so on. Also commercial time delay relays are available that could be connected as the 555's.

If you want to go the processor route, let me know and I'll help!

Here's a quick aside:
Most of the newer PC's have a push button switch on the panel, that sends a signal to start the boot. The system will not start just on power up from the line side. Just put a capacitor, try .1-.5uf accross the power switch. On power up the cap looks just like a momentary short and starts the boot process. We did a remote access system with external modems some years ago. When the modem CD (Carrier Detect) signal went high after it synced with the calling system, it turned on a solid state relay to power up the host PC. When the models disconnected the CD went ow and the PC's powered down. (Yup, his was before Windows and the long winded shutdown crappola) The 'cap accross the switch' trick saved the day when older systems were updated.

The point of this all being that it may help auto power some gear that needs a ''push''

Len
Engineer1138
Posts: 458
Joined: Thu Feb 05, 2004 1:01 am
Location: Minneapolis, MN
Contact:

Post by Engineer1138 »

Cheap solution: a single micro and a few relays.

Easy solution, but expensive: three time-delay relays.
nmasson
Posts: 7
Joined: Wed Jun 18, 2003 1:01 am
Location: Los Angeles
Contact:

Post by nmasson »

Len,

Thanks for chiming in.

I will try the cap trick on the NAS. That was a good aside.

I think I will go the micro route because I might think of some other intelligence to build into it. (Like sensing loss of power and then performing my newly created "controlled boot sequence") I'll have to think about that.

So..onto the nuts and bolts of it all.

I have a BSII lying around doing nothing. Overkill maybe? Could you recommend something different. I've had a little experience with Stamp, but then again, maybe time to learn something new.

I guess the relays should be normally closed and are only held open by the micro and drive transistors during boot sequence.

Right logic?

Cheers,

NM
nmasson
Posts: 7
Joined: Wed Jun 18, 2003 1:01 am
Location: Los Angeles
Contact:

Post by nmasson »

Engineer1138,

Thanks for your post.

Yep...I want to build this as a practical project....so a micro and relays it is.

Now...the philosophy has been decided. Onto the actual design.

Cheers,
NM
Franklin97355
Posts: 42
Joined: Sat Nov 03, 2007 10:00 pm
Contact:

Post by Franklin97355 »

Try something like this and a picaxe 8M
http://www.allelectronics.com/cgi-bin/i ... TROL_.html
User avatar
Lenp
Posts: 1529
Joined: Thu Oct 26, 2006 8:11 pm
Location: Maryland
Contact:

Post by Lenp »

NM
I am currently involved with 3 projects and am using the PicAxe chips.
I also started years ago with Parallax but now they, for the most part, gather dust!

Yes, I know there will be a slam from some programming pundit that preaches that all programs must be in 'C' or whatever non-human language is in vogue. I started eons ago in Basic and for the applications I have, it still does the job. I can complete several projects and go to the bank before I will grasp the rudiments of a new language! I am outcome based.

So, this PicAxe is a standard Pic chip with a bootstrapped code. Their programing commands and syntax is nearly the same as StampBasic.

Now the best part:
The editor is FREE, and there is a software simulator that works well on most of the low pin count pins, showing outputs and allowing user inputs and adjusting the ADC inputs as well as viewin the running variables and program space.

But now It gets better!
The PicAxe 14M chip has 5 inputs, 6 outputs, 2 ADC runs at 8MHz. and can handle about 80 lines of typical code. It is less than $4.00.

The top end PicAxe 40X2, has 33 configurable I/O, 0-12 ADC and runs at 40MHZ and can handle about 1000+ lines of typical code. It's available for about $15

Now, go stare at your $tamp module$

PicAxe is based in the UK, but after going to their site at (http://www.picaxe.co.uk/) you can locate a few US distributors that have good pricing. Download their free software, write your code then run the simulator. You do not need to have a chip attached to run it Compare that to Parallax! They also have an excellent PDF reference manual and an actve user forum

PM if you need help, or post if it would be of general interest!

Len
User avatar
jollyrgr
Posts: 1289
Joined: Thu Jan 03, 2002 1:01 am
Location: Northern Illinois
Contact:

Post by jollyrgr »

Another thing you can do is assign static IP addresses to the router WAN port and to the NAS. Assign the IP address to the WAN port that is handed out normally by DHCP of the modem. For the NAS, make it anything you want outside the DHCP range of the router.
No trees were harmed in the creation of this message. But billions of electrons, photons, and electromagnetic waves were terribly inconvenienced!
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl »

Hi there,


My first thought is a micro controller and a couple triacs.

If you dont like the micro controller part, you can get by with
a single ic chip like the LM339 used to generate 30 second
delays with a single resistor and capactor for all the delays.
The trick is to use a voltage divider so that one section triggers
at say 1/3 Vcc and the other section triggers at 2/3 Vcc.
This gives you two delays for example.
This requires:
1 LM339
6 1/4 watt resistors
1 electro cap (100uf perhaps)

Of course you need two triacs or two relays also.
Direct offline powering is possible, or use a wall wart.
LEDs vs Bulbs, LEDs are winning.
User avatar
haklesup
Posts: 3136
Joined: Thu Aug 01, 2002 1:01 am
Location: San Jose CA
Contact:

Post by haklesup »

This truly is a project with many viable solutions.

I noticed the reset sequence does not mention the PC. If I can assume the PC can remain powered during the reset of the networking peripherals then I might suggest that the PC itself be the brains. There are plenty of PC controlled relay projects for Serial, USB or Parallel interface. Some kts, some off the shelf and some DIY schematics all available for this. You'll probably have to add your own case and AC plugs/cord.

Pair that with a VB application and now you can have a shortcut on the desktop she can click to reset the devices. Such a program can also be put in the autoexec.bat or win.ini (or registry) to cause a reset upon reboot.
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl »

Hi again,


hackle:
Oh yes, that's an interesting way to go about it. Once the computer
comes on it could be programmed to output the required signals
at the right times to turn everything else on.

When i think about how simple this would be using a uC however,
i cant help but think that it would take about an hour to come up
with a three output delay program and program a chip. This chip
would then provide all the timing required for all the delays (up to
6 delays total, which could come in succession such as:
30 secs
45 secs
60 secs
75 secs
90 secs
etc., or whatever else is needed.
The outputs could directly drive the right triacs (8 amps) too.
The total circuit would be

1 chip
3 resistors for 3 triacs (plus three 120vac outlets)
5v power supply (LM78L05)
0.1uf bypass cap
120vac line cord
Maybe power from a dc wall wart
RS perf board
case (i've used plastic elect. boxes for line op equipment in the past)

That's got to be the simplest solution.
In fact, it would be so fast to come up with a program and flash
the chip i guess i would be willing to provide the program and
program a chip and mail it out. The OP would have to pay for
the chip (2 dollars USD) and the mailing cost (under 2 dollars for
first class mail, about 4.50 for Priority).

I've done this with several other people i've met on the web over
the years, with designs (in the form of schematics) and chips.
They usually send me parts or something like that in return,
but this is so easy i'd leave it up to the OP to decide if he wants to
send anything back for the effort.

I guess i could do a three delay variable delay chip if that would be
better. It would however require three external pots to adjust
the delays (from 1 to 1000 seconds per delay).
There really are a lot of possibilities here though, for example,
a switch to switch between successive delays or independent delays,
and im sure others could come up with more ideas here too.

So far the longest delay i've ever programmed into a chip has been
12 hours, but originally it was going to be 24 hours. During the
process i found that you can really get super long delays this way.
If i remember right, using 6 registers you can get many years of delay
even when running at 4MHz.
LEDs vs Bulbs, LEDs are winning.
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests