Pages: [1] 2   Go Down
Author Topic: Arduino Cut power!  (Read 1611 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 167
Safety first.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know what you thought of the title but here's what its about.

As some may know windows 7 has wierd Internet Connectivity problems.
And from my earlier thread i said i had to cut the power for the router every now and then.

How can I use the Arduino to cut power for the router at precisely midnight every day for 30secs then continue powering the router.

I'm not letting you do all the work. Here are some ideas I planned.
In the code make the arduino sleep.
I know how to do the code.

I need help hardware-wise. How would I connect 12 volts to an arduino to have it cut the power.

Wall -> 12 volt adapter -> arduino (external power) -> router
Logged

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Use an relay to do that.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Specifically, a relay that has "normally closed" contacts.  When the relay is energized, the contacts are opened (the circuit is broken).
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Specifically, a relay that has "normally closed" contacts.  When the relay is energized, the contacts are opened (the circuit is broken).

Yes, that would make for a very simple 'black box'. It would have a 12vdc input jack from the wall wart transformer and a 12vdc output cable with a plug that fits the router's power input jack. Inside the box could be a any simple "bare bones" type Arduino board that will accept 12vdc power (that is, has it's own internal +5vdc regulator).

The Arduino would then drive a small SPDT +5vdc relay, such as (  http://www.allelectronics.com/make-a-store/item/RLY-496/5VDC-SPDT-REED-RELAY/1.html ) that can be driven directly from a Arduino output pin. Do wire a reverse connected diode directly across the relay coil terminals. The relay coil's two terminals will wire to your assigned output pin and the Arduino ground pin. Turning the output pin HIGH will energize the relay, causing the normally closed contact to open, thus removing power to the router until the output pin is brought LOW.

The +12vdc input wires to both the Arduino power input and to the normally closed relay contact. The power input jack ground wires to both the Arduino board and the negative wire of the 12vdc output cable/plug. The relay's common contact wires to the positive output wire of the 12vdc output cable/plug.

 I would just use a simple sketch using the millis() function to initially turn on the relay coil for 30 sec, then off,  and then again on every 24 hours worth of millis() time for 30 secs. You could wire an external reset switch to the box wired between ground and the Arduino reset pin, so you could force a immediate 30 sec 'power off' state and then start the 24 hour wait for the next automatic power interruption.

Good luck with your project, and giving Windows 7 a little Arduino helper  smiley-wink

Lefty
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ive had 7 for about a month now on my "main" pc, never had a issue with its network

my pos netgear wifi router on the other hand ... so yes good luck on your idea
Logged


0
Offline Offline
Full Member
***
Karma: 0
Posts: 167
Safety first.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just got my relay, looks like the one from all electronics but it was from my local hobby shop.

Thanks for the hardware help! smiley
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Just got my relay, looks like the one from all electronics but it was from my local hobby shop.

Just be sure to check the relay coil current requirments. If it's more then 30ma or so you will have to use a switching transistor instead of directly driving it from an Arduino output pin.

Lefty
Logged

0
Online Online
Shannon Member
****
Karma: 222
Posts: 12723
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And the relay's switching (load) current spec - if you overload it it will weld itself short-circuited.  Hopefully the router is low current.
Logged

[ I won't respond to messages, use the forum please ]

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Even it the relay doesn't need more than 30ma direct driving it with the arduino is risk due the current spike generated by the relay.
Logged

B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I agree.  I always use a transistor with my relays no matter what (paranoid, I know smiley-razz).
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 167
Safety first.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sure, I can use a transistor as a switch rather than connecting it directly to the relay. I'm just putting things on a breadboard right now. This weekend it'll be operating.
Logged

B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh, well I would still recommend a relay, but use a transistor to operate the relay (seems a bit redundant, I know).  It's using a switch to activate a bigger switch smiley.  Thus avoiding high current draw directly from an Arduino pin.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Even it the relay doesn't need more than 30ma direct driving it with the arduino is risk due the current spike generated by the relay.

That is the reason to always wire a reverse biased diode right across the relay coil terminals, no matter what voltage or device is driving the coil. I have had no problems driving low current (<30ma) relays directly from an Arduino output pin when properly protected by the transisent suppression diode installed across the relay coil.

Lefty
« Last Edit: March 29, 2010, 06:35:05 pm by retrolefty » Logged

Chester, UK
Offline Offline
Sr. Member
****
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As much as I love to see arduinos used.....
Surely this would do exactly what you need for a few $$$
Logged

If your system involves lethal voltages/life critical/flamable elements - you probably shouldn't need to ask.
The Arduino != PC.

B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I didn't even think of that, daveg..that could work just as well if not better...

But still, I vote use the Arduino smiley-kitty!
Logged

Pages: [1] 2   Go Up
Jump to: