Re-engineering with an 08M

BCJKiwi

Senior Member
Remote switch upgrade with an 08M

Have two remote light switches which do not work properly in that the switch requires repeat activation to get the light to turn on. The light usually flashes momentarily for each activation and will only stay on after repeat activation - any number from 1 to 8 or so.

These are commercial products for which I have found no alternative. We have two of these switches and they both act the same. We have had them replaced (twice) under warranty but all 6 switches behave the same.

Have decided to re-engineer with a Picaxe and SSR to replace the Triac and array of diodes, transistors, dual flipflop and hex inverter chips that are currently employed to provide the latch and the signal to the the triac trigger.

The revised circuit will be installed inside the existing box which fits into a standard wall box on a standard faceplate.

Proposed circuit is shown below. The components to the right of the vertical dashed line are existing with the exception of the SSR which is currently a triac. The SSR proposed is a zero cross switching AC to 380V with a 3-15VDC control so can be driven direct from the 08M.

Obviously space is at a premium which is the only reason the existing DC supply being derived from the AC Mains is being retained. It is possible that once assembled the DC voltage may be too high so would appreciate suggestions on the best way to adjust that (change the 1M and/or 330R value?).
Any other constructive suggestions appreciated.
Thanks
 

Attachments

Last edited:

SD2100

New Member
Not wanting to be a wet blanket but with the circuit not being isolated from the mains isn't the program download connector a bit dangerous, can't the 08m be programmed elsewhere then inserted into the unit while the powers off. This also reduces the number of parts and space on the board and you would only need a 10k pull down pin2.
 

manuka

Senior Member
"Remote light switches" & a commercial unit you say ? As I'm also in NZ please reveal the maker.

It may be worth your/our while outlining such tedious matters as the distance over which you're working, switching conditions,cleanliness of the sensor and even if the IR sender has dirty keypad contacts. Numerous TV remotes give/gave such triggering woes! A periodic removal of non conductive greasy film on the pads would often restore reliability. These dead boring aspects often knobble many designs of course ...
 
Last edited:

Dippy

Moderator
Only a quick look so I may have gone cross-eyed.
I agree with Phil. And a dotted line doesn't make it low voltage ;)
To be honest, I can't follow how it derives it's power for PICAXE, but in any event it is Not isolated. So, when you connect your download cable to your PC or your tongue - BANG!

I had a similar thing with a mains powered Energy Meter cicuit with a PIC.
I had to make an opto-isolated programming interface.

Be careful. I've only had a quick squizz, so may have got it wrong, but it seems that Mains Voltage is the reference in this circuit. :eek:
0V is relative. In your case it'll be MainsV - ~5V.
 

hippy

Technical Support
Staff member
Danger Will Robinson

Do not include the download interface - It creates an electric shock hazard with a serious risk of electrocution and may instantly destroy the PC the download cable is plugged into.

Similar risks apply to connecting scopes and any other mains powered equipment.
 

westaust55

Moderator
Only a quick look so I may have gone cross-eyed.
I agree with Phil. And a dotted line doesn't make it low voltage ;)
To be honest, I can't follow how it derives it's power for PICAXE, but in any event it is Not isolated. So, when you connect your download cable to your PC or your tongue - BANG!

I had a similar thing with a mains powered Energy Meter cicuit with a PIC.
I had to make an opto-isolated programming interface.

Be careful. I've only had a quick squizz, so may have got it wrong, but it seems that Mains Voltage is the reference in this circuit. :eek:
0V is relative. In your case it'll be MainsV - ~5V.
Concur with Phil and Dippy.

The control voltage is derived by virtue of the inductor introducing a phase shift relative to the AC line / the in-phase voltage from AC main via the 100R resistor.

I do not believe the 330R resistor will do much to reduce/control the voltage. As the 08M will operate down to 3V (at 4 and 8 MHz) as seemingly will the SSR, why not use a lower voltage zener eg 4V7.

Again, reiterate that the whole control circuit is at mains voltage so would exclude any control/prograqmming connection to the outside work such as the PC.
 

Dippy

Moderator
I'm not sure as to BCJ's electronics/electrical experience - after 1500 posts I assume he's a clever chap.
For experienced users/constructors it is possible to make an opto-isolated programmer interface.

Newbies and the inexperienced smartass should steer clear of mains (derived) powered stuff. I don't mean to sound snobbish (sorry ValueAdded) but this really is a case where novice cockyness and naivite could end in tears.

Some scopes (and other DMM) are isolated and can work (read the manual). However, this does NOT prevent shocks.
The designer should pay careful attention as to the voltage levels in the circuits and the PD to whatever they wish to connect - including fingers!
 

BCJKiwi

Senior Member
OK will eliminate the program interface for safety reasons. It would not have been used to program with the Mains connected and is inaccessible when assembled but simpler to leave it out anyway.

As indicated, This is a commercial product (HPM out of Aus) and all the issues being raised re mains, safety, isolation etc etc are present in the existing circuit so nothing will be any less safe than the existing system as far as I can determine. It is fully enclosed when in use. It is a light switch so distance is not great but it does seem to work over 10 - 15 metres quite happily when new. The product literature indicates a range of 9 Metres but in use it is not expected to be more than 3 to 4 metres.

It works reliably when new but slowly stops latching on. It is not an issue related to the IR (which appears to work marginally better than the Tact switch).
The Tact switch actually has one of those 'clicker toy' type inverting discs between the outer button and the tact button to reduce/eliminate contact bounce. There is also a silicon moulding betwteen the outer button and the clicker disc so the internals are very clean being effectively sealed from the effects of the environment.

The idea here is to remove a lot of discrete and SMD logic processing chips and replace them with a PICAXE.

The dotted line is simply to indicate which parts of the existing circuit are being retained and which are new - after all the low voltage supply, IR and tact are all on the 'other' side of the line anyway!
 
Last edited:

Dippy

Moderator
Sounds wise.

If commercial won't you have to have it tested by some kind of Approvals body? (Regardless of whether it has the same function or stuffed in the same box as the previous one).
 

hippy

Technical Support
Staff member
Have you analysed how the circuit works ? As best I can see the SSR will short Live to Load and could starve the circuit of power. It may work as per the thyrister, only switching on a while after crossover and allow some part of the mains cycle to keep the 220uF charged, but I have no experience of such circuits in-line with load and honestly don't know; I'd have expected the thyrister to be phase controlled and synched to mains crossover.

One thing which worries me is that a commercial product is failing and that may suggest a fundamental design flaw which replacing the controller part may not resolve and could even make worse.

On the IR sensor; should there not be a pull-up for the output ? The TSOP usually used with PICAXE is open-collector.

Also, shouldn't there be a fuse somewhere in the circuit ?
 

fernando_g

Senior Member
My two yen on the subject; and I'm not rehasing the safety issues.
you are driving an SSR from 5volt with 10k in series?
Assuming that its input is an LED from an optocoupler ( a reasonable assumption), all you have left to drive it is ~ 0.4 mA. Sounds kind of borderline, unless it is specified to work at such low drive currents.
Do you have the SSR's part number?
 

BCJKiwi

Senior Member
@ Hippy,
You may well be right re the thyristor. In the existing circuit, my understanding is that the 68nF cap, and toroid are all to do with phase control and integrate with the Triac trigger (removed in the new circuit) to control the phase timing on the Triac.

It has never been clear to me why the circuit is not reliable and the manufacturers obviously have no idea either as they have not changed the design even though it is not reliable. My money is on the mess of inverters and flip flops which are are providing the latching.

The other option is to leave the triac and triac trigger in place and drive the triac trigger from the PICAXE. I opted for the SSR as it removed the possibility that the triac switching may have been part of the problem.

The IR receiver is a Vishay TSOP 1738. The datasheet specifies the output must not be held below 3.3V continuously which rules out a pull down. The unit incorporates a preamp and delivers a supply voltage level (5V) output when triggered.

@ fernando_g
placed the 10k in the control line to the SSR to provide current limit protection but had not really thought much about the value. The proposed SSR requires 15mA so the value is obviously not correct. The SSR is opto isolated so will just remove that resistor altogether.

Revised proposed circuit:-
 

Attachments

Last edited:

manuka

Senior Member
HPM you say- is it the item below? One assumes such an industrial giant as HPM has done their design homework,if only for initial certification. Hence again I'd first recommend a close inspection of the IR contact pads. Over the decades I've had any number of otherwise A1 appliances fail due to such boring woes.

The working environment may well be an issue too- EXACTLY what are your conditions? Outdoor? Backyard? Sheltered? Any insects? Cobwebs? Dirt? Moisture? Leaves? Vandals? UV light clouding the sensor plastic? Type of light - CFL/filament? Yeah yeah yeah - you've checked all these, BUT how long after installation does failure occur?

As it happens I've been pondering assorted remote controlled outdoor lighting myself (it's winter "down under") & have been gobsmacked by developments with low voltage LED systems. - some are almost evil in their brightness.It's Haitz's Law (considered the LED counterpart to Moore's Law) at work of course "- every decade, the cost per lumen falls by a factor of 10, & the amount of light generated per LED package increases by a factor of 20". Both Bunnings & Jaycar stock a great range (many solar powered)-you can waste hours musing approaches,possible hacks & fresh applications. Stan.
 

Attachments

Last edited:

BCJKiwi

Senior Member
Yes that's the one.

It is a very mundane home room lighting application.

The unit is designed for incandescent, flourescent, Dichroic halogen and compact flourescent lamps. There is a filter on the plate in front IR unit which presumably is designed to handle all the ambient lighting issues.

The behaviour was the same on the original incandescent bulbs as it is now with CFLs.

As already advised, the unit is effectively sealed and there is no issue with dust, dirt or poor connections. There is no dust inside and the solder joints are good and not even tarnished.

Also as already advised the lights flash each time the button is pressed or IR triggered - the issue is not at the input side, it is that the momentary nature of either PB or IR input is not being latched properly. Even if the PB is held closed, the light does not stay on.

Outside LED lighting systems are not relevant to this application.
 

MPep

Senior Member
Looking at the cct, you have the Neutral not connected, therefore you do not have a steady power supply to the PICAXE.
It would appear that the PSU is only available when the Load is switched OFF(, or is it ON?).

Is this correct? I doubt it! Please revise this part of the cct.

Also a 1M resistor supplying the Zener doesn't sound right either.
Better regulation of the 5V line would occur if a higher value zener were used, then feeding a LM78L05 or some such method. But you must allow for enough current to be derived from the Mains, so that the LED will indeed switch on.
Also, you will still need a resistor for the LED (in the SSR), unless it is designated as a Logic-Level Input.

Use this as a reference: http://www.discovercircuits.com/DJ-Circuits/offline5v.htm. A good description accompanies the circuit.
Think of it this way, the capacitor acts as a resistor. Therefore this limits the maximum current that can be supplied.

Edit: I had actually wanted this website as an example: http://www.aaroncake.net/circuits/supply5.asp
 
Last edited:

BCJKiwi

Senior Member
1. The SSR is a must turn on at 3V and 15mA draw so could include an R to limit to 15mA.

2. The DC supply works now as shown (it is the original). The DC is available whether or not the Triac is on. It may be that the circuit relies on the Triac leakage current to keep the 220uF cap sufficiently charged. A minimum load is specified on the AC output (presumably to ensure the Traic does not stay on).

There are many transformer less regultor designs around. The existing circuit uses the well proven Cap and Zener regulator and see no reason to change it other than perhaps lowering the Zener value slightly.
 
Last edited:

boriz

Senior Member
Or you could use one of these:



IR TX > Picaxe RX > two servos with 'fingers' to operate the lightswitch. Completely isolated :)
 

MPep

Senior Member
Ahh, Boriz,

An interesting device you have found. Or was that a photo from your home??
:eek: If so, you have one VERY understanding missus!!!
 

Dippy

Moderator
If you think that's weird, you should see Boriz's remote control toilet flusher :)

Well, I'm glad the PSU side of things is OK, though I too am confused by the 1M resistor from the bridge.
I'm surprised this design (with the given values) gives enough oomph to work.
But, if it works reliabley then that's fine.

The load; is it a light bulb where people can remove it and shove their fingers into the fitting?
 

boriz

Senior Member
It’s on my living-room wall. I like it. Note, at the time the photo was taken, I had no 08Ms, so built the PCB for the 08M but used a 14M-to-08M converter. And yes, I do have plans to make my bathroom equipment all non-contact. Proximity/hand wave sensors for toilet seat, toilet flush, water taps and soap dispenser.
 

papaof2

Senior Member
yes, I do have plans to make my bathroom equipment all non-contact. Proximity/hand wave sensors for toilet seat, toilet flush, water taps and soap dispenser.
I see no mention of the touchless toilet paper dispenser, which would limit the number of sheets per request (counting sheets by sensing the perforations) and the number of requests per use ;-)

John
 

BCJKiwi

Senior Member
Back On Topic

I've ordered a few parts;
SSRs
LP2950-5V regulators (should run from the 5.47V! as they only require max .22V overhead!)
BX846v2 Zeners in case I need some more head room for the LP2950 regs.

The neutral terminal is provided on the board but is there as a convenient Loop for wiring up and does not connect to anyting on the board.

However as it is present, it could be connected so if the circuit as proposed (see version 2a attached) does not work, then it would be possible to re-engineer more extensively as in the second circuit shown (ver 3).
 

Attachments

Dippy

Moderator
I suggest you get yourself a copy of AN954 from Microchip website.

You'll see how to make robust transformerless PSUs and note the use of MOVs and filters.
If this is intended as a production item then you should really make some considerations for specs laid down by UL and similar bodies.
 

manuka

Senior Member
BJCKiwi: Before "reinventing the wheel", can you perhaps let us know the nature of the lighting load you are switching, & how often.

Just why will LED lighting not suit? As mentioned earlier,I'm engaged in a similar quest (ongoing), and have been near gobsmacked at the LED offerings now arriving on the market. Check the likes of => http://www.brightlight.co.nz/product . Some of these LED darlings are almost EVIL in their brightness,yet run on low voltage and "never fail". An architect mate mentions they're been so revolutionary that he's close to specifying nothing else for new city apartments/bistros/theme bars etc, especially since they're dimmable,cool running, non toxic,rugged,small and feasibly will need no replacement. Halogens are so 1990s & even CFLs have almost had their day...

FWIW a standard "handyman" call out labour charge to replace a single domestic lamp is ~NZ$30, and as a typical Kiwi dwelling has scores of lamps (filament, halogen,CFL espec.) this may become almost a monthly "lamp" service charge for rental property owners. Stan.
 

Dippy

Moderator
I'm a big fan of LEDs.
"CFLs have almost had their day" - Oh I hope so. Good riddance to CFLs as soon as possible.

I'm not so sure about "cool running" of LEDs Stan.... I'll show you my heatsinks if you show me yours :).
Get the heatsinking wrong and the hopes of "never fail" will disappear.
But, I don't doubt all the other upsides of solid state lighting. The newer stuff is truly impressive.

Even my local petrol station has replaced all it's overhead SON flood-lighting with LED now. I know the owners and they are tighter than the average hobbyist, so they must have seen some benefit.
 

MPep

Senior Member
I suggest you get yourself a copy of AN954 from Microchip website.

You'll see how to make robust transformerless PSUs and note the use of MOVs and filters.
If this is intended as a production item then you should really make some considerations for specs laid down by UL and similar bodies.
Interesting AppNote. Thanks.

If using Figure 12, you can also try the example as attached.
As stated in the AppNote, Full Rectifier designs are not good for driving Triacs etc because they are not referenced to either Neutral or Phase. However, as is the case here, they can be used for driving LEDs in a SSR, for instance.

Sorry for poor diagram, but this was drawn using MS Paint.
 

Attachments

BCJKiwi

Senior Member
Time for a recap

1. Wish to retain unchanged as much of the 'dangerous' side of the circuit that as practical.
This includes the AC connections AND the existing transformerless power supply.
Have difficulty understanding the suggested replacement of the existing proven transformerless power supply with another. The existing design conforms closely to some of the standard designs for transformerless supplies - the only 'special' feature appears to be that it is in line with the load rather than across Line / Neutral but this has been addressed with additional components in the existing design.

2. This is an existing home room lighting application with modern high efficiency CFL downlights that don't need changing to anything else.

3. The remote switch is a convenience which is not convenient when it does not work - in fact it's xyz##** annoying - specially when good money has been paid for the convenience!

4. All I asked for was a constructive critique of the replacement control and switching circuit.

I will be more comfortable with a regulator than with the further dropper resistor for the 5V supply (as opposed to the 5.47V provided by the Zener) as this will provide better tolerance of the load changes between on and off (i.e. the <15mA SSR LED).

If there are any earth shattering revelations when implementing the changes, will report back.

I thank those who have made worthwhile suggestions in this area and will proceed with caution.
 

manuka

Senior Member
OK, BUT- are you sure woes are not related to the CFL lighting load itself? I've had occasional triggering issues with "otherwise good" CFLs - a simple filament lamp swap out identifies this of course.

Over & out - Stan.
 

BCJKiwi

Senior Member
Stan, As previously advised, the operation is the same with all incandescents, or with CFLs, and again, the IR is NOT the issue, please (re)read previous posts.
 

Dippy

Moderator
I have to say that I'm confused about this BCJ old chum.

In your first post you say that the AC/'DC' supply is being retained.
So, that part must have been OK?

Then you say "DC voltage may be too high so would appreciate suggestions on the best way to adjust that (change the 1M and/or 330R value?)."
A little later we have a variation with a regulator, which looks nicer.
And a revamp of the first schematic showing the 1M0 res has been replaced with a 100K.

And in post #35 "Time for a recap" you say:
"Wish to retain unchanged as much of the 'dangerous' side of the circuit that as practical.
This includes the AC connections AND the existing transformerless power supply."
So, where are we?
Back to schematic in Post#1 or Post#29 SchNo.1 or Post#29 SchNo2 ?

Personally, I don't like any PSU that relies on leakage. It relies on the load and, well frankly, is yukky.
I'm being very thick but I cannot see that design being able to provide enough current continuously (1M0?? really?).
To me it looks like it might work if the output has been off for a while and then fail to stay on after being triggered. i.e. will work at first and then after a period the o/p won't stay on.

I could post a Mains/PIC/Triac circuit I'm doing right at the moment, but it would be a complete revamp of what you are doing - which is not something you want to do.
 

BCJKiwi

Senior Member
OK,
1. Want to retain the transformerless supply which is a classic capacitor / Zener design.
However it delivers 5.47V which is higher than ideal for the IR and the PICAXE.
The original circuit uses a further dropping resistor to get the 5.0 Volts for the IR.
These voltages are dependent on the load and the feed resistor. It was this second voltage that I was asking about initially.

2. As indicated in a previous post, the 1M is actually 100K - markings misread as colours changed by heating. Found the true value of 100K by desoldering the resistor and measuring.

3. Suggestions were to change the Zener to a higher value and use a reg. I liked this suggestion for the same reason you do - independence from the load. The LP2950 LDO should be OK with a 5.47V supply as it only requires < 200mV above output to run. So the latest scheme is to replace the dropping resistor which achieves the 5V with the LDO reg while maintaining all the original AC and transformerless supply as far as the 5.47V output. (post#29 scheme 1)

Have carried out some further basic measurements and find that with a fully discharged 220uF cap the DC supply is established in approx 1/2 sec from AC supply turn on. There is a very small droop in the supply (from 5.47 to 5.39V when the lights are on so the existing circuit feeds the required current on a continuous basis.
As the Triac circuit may require less continuous draw than the LED drain on the SSR, the 100K may require reducing to maintain the charge on the 220uF cap when the lights are on and the SSR LED is on. Will test and verify the actual drain once the SSR is to hand.

4. Other suggestions have been made that the system won't work as it is not connected to Neutral. If this is an issue when the Triac is replaced than post #29 scheme 2 could provide an alternative however I don't see this as likely.

So I'm expecting to use post #29 scheme 1.
 

hippy

Technical Support
Staff member
4. Other suggestions have been made that the system won't work as it is not connected to Neutral.
That's not really true; it connects through the load to neutral. A rough DC-equivalent circuit is as below -

Code:
+V --------.
           |
    Bulb  (X)
           |    ___
           }---|___|----.
           |     R      |
           |         .--^--.
           O  /      |     |
             / - - - |     |
           O         |     |
           |         `--.--'
           |            |
           }------------'
           |
0V --------'
You can put the bulb high-side ( as shown ) or low-side. It's always "live", current will always flow through the bulb but with low enough current that bulb won't light.

In the AC system diagrams its connections indicate L-Module-Bulb-N, it could be L-Bulb-Module-N. Which is safer depends on which part you worry about, whether you are exposing direct Live to the bulb or the module.
 
Last edited:
Top