Scary Mains Power Stuff.... - Page 1
Forum section: electronics / beginners

author: unknowndomain
author_rank: Regular Contributor
timestamp: August 18, 2014, 11:03:25 pm
content: Hey,I am a physical computing technician at a university in the UK, I started a few months ago, and students appear to have been using big DIN rail relays to power projects... Generally I am very cautious of mains and avoid it all costs, but students seem to be using it with some regularity in projects to power large industrial fans, heat lamps, all sorts!After a couple of months in the role myself and my fellow new-starter have seen a couple of terrifying instances, such as non-VDE screwdrivers on live terminal block screws... live exposed wires... waiting for an accident, and no opto-isolation, just waiting for a crossed wire to send 240V up the USB into an aluminium MacBook Pro housing...The students are adults but they obviously don't seem to be able to partition the live mains and the low voltage side of things and treat it all like it's just plug and play USB...Going forward these devices are being taken out of action, I have seen enough to know this isn't going to end well, and I am not prepared to see someone electrocuted in my area.We've obviously heavily re-educated these students but we're looking for a solution that doesn't involve mains being touched by students... They don't really need to cut power leads in half and splice in relays, they just need a TTL controllable mains lead...We've looked at the Power Switch Tail but the 220V (UK compatible) versions don't come assembled, or with any leads, so we were thinking of using some of those 2 channel relay modules you see everywhere on eBay/DX...http://www.ebay.co.uk/itm/5V-2-CHANNEL-BOARD-RELAY-MODULE-SHIELD-FOR-ARDUINO-ARM-PIC-AVR-DSP-ELECTRONIC-UK-/271450520198?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item3f33b63a86They seem to have nice beefy mains traces, opto-isolation, flyback diodes, NC and NO connectors, and all powered by TTL voltages which is nice. We could box these up and put a plug and socket on them and keep the mains out of sight.My concern is that these are a bit of an unknown quantity, as I say above they seem decent but I am not an EE or electrician, so I don't know what copper weight and separation distances are needed... Obviously there is no isolation slot, but we are talking mains, not HV....Thoughts, ideas, suggestions, feedback...Thanks so much!Tom

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 18, 2014, 11:22:38 pm
content: I'm amazed that this can happen in a college, where 'elf & Safety can reach ridicuous levels - I assume they just never found out about it....One possible option is those radio-controlled socket modules, though you'd need to find one that has discrete on & off codes, not a toggle.http://www.amazon.co.uk/s/?ie=UTF8&keywords=remote+control+power+sockets&tag=googhydr-21&index=aps&hvadid=45770907368&hvpos=1t1&hvexid=&hvnetw=g&hvrand=17474257671417358064&hvpone=&hvptwo=&hvqmt=b&hvdev=c&ref=pd_sl_9bq6y3p4h5_bThis solves the isolation problem, and is off-the-shelf. Shouldn't be hard to hack the remote to control it, or figure out the protocol and use a generic 433Mhz Tx module - I'm guessing most of these will be on 433.

author: unknowndomain
author_rank: Regular Contributor
timestamp: August 18, 2014, 11:27:37 pm
content: Yeah, it makes me sick each time I think about seeing the student using that screwdriver on those live terminals, I nearly screamed at them "WHAT ARE YOU DOING?!".... It's not their fault I guess...Either way, these remote switches were in my mind but having had these in my own home, they are pretty awful, even with the transmitter near them they don't always respond... definitely looking for TTL control direct into the Arduino...Thats why I was thinking about those el'cheap-o relay modules, if we're clever about how we house them they even have two lives! first relay fails we can switch to using the other, and it's cheap to replace the boards...The Powerswitch Tails will get hit for import duty and they are out of stock, etc. etc...What do you think about those boards you saw, totally dodge?Tom

author: LukeW
author_rank: Frequent Contributor
timestamp: August 18, 2014, 11:37:51 pm
content: I would start by getting a copy of the relevant UK engineering safety standards that cover galvanic isolation between mains systems and low voltage systems. It's all pretty similar, whether it's UL standards or Australian standards or whatever, but you should check exactly what you're required to have. For example, standard IEC60950-1 as it applies to AC-DC power supplies found in information technology (IT) and industrial equipment requires products to pass an input-to-output isolation test of 3 kV AC.A typical mains SMPS or other system has a "hot side" and a "cold side", and only certain components that span across the gap between them, such as transformers, optocouplers, maybe a Y-class HV capacitor, or maybe a relay. Typically, those components are manufactured to meet certain standards in terms of their high-voltage isolation between one isolated "side" and the other, and you check this in the datasheet or from the component manufacturer.As well as checking the high-voltage isolation of those individual components, you should also look at the wiring that is used within your device enclosure, things like connectors, heatsinks and terminals that are used, to ensure that a sufficient isolated "firewall" is maintained between the high voltage side and the low voltage side. Then there's the PCB layout - there should be a sufficient creepage gap with no copper tracks or pour, which passes under the transformer, optocoupler etc and clearly defines the border between the HV and LV sides. If you look at an old PCB from a mains system that has a SMPS from a consumer product or something, you should clearly see this.Buying a Wun Hung Lo eBay relay board probably isn't that helpful. Do they provide a datasheet for it, or test data showing conformity with UL (or whatever) standards?Note that they're using relays plus optocouplers too. That shouldn't be needed, you should only need a relay - IF the relay has a sufficient isolation rating.Usually, even without the relay datasheet, you can tell from quick inspection - a well isolated relay has the coil pins all well away from the contact pins, at the other side of the relay, and if it is one of the ones with one of the contact pins right next to the coil pins, then it is not well isolated. You can see in the photo that these relays are in that category, not well isolated.People often use the relay-plus-optocoupler approach because they're using cheap relays that won't pass relevant HV isolation tests - but for this to work, the optocoupler has to have an appropriate isolation rating, there has to be a creepage gap under the optocoupler (which you don't have on those boards, you can see that there are other SMD components around the optocouplers which are "across" the optocoupler where there should be a gap with no copper and no components).If you want to use a relay plus use an optocoupler as well, then you need a second power supply which is HV isolated, in order to provide power to the relay coils in the "hot" part of the circuit after the optocoupler. If power to the relay coils is just connected to the input terminals on the "cold" side of the board with the control logic signals, then the optocouplers are completely pointless because their isolation is bypassed! So the cowboy who has tried to be "cheap" by using a cheap relay suddenly doesn't look so clever. That looks like exactly what they've done on that eBay board.Better to spend a little more money on a decent relay with good isolation, and then you can just directly drive 5V (or 12V or whatever voltage, with appropriate current - probably need a small transistor) into the relay coils with safety and confidence that it's isolated.

author: unknowndomain
author_rank: Regular Contributor
timestamp: August 18, 2014, 11:46:19 pm
content: Hey Luke,Thats basically what I am asking here, I don't have the expertise to understand those safety standards, half of that sentence didn't make sense...What I am hoping is that there is an off the shelf module, but they all seem to be of varying safety standards... and I am not looking to design my own kit.Tom

author: Fsck
author_rank: Super Contributor
timestamp: August 18, 2014, 11:54:28 pm
content: Quote from: unknowndomain on August 18, 2014, 11:46:19 pmthere may also be a liability issue with wun hung lo gear as well.

author: unknowndomain
author_rank: Regular Contributor
timestamp: August 18, 2014, 11:56:14 pm
content: Sure, but I don't know that the PowerSwitch Tails have any kind of regulatory approvals to be honest. Maybe Mike is right and something more expensive like a LightwaveRF or Zigbee type device might be better... Just seems like a horrible solution to a common issue...

author: IanB
author_rank: Super Contributor
timestamp: August 18, 2014, 11:59:39 pm
content: Couldn't you perhaps take the relays the students have been using and put those in a box with plug and socket? What are they using to switch the relays?

author: unknowndomain
author_rank: Regular Contributor
timestamp: August 19, 2014, 12:04:22 am
content: An Arduino...I don't know exactly right now as it is 1AM and I am not at work... but I would say that we had about 5 of these. & their related socket modules...http://www.rapidonline.com/electronic-components/12a-miniature-plug-in-power-relays-521645I guess it's not knowing enough about this, we really need an electrical engineer, but thats not really an affordable solution..Tom

author: tautech
author_rank: Super Contributor
timestamp: August 19, 2014, 12:08:59 am
content: QuoteYou/the lecturer/the employer/the university all have a DUTY of care to the students.Cost of compliance to any local legislation is irrelevant.It seems lecture practice/methodology is seriously flawed.Has your HOD/dean dropped this in your lap?It is his responsibility too.Surely local safety authorities will have guidelines for these practices.The course for sure is necessary, but it must be safe and teach safe practiceIf it is as bad as you make out, the course should be shut down until made safe.EditAnd I suppose you have a degree, I don't, but if I saw such unsafe practice in a place of learning I would run a mile.

author: IanB
author_rank: Super Contributor
timestamp: August 19, 2014, 12:10:00 am
content: Those relays look properly safe, if correctly installed.There is no electrical engineering department at the university with some people who might help you out?

author: IanB
author_rank: Super Contributor
timestamp: August 19, 2014, 12:12:56 am
content: Quote from: tautech on August 19, 2014, 12:08:59 amThis kind of situation typically occurs with research students, who are undertaking supervised, but self-directed learning. Undergraduates would not normally be let loose in such a manner (?)

author: unknowndomain
author_rank: Regular Contributor
timestamp: August 19, 2014, 12:16:43 am
content: @ tautech I think that is a more than a little unfair.,As soon as we saw this going on myself and my colleague put a stop to this activity immediately, I think it is pretty plain to see that if we can't comply with the legislation we won't do the activity until it can be complied with.The purpose of this post is to find off the shelf solutions that bypass the problem by using a consumer/hobbyist product.I think it's unfair to presume we are compromising safety and our duty of care over the students for cost, and that is something you've manufactured entirely.@IanB I don't feel comfortable with this, and it would still need something to drive those.... We are an Art School/University so no engineering department I am afraid. They were international postgraduate students in both instances but that doesn't mean that the same situation wouldn't apply to undergraduates.

author: tautech
author_rank: Super Contributor
timestamp: August 19, 2014, 12:27:18 am
content: Quote from: unknowndomain on August 19, 2014, 12:16:43 amThat's a relief.This was not clear in posts to this point.Start with Master isolators at each work station if not already there.Have you no Power electronic post-grads that could knock together a solution?

author: unknowndomain
author_rank: Regular Contributor
timestamp: August 19, 2014, 12:30:42 am
content: No this is an art school, they are more focused on quick prototyping of ideas, I doubt anyone who understood the danger of live 240V mains would have even pointed a screwdriver any where near the unit let alone playing about with screws...I am looking at these wireless ones Mike suggested as they make me rest easy that not only can are they sealed boxes, they are made by someone else, so they are no more dangerous than your average appliance, where as something I have to solder means I am responsible for making it wrong, and given I don't have any suitable qualifications in electrical engineering I think that would be a bad idea.

author: Simon
author_rank: Unknown
timestamp: August 19, 2014, 05:55:48 am
content: This is art ? so why are they using the mains unless they are being properly taught. The number one rule is to worship the mains over any "god" as you don't get a second chance although I have have my life saved twice by RCD's and it was dodgy wiring that caused it. What worries me is why on earth are they putting screw drivers to live terminals ? I think the first main problem is education, they may well need to use the mains and in that case they need training and to pass that training before they are allowed to work. Sadly this is what you get from things like the arduino particularly as it advertises itself as for artists etc and tries to make light of the technicalities, that's all well and good providing your under 50V after that you should be if anything competent in working with mains.You best bet would be to make up some low voltage driven relay boxes with unnecessary live parts out of sight, but ultimately if they are working on mains then they need training, it's that simple, this is the problem these days, we want the results but we won't do the work.

author: vk6zgo
author_rank: Super Contributor
timestamp: August 19, 2014, 07:33:11 am
content: Don't mess around with EEs,find a Licenced Electrician.They are a bit doctrinaire about "The Rules",but they will help you err on the side of caution.Your Art guys shouldn't have to mess with the Mains,& a "Sparky" should be able to recommend (or make ) some useful Mains interfaces.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 19, 2014, 07:44:47 am
content: Quote from: unknowndomain on August 18, 2014, 11:27:37 pmI'm sure you can find some reliable ones - it's not rocket science to make this stuff work.I think this will be by far the simplest, cheapest and safest route.

author: unknowndomain
author_rank: Regular Contributor
timestamp: August 19, 2014, 08:15:35 am
content: @Simon Please don't lecture me, read the post, and you'll see that I am the one that stopped this practice, not the one that permitted it. Clearly I have expressed a desire for recommendations that are safe as I am not convinced by the Arduino communities go to product PowerSwitch Tail....@vk6zgo I will see if we have an electrician on staff, I have spoken to an electrician before and not gotten far.@mike I think this is the best route, we've had a couple of those Philips Hue lights that use Zigbee, I was hoping there would be something simple like this, but the Zigbee seems rare on Arduino... 433MHz stuff seems a bit simpler... possibly even just hacking the remote control with some tiny reed relays to press the buttons might do the job.Shame there isn't a product out there which lets you wire up a low voltage extension switch to a socket.

author: Simon
author_rank: Unknown
timestamp: August 19, 2014, 08:21:57 am
content: I'm not lecturing you, I'm lecturing the person that allowed this to happen before you came on the scene. I'd also question the intelligence of the students, I mean seriously ? putting screw drivers into live terminals ? We all know that the mains is deadly we are taught as children, I only do this if absolutely necessary and with an insulated screwdriver or in a very quiet lonely room where no one can nudge or disturb me with an RCD connected.Are the students using RCD's that would be a reasonable basic precaution but is still not an excuse for them to be reckless. These people won't survive ling in the real world and once they are in the real world they can't blame anyone else for their stupidity.

author: unknowndomain
author_rank: Regular Contributor
timestamp: August 19, 2014, 08:27:58 am
content: @Simon the standard of education is a real problem at University level because of dumb stuff like this, unfortunately we still have to teach them a lot of what you and I consider common sense... using a hammer to put in a screw is very, very common...That said perhaps it is because not everyone is technically minded. I was always interested in what my dad was doing as a kid, and wasn't one hanging out on the streets messing about, so perhaps that makes me the strange one?Either way these LightwaveRF units look relatively cheap... £10 a plug and can be controlled using a 433MHz transmitter which are super cheap.Ideally there would be a UK PowerSwitch Tail with some kind of certification, rather than a disclaimer at the bottom stating "Our liability is limited to the purchase price of this product only. By using this product you agree that PowerSwitchTail.com, LLC can not be held liable for any damages or injuries resulting from use, misuse, or repair."Disclaimers aren't valid in the UK...

author: DenzilPenberthy
author_rank: Frequent Contributor
timestamp: August 19, 2014, 08:31:43 am
content: Hi,It does seem after a little bit of googling that there isn't a simple 5v mains switch available as a pre-made off-the-shelf unit. It looks like if you want to go down that route you will have to use radio controlled ones. This would be the best route for you to go down rather than assembling stuff yourself because, as you've pointed out, you do not have access to a 'competent person' to wire stuff up for you.I run the electronics workshop in the physics department of a university so I'm used to that feeling of 'oh my god what are you doing, put that screwdriver down!'What I would do here is put one of these in a box with a fused IEC inlet and an IEC outlethttp://uk.rs-online.com/web/p/solid-state-relays/2288612/The input to this will work directly off an Arduino pin and it has 4kv isolation from inputs to mains side. I'd put it either inside a ventilated box with a heatsink or bolted to the wall of a solid diecast box. - See the graph in the datasheet for temperature derating. Either way the box must be earthed.I'm sure you could find an electrician or a local control engineer to wire a few of these up for you.

author: darko31
author_rank: Regular Contributor
timestamp: August 19, 2014, 08:42:00 am
content: Do your students really need to work with mains voltage? In class, in high school, we've worked mainly with 12V DC. If there was any mains voltage, it was in distribution cabinets with big mechanical switch which was not to be touched until the lecturer checked the wiring and turned it on.

author: Simon
author_rank: Unknown
timestamp: August 19, 2014, 08:55:24 am
content: what you need is a closed box with a relay switching your mains that way you get isolation from the mains and your just putting out 5 or 12v from your circuit to drive the relay that switches the mains inside a closed box with a socket on it. Anything being plugged in needs a plug already on it or it needs wiring for them by a competent person or they need teaching how to wire a plug with perhaps it being checked by you before they close it up and use it.Yes i recently stuffed a L3 electronics course back at the provider because it was either wooly or factually incorrect and served no purpose. I am afraid this is what you get from independent study institutions that are not closely regulated by government or at least by a single body. Most education centres are competing to make courses easy to pass to try and induce more students and money to come next year. I never study for a pass, i study for the knowledge and thus far am entirely self taught.

author: Wilksey
author_rank: Super Contributor
timestamp: August 19, 2014, 10:53:16 am
content: The level of University intellect / common sense must have gone down an order of magnitude since I was there!Monkey see monkey do is kind of what you would expect from a school kid, not a Uni student, but it has been 10 years or so since I attended such educational establishments!It sounds like a simple problem, and it is something that I have dealt with in the past for personal projects, I bought a solid state relay, a small-ish box (big enough for a 13A Socket), got a 13A socket from Screwfix, an IEC inlet, and found some bulk head mount terminal blocks from somewhere, perhaps Ebay, its been a while, I used a 5V relay to drive the SSR, and put the 5V to the terminal block and used it for switching the mains on / off.I would strongly suggest, by hearing your own doubts about what you are doing and how to do it that you consult a professional before attempting anything though, as it is literally a matter of life or death with mains electricity.From what I have read from previous posts (and the same is true for this one), nobody is "having a go", it's more of a general concern for yours and your students safety!!You can take our advice if you wish to, or leave it, it's up to you, but the number 1 rule about mains is if you don't know what you are doing, don't touch it!

author: vk6zgo
author_rank: Super Contributor
timestamp: August 19, 2014, 12:16:59 pm
content: Quote from: unknowndomain on August 19, 2014, 08:27:58 amI shudder for the future of Art,if Artists are no longer interested in practical matters.Artists were in the forefront of development of many of the processes which are the foundation of modern Industrial practice.For instance,the moulding of large metal objects was first done by sculptors.Paint pigments were part of Art technology for many years prior to their Industrial use.

author: Simon
author_rank: Unknown
timestamp: August 19, 2014, 12:26:26 pm
content: I think the bottom line is that if an artist is going to be working in other fields as well they need to be knowledgeable in those fields, being an artist is no cop out. You either know how to do it yourself or you get someone in to do the techy bits for you under your artistic direction. It's like expecting an architect to physically build the house as well as design it.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 19, 2014, 12:42:56 pm
content: This looks pretty close to exactly what you want:http://www.sensormetrix.co.uk/product.php?id=120&rid=&rpage=searchThere are a few ethernet controlled productshttp://digidave.co.uk/jshop/product.php?xProd=293http://digidave.co.uk/jshop/product.php?xProd=293

author: con-f-use
author_rank: Unknown
timestamp: August 19, 2014, 12:44:05 pm
content: Why don't you guys design a simple relay board yourself and have it manufactured?

author: Simon
author_rank: Unknown
timestamp: August 19, 2014, 01:11:56 pm
content: Quote from: con-f-use on August 19, 2014, 12:44:05 pmbecause in this stupid country we have to worry more about being sued in case someone does something stupid and hurts themselves and then blames you although it was down to their own stupidity......

author: SL4P
author_rank: Super Contributor
timestamp: August 19, 2014, 01:40:35 pm
content: String these words together in a paragraph for a requirements doc...IsolationSelf-ContainedStandards compliantDouble-insulated construction, or Ground mandatory before operation.Continuous Earth path to connected downstream devicesMains 90-250VAC 50/60Hz ratedSafety enclosure (shatterproof / Tamperproof / IP-rated for splash/ingress)RCD/ELCB/Safety Switch included within deviceoptically isolated control (specify the interfaces expected)PWM control optional e.g. Triac/SSR vs RelaysDoube-pole option if relays used.RFI/EMI compliantFeedback of output stateVisible indication of output state (LED/neon etc)Fail-Safe functionality - no input = default OFFPortable as neededRe-usable for future projects.

author: Simon
author_rank: Unknown
timestamp: August 19, 2014, 01:59:05 pm
content: your point being ?

author: kingofkya
author_rank: Regular Contributor
timestamp: August 22, 2014, 10:53:11 pm
content: Hackaday had a a good post about a really simple way to control the mains. One of thous modules that turn off went the sun comes up plus a led:)http://hackaday.io/project/46/log/2548http://hackaday.io/project/1047-Opto-isolated-AC-Mains-SwitchAlso you may want to show then alliexpress and ws2811 they might have more fun with thous and there 5-12v

author: rolycat
author_rank: Super Contributor
timestamp: August 23, 2014, 12:35:53 am
content: Why not use one of those 'energy saving' mains socket strips with USB leads?For example:http://www.amazon.co.uk/Ecotek-Standby-Saver-6-Way-Socket/dp/B0017PTD3Morhttp://www.ebay.co.uk/itm/141314890586This is a US version:http://www.ecostrip.com/These use the USB power to energise a relay which switches the mains sockets. Turning off your PC also turns off the peripherals.They aren't that great for their intended purpose since many PC USB ports remain powered from the standby supply when the PC is shut down, but I imagine a suitably buffered 5V signal from an Arduino or whatever would work perfectly well.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 23, 2014, 08:07:18 am
content: Quote from: rolycat on August 23, 2014, 12:35:53 amQuoteWTF?

author: SeanB
author_rank: Super Contributor
timestamp: August 23, 2014, 08:20:02 am
content: Not allowed to use a credit card til over 18 so if you are using parents card they are covered if you kill yourself.

author: rolycat
author_rank: Super Contributor
timestamp: August 23, 2014, 02:26:56 pm
content: Quote from: mikeselectricstuff on August 23, 2014, 08:07:18 amThat is weird - that warning is usually attached to bladed tools, although it's hard to imagine a teen gangster terrifying the populace with one of these:http://www.amazon.co.uk/Faithfull-1099-Piercing-Saw/dp/B000297TEY/

author: SeanB
author_rank: Super Contributor
timestamp: August 23, 2014, 02:40:04 pm
content: Probably boilerplate attached to any mains operated equipment. Your child could plug it in and shock themselves, so if the adult ordered it the responsibility and liability falls on them instead, as they are deemed to be the one in control.

author: rolycat
author_rank: Super Contributor
timestamp: August 23, 2014, 02:59:22 pm
content: Quote from: SeanB on August 23, 2014, 02:40:04 pmNope, you can buy mains powered equipment in the UK at any age. None of the other mains sockets I looked at on Amazon UK have that message, although a lot of bladed tools do.