IET
Decrease font size
Increase font size
Topic Title: Replacing a light switch with a microcontroller
Topic Summary:
Created On: 16 May 2018 03:38 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 16 May 2018 03:38 PM
User is offline View Users Profile Print this message



MarkDaniel

Posts: 3
Joined: 15 January 2008

Hi,

My wife is very keen on Philips Hue smart bulbs and we have several in our house however it drives me mad that sometimes the switch is 'On' but the light is off (because the lamp has been dimmed with the app) or the switch is off and you can't turn the light on with the app (because the light has no power).

I want to replace the light switches in question with retractable switches which connect to a microcontroller and wire the actual light fittings to permanent live. When the momentary switch is pressed the microcontroller will always toggle the state of the lamp.

The light switches in question are wired with a single piece of twin & earth looped from the ceiling rose as is common in the UK.

I want the microcontroller to be in a convenient broom cupboard because I want access to be able to reprogram it I also don't really want controllers and power supplies hidden away between floors or in walls where they're more likely to catch fire unnoticed.

I've thought about lots of different ways of doing this but I think the simplest and least disruptive (in terms of access and decoration) is to
1) Rewire the ceiling rose to be connected to the permanent live and remove the connection to the switch cable
2) Cut the switch cable under the floorboards of the floor above and join the tail to a cable which will run the to microcontroller in another room. I was probably going to use Cat5 for this as I have loads lying around.
3) Replace the switch with a retractable one.

This should also be fairly easy to reinstate if/when I move out.

So my questions
1) Am I planning anything unsafe or inadvisable? Obviously you wont now be able to isolate the light fitting with the switch only the breaker but I assume that will be obvious from the type of switch.
2) Would any of this count as Part P notifiable or can I do it myself? (I'm a software engineer so not qualified for electrics)
2b) One of the rooms is a bathroom but it's a big bathroom and the switch lies outside Zone 2. Does that make a difference?
3) What kind of protection, if any, do I need for the low voltage switch cable? Is it ok to run this alongside the various mains cables that criss-cross the floor?

Sorry for a long rambling post, but hopefully it's clear.
Thanks for any advice.

Mark Daniel
 16 May 2018 04:32 PM
User is offline View Users Profile Print this message



mapj1

Posts: 10455
Joined: 22 July 2004

So my questions
1) Am I planning anything unsafe or inadvisable? Obviously you wont now be able to isolate the light fitting with the switch only the breaker but I assume that will be obvious from the type of switch.

If you keep mains and extra low voltages apart, there is no reason this cannot be done safely. However it is very unusual, and therefore you should probably go a bit OTT on the making it very clear and easy to undo if required. (it is possible in an emergency that it may not be you who has to undo it). Take pictures, leave a sketch map, maybe even install an 'override here' switch. Some sort of folder of 'how to pilot this thing' is worth creating. Avoid inaccessible cuts or joins. I might say put don't cut the switch line, just take your new stuff to a box behind or beside the rose, but how easy that is depends on the layout. I have been known to recess these in the ceiling behind or beside a light to allow some accessible magic when the floor could not be readily lifted (and in the odd desperate case, a double socket box and a blanking plate.)


2) Would any of this count as Part P notifiable or can I do it myself? (I'm a software engineer so not qualified for electrics)
Are you changing the consumer unit, adding more circuits to the consumer unit or working within 2 feet of the bath? If no, then non-notifiable. This does not absolve you from responsibility to do things responsibly, or to test your work before commissioning.
2b) One of the rooms is a bathroom but it's a big bathroom and the switch lies outside Zone 2. Does that make a difference?
as above
3) What kind of protection, if any, do I need for the low voltage switch cable? Is it ok to run this alongside the various mains cables that criss-cross the floor?
The cable should be rated to at least the highest voltage used in the thing it is tied to, or separated by a barrier rated to that voltage level. I suggest thin mains flex is cheap and effective. And I suggest not running it parallel for long distances if you are not good at removing picked up spikes pops and clicks before feeding them to your micro.

-------------------------
regards Mike


Edited: 16 May 2018 at 04:39 PM by mapj1
 16 May 2018 07:57 PM
User is offline View Users Profile Print this message



MikeLuker

Posts: 32
Joined: 01 February 2017

Hi Mark, I have actually done this with my house which is microprocessor controller by taking each switch wire back to an adaptable box with DIN connectors, and the LV CAT5 cabling connecting to the inputs of the processor it works well, also the state of the input can be monitored over WiFi, I just use a wall mount IPAD the surface mounting enclosure is only about 15 pound this can also act as a multi gang switch to control everything so it is easily achievable.
 17 May 2018 08:32 PM
User is offline View Users Profile Print this message



AJJewsbury

Posts: 16635
Joined: 13 August 2003

What kind of protection, if any, do I need for the low voltage switch cable?

Partly it depends on how well separated from mains voltage your control system is. If a fault could mean that mains voltage appears on your control side then it would be classed a functional extra low voltage (FELV) and then the wiring (and accessories) would have to be rated for mains voltage and any exposed-conductive-parts earthed.

To have simple extra low voltage wiring (e.g. CAT 5 cable) you'd need to achieve a Separated Extra Low Voltage (SELV) or Protective Extra Low Voltage (PELV) system - to do that all parts of the system need to have adequate separation from the mains - not just the PSU for the control system but all the means of controlling the loads - e.g. relays or triacs/thyristors.

- Andy.
 17 May 2018 08:57 PM
User is offline View Users Profile Print this message



Weirdbeard2

Posts: 310
Joined: 29 November 2017

Originally posted by: MarkDaniel

My wife is very keen on Philips Hue smart bulbs and we have several in our house however it drives me mad that sometimes the switch is 'On' but the light is off (because the lamp has been dimmed with the app) or the switch is off and you can't turn the light on with the app (because the light has no power).





I've thought about lots of different ways of doing this but I think the simplest and least disruptive (in terms of access and decoration) is to

1) Rewire the ceiling rose to be connected to the permanent live and remove the connection to the switch cable

2) Cut the switch cable under the floorboards of the floor above and join the tail to a cable which will run the to microcontroller in another room. I was probably going to use Cat5 for this as I have loads lying around.

3) Replace the switch with a retractable one.



This should also be fairly easy to reinstate if/when I move out.



So my questions

1) Am I planning anything unsafe or inadvisable? Obviously you wont now be able to isolate the light fitting with the switch only the breaker but I assume that will be obvious from the type of switch.

2) Would any of this count as Part P notifiable or can I do it myself? (I'm a software engineer so not qualified for electrics)

2b) One of the rooms is a bathroom but it's a big bathroom and the switch lies outside Zone 2. Does that make a difference?

3) What kind of protection, if any, do I need for the low voltage switch cable? Is it ok to run this alongside the various mains cables that criss-cross the floor?



Sorry for a long rambling post, but hopefully it's clear.

Thanks for any advice.

l


Hi are these the £30 each bulbs? I have no experience of these smart lamps , but what have you tried switching the switch off then on again?
 18 May 2018 12:38 PM
User is offline View Users Profile Print this message



MarkDaniel

Posts: 3
Joined: 15 January 2008

Originally posted by: AJJewsbury
To have simple extra low voltage wiring (e.g. CAT 5 cable) you'd need to achieve a Separated Extra Low Voltage (SELV) or Protective Extra Low Voltage (PELV) system - to do that all parts of the system need to have adequate separation from the mains - not just the PSU for the control system but all the means of controlling the loads - e.g. relays or triacs/thyristors.


I think I'm fine with this being SELV then, the only link between the micro and the lamp is wireless (WiFi to the hub then ZigBee back again)

Originally posted by: Weirdbeard2

Hi are these the £30 each bulbs? I have no experience of these smart lamps , but what have you tried switching the switch off then on again?


They're mostly the simple white ones which are a bit cheaper than that.

Yes switching off and on again does work to get it on which is only mildly irritating. The most irritating is when I switch it off at the switch by force of habit then realise that will prevent it working from the app then switch it back on again then get have to get my 'phone out to then find the app to switch it off again.

Thank you all for your helpful comments and advice especially the reminder about noise rejection on the long low voltage lines. Seems like this is a very possible project, I've ordered some bits and I'll let you know how I get on.

Thanks,
Mark
 19 May 2018 01:25 PM
User is offline View Users Profile Print this message



Weirdbeard2

Posts: 310
Joined: 29 November 2017

Originally posted by: MarkDaniel

Originally posted by: Weirdbeard2

Hi are these the £30 each bulbs? I have no experience of these smart lamps , but what have you tried switching the switch off then on again?


They're mostly the simple white ones which are a bit cheaper than that.

Yes switching off and on again does work to get it on which is only mildly irritating. The most irritating is when I switch it off at the switch by force of habit then realise that will prevent it working from the app then switch it back on again then get have to get my 'phone out to then find the app to switch it off again.


Thanks for the reply
If you look up your chosen bulb it looks like you can get a wireless switch that you could stick next to the regular light switch?
Statistics

New here?


See Also:



FuseTalk Standard Edition v3.2 - © 1999-2018 FuseTalk Inc. All rights reserved.

 
..