Bitcoin Forum

Other => CPU/GPU Bitcoin mining hardware => Topic started by: bearsworth on August 26, 2013, 02:45:20 AM



Title: How can I make a remotely controlled power switch
Post by: bearsworth on August 26, 2013, 02:45:20 AM
I was reading threads from before and I figured out what the solution is, but I just don't know how to go about doing it because I'm a complete nooby at this. Anyways, my goal was to be able to turn on and off a group of computers say 20+ computers by connecting to the motherboards power switches and using an Arduino or Raspberry Pi connected to the web to hard boot or hard reset the computer. Could someone please write me or point me to a step by step guide in configuring something like this? I'll offer up some money if someone could figure this out.


Title: Re: How can I make a remotely controlled power switch
Post by: kslavik on August 26, 2013, 02:59:33 AM
Take a look at those products:
http://www.amazon.com/Belkin-Automation-Switch-Apple-iPhone/dp/B0089WFPRO/ref=pd_sim_sbs_hi_1

http://www.amazon.com/Visible-Energy-VE-178-US-Power-Center/dp/B0057HX17K/ref=sr_1_1?ie=UTF8&qid=1377485851&sr=8-1&keywords=ufo+energy

Both of those products would allow to power on/off an electrical socket over the internet using iPod/iPhone app or a website



Title: Re: How can I make a remotely controlled power switch
Post by: Morblias on August 26, 2013, 03:07:19 AM
I use my arduino to control xmas lights each year with 6 of these (need to solder it together):

https://www.sparkfun.com/products/11042?

Connected almost the same way as this tutorial:

https://www.sparkfun.com/tutorials/119

I don't have it online, but with an ethernet shield with arduino and some programming you could make the on/off switches online. I am not too smart with programming though so I am not sure about the online part, someone else (or google) will have to help ya with that.

Basically just have each relay hooked up to a pin on the arduino, send digitalWrite(pin, HIGH); to it for on, which the relay then kicks on the power to your 3 prong female end that has a computer plugged into it, and digitalWrite(pin, LOW); to turn it off.

Either that or you can buy something like this: http://www.amazon.com/Managed-Designed-Manufactured-Synaccess-Networks/dp/B0039OZKPE/ref=sr_1_4?ie=UTF8&qid=1377486420&sr=8-4&keywords=remote+power+strip


Title: Re: How can I make a remotely controlled power switch
Post by: moneymachine on August 26, 2013, 03:36:36 AM
You need a switched PDU. Try searching ebay, I recommend APC. Depending on how much power you need, you might want to consider a 208v model with a 20 or 30 amp 240v circuit. You can find a 30amp zero U model on ebay for < $200.

http://www.amazon.com/APC-AP7900-Switched-Surge-Protector/dp/B0000AAAYH/ref=sr_1_1?ie=UTF8&qid=1377488073&sr=8-1&keywords=switched+pdu



Title: Re: How can I make a remotely controlled power switch
Post by: bearsworth on August 26, 2013, 03:48:52 AM
I use my arduino to control xmas lights each year with 6 of these (need to solder it together):

https://www.sparkfun.com/products/11042?

Connected almost the same way as this tutorial:

https://www.sparkfun.com/tutorials/119

I don't have it online, but with an ethernet shield with arduino and some programming you could make the on/off switches online. I am not too smart with programming though so I am not sure about the online part, someone else (or google) will have to help ya with that.

Basically just have each relay hooked up to a pin on the arduino, send digitalWrite(pin, HIGH); to it for on, which the relay then kicks on the power to your 3 prong female end that has a computer plugged into it, and digitalWrite(pin, LOW); to turn it off.

Either that or you can buy something like this: http://www.amazon.com/Managed-Designed-Manufactured-Synaccess-Networks/dp/B0039OZKPE/ref=sr_1_4?ie=UTF8&qid=1377486420&sr=8-4&keywords=remote+power+strip

This was closest to what I wanted to get together. Someone pm'd me about something but if anyone else has a solution like this please share it :D. Or pm and if you have it finished I'll send you some cash depending a fair offer.


Title: Re: How can I make a remotely controlled power switch
Post by: bearsworth on August 26, 2013, 03:55:25 AM
Take a look at those products:
http://www.amazon.com/Belkin-Automation-Switch-Apple-iPhone/dp/B0089WFPRO/ref=pd_sim_sbs_hi_1

http://www.amazon.com/Visible-Energy-VE-178-US-Power-Center/dp/B0057HX17K/ref=sr_1_1?ie=UTF8&qid=1377485851&sr=8-1&keywords=ufo+energy

Both of those products would allow to power on/off an electrical socket over the internet using iPod/iPhone app or a website



One of the reasons I was hoping to run a arduino or raspberry pi was because of the price involved. I was hoping to run around 30 computers or so and this might be a bit costly to buy 30 of those things. If these were say like $8-$10 per I'd totally do it :D. But the arduino seems to be the cheapest among from what I've read. If you could find some reliable ones for cheap I'll pay you some paypal :D.


Title: Re: How can I make a remotely controlled power switch
Post by: notlist3d on August 26, 2013, 05:53:40 AM
Take a look at those products:
http://www.amazon.com/Belkin-Automation-Switch-Apple-iPhone/dp/B0089WFPRO/ref=pd_sim_sbs_hi_1

http://www.amazon.com/Visible-Energy-VE-178-US-Power-Center/dp/B0057HX17K/ref=sr_1_1?ie=UTF8&qid=1377485851&sr=8-1&keywords=ufo+energy

Both of those products would allow to power on/off an electrical socket over the internet using iPod/iPhone app or a website



One of the reasons I was hoping to run a arduino or raspberry pi was because of the price involved. I was hoping to run around 30 computers or so and this might be a bit costly to buy 30 of those things. If these were say like $8-$10 per I'd totally do it :D. But the arduino seems to be the cheapest among from what I've read. If you could find some reliable ones for cheap I'll pay you some paypal :D.

Arduino DIY will be cheapest.  Any of the pre-made and would be very very pricey for 30 computers.  As far as investment you are will come ahead chances are with a little downtime over commercial options for 30 computers.

Only other idea is look into getting cheap backup power supplies.  This would prevent if power is just lost for a moment and keep your rig going.  But with that you won't be able to control remote, and also could get pricy even with used.


Title: Re: How can I make a remotely controlled power switch
Post by: Xyver on August 26, 2013, 08:24:35 AM
What are the chances of bring able to use a relay and connect the arduino to turning of the fuse directly?  Connect all comps to the same fuse, and away you go.


Title: Re: How can I make a remotely controlled power switch
Post by: Soros Shorts on August 26, 2013, 10:11:07 AM
What are the chances of bring able to use a relay and connect the arduino to turning of the fuse directly?  Connect all comps to the same fuse, and away you go.
30 computers with 2-3 GPUs each are like what, 150 Amps minimum? Good luck finding a cheap 150 Amp relay and a single outlet that can supply that much current.


Title: Re: How can I make a remotely controlled power switch
Post by: xjack on August 26, 2013, 09:12:02 PM
I've got one of these(mine's an old gen) running on my work rack.  Dead peer (ping) detection with power cycling options, incremental startup (no breaker tripping), redundant power, web interface, nice price.

http://www.digital-loggers.com/epcr3.html

vertical model!  
http://www.digital-loggers.com/vpdu.html

desktop
http://www.digital-loggers.com/lpc.html




Title: Re: How can I make a remotely controlled power switch
Post by: snootch on August 27, 2013, 09:15:56 AM
I bought one of these: http://www.controlbyweb.com/webrelay-quad/ (http://www.controlbyweb.com/webrelay-quad/)

http://www.isourcecctv.com/images/products/detail/X320_front.1.gif

And it works great. I think I paid $140 for it, and it works great for my LTC miners. After configuring it, I just hook up the normally open pins on each relay to the reset pins on each miner's motherboard. If a miner isn't responding, I go to the dynamic DNS hostname I set up, it's port forwarded on my router, and pow, I've got a web based gui with buttons to restart my miners.  ;D

Now, I won't be in a situation again where I go on a two-week vacation and one of the miners locks up on day two.  >:(


Title: Re: How can I make a remotely controlled power switch
Post by: Dunkelheit667 on August 28, 2013, 12:25:54 AM
Well, you can power on/off up to eight computers with one Raspberry Pi without any expensive I/O cards and stuff. You'll need some wires, eight N-Channel MOSFETs (guess something around one USD/MOSFET), a soldering iron, solder and a piece of software for comfortable use - that's it. Without touching any AC. :)

Guess the same for an Arduiono.


Title: Re: How can I make a remotely controlled power switch
Post by: crescendo on August 31, 2013, 06:47:50 AM
Making an remote controlled power switch is not so difficult task, it can be done easily, It takes a lot of time and concentration on the project is major thing.


Title: Re: How can I make a remotely controlled power switch
Post by: CMMPro on September 01, 2013, 03:22:14 AM
Sometimes the low tech solution is the best solution....ever heard of "The Clapper"?

http://www.youtube.com/watch?v=cfgN5tUgjb8


Title: Re: How can I make a remotely controlled power switch
Post by: tarui on September 01, 2013, 05:40:17 PM
found something

not sure if it will work

http://www.digidave.co.uk/jshop/product.php?xProd=1003124&xSec=22

http://www.digidave.co.uk/frodo_img/product/238/3/250px_grey_8800_250x250.gif

it's USB based.



Title: Re: How can I make a remotely controlled power switch
Post by: tarui on September 01, 2013, 05:44:12 PM
why not use this
http://www.towsure.com/images/products/4614/detail/24-hour-plugin-mains-timer-switch-socket.jpg

i intend to use this because my avalon occasionally restarts but doesn't start mining until it's manually shutdown and restarted.

my idea is that, i connect it to the mains (between the psu's power plug and the wall socket) and make it shutdown for the smallest duration every few hours.

shutting down for say 15mins (not sure if there are shorter intervals) for every 4hrs is better than having a miner go offline for 4-5hrs or longer until someone is able to power cycle it for u


Title: Re: How can I make a remotely controlled power switch
Post by: davewr2013 on September 02, 2013, 02:29:08 PM
You used the word "Computer" -- not mining rig.... so...

Windows and Linux have "Shutdown" sequences which must be followed to not damage files etc.

So the simplest way is to install a small application that looks for a signal to execute the shutdown sequence. Or to design an app that follows a schedule.

Some BIOSes  have a timer to do the startup. That could form the second half of the switch.

In other cases you can set a Hibernate mode and use a trigger/timer to do the startup. There are so many ways to do this I won't suggest one unless I know more details. Some digging around the internet should convince you this can be done.


The electrical switches that others are suggesting is the wrong approach. If you don't care about file damage and the systems not restarting reliably -- then try the power switches. Let us know how it works out. Bot don't complain since you have been warned.

If you are using mining rigs and there is no other shutdown procedure other than turning off power -- then fine. But that is another issue entirely...




Title: Re: How can I make a remotely controlled power switch
Post by: MoneyMorpheus on September 02, 2013, 05:48:20 PM
Cheapest way should be using relays. Common relays can only handle 10A current. Like this 4:

http://www.ebay.com/itm/4-Channel-5V-Relay-Module-With-Optocoupler-For-Arduino-DSP-AVR-PIC-ARM-/321151394531?pt=LH_DefaultDomain_0&hash=item4ac61d62e3


If you would like to cut the whole power of the machine using relays, and its power exceeds 10A, then you should use solid state relays like this one:

http://www.ebay.com/itm/SSR-25-DA-Solid-State-Relay-For-PID-Temperature-Controller-25A-Output-24V-380V-/181179089631?pt=LH_DefaultDomain_2&hash=item2a2f1d82df


Its a little bit more expensive but they can handle more power...


That being said you don't really need to pass all the power of the pc threw the relay. You can just use small relays to send a signal to the shutdown or reset pins in the pc, then you will be acting as if you where pressing the buttons yourself... Or if you want an even cheaper solution you can just use a transistor to do this...

I also agree with the previous post about file damage on hard reset. If you are using linux use an ext3 filesystem and not ext4, should be a little bit safer, but it doesn't guarantee a thing. If you are using windows you will need something that presses enter after you get to the press enter to continue to windows normally screen...

A solution to this would be network booting. All the pcs but one boot from a different pc threw the network. So when you hard reset all the harddriveless computers the filesystem is not at risk. Also you would save some bucks in hard drives...


Title: Re: How can I make a remotely controlled power switch
Post by: davewr2013 on September 02, 2013, 10:05:40 PM
Here is the sort of thing you want to do with a PC.

Directions are on the page.

http://www.raymond.cc/blog/how-to-remotely-turn-on-computer-from-lan-and-wan/

Wake-on-LAN (WOL) is an Ethernet computer networking standard that allows a shut-down computer to be turned on remotely. Most recent motherboards that have an integrated Ethernet controller that supports this feature. You can enable the Wake-on-LAN feature in the Power Management section of the motherboard’s BIOS. There are two ways of how Wake-on-LAN can work. The first one is you want to turn on a computer on the same local area network and the second one is you want to turn on a computer in another location through the internet.

This is how Wake-on-LAN works; the target computer is shut down with enough power reserved for the network card to function. The network card listens for a specific packet called the “Magic Packet”. The listening computer receives this packet, checks it for the correct information, and then boots if the Magic Packet is valid. A magic packet is data consisting of “FF FF FF FF FF FF” followed by 16 repetitions of the listening network device’s MAC address.

Here is how you can turn on a computer on the same local area network using Wake-on-LAN. There are many Wake-On-LAN tools that can be downloaded on the Internet and of course we always try our best to find the easiest ones to use.


Do not just "shut off the power" on a PC running Windows or Linux...


Wiki has a good description of what is involved:
http://en.wikipedia.org/wiki/Wake-on-LAN

If you want to "log in" and restart the mining you need to put some thought into it. Hibernate may do the job for you as well -- that is built into Windows -- Hibernating on Command may be another issue...

There are also "Remote control" options -- like the one from ASUS tied into an ASUS Tablet -- a combination of "wake-on-LAN" and remote control could likely sort out most of the issues -- which have never been supplied.

If you really want some help -- give a better problem/situation description.

Cheers!