Well, you've got a lot of good information from others trying to help you avoid the "hard" solution you seem to want. If you still want to try to do this the hard way (rather than simply getting a better power supply) then read on... I'm assuming you are in a country that uses 120VAC - trade 120VAC for whatever you use where suitable. 1. Assume all the circuitry *has* to be on the mains side - we cannot connect anything to the secondary of the transformer. For this solution to work you *have* to use a transformer for the lamp power supply. Plug in a switching power supply and it simply won't work. Use a small 120VAC to 12v transformer to give your circuit 12VAC. Use a DPDT relay that will allow you to connect the lamp mains wire to either mains OR the output of your 12VAC transformer. Your circuit, should you choose to build it, will normally power the lamp from the 12v transformer. It will sense the current draw on the lamp transformer through use of a current sensing transformer (wrap magnet wire around one of the lamp transformer wires) and, probably using a couple or window comparators, determine whether the switch is on or off. If the switch is on then your circuit will switch the relay so the lamp transformer is powered by mains. It will then measure a much larger current draw. When that current falls (the light was switched off) then your circuit will switch the relay so the lamp is running off the 12v again. If it sounds more complex than purchasing a good transformer that won't burn out, that's because it is. If this is a halogen light then you'll probably find that the lightbulb socket contacts are oxidized, and need to be replaced. This bad contact is one of the reasons your transformers are having such trouble living long lives. It could also be that you're buying cheap transformers, which compounds the problem. If the bulb breaks frequently then you'll also find that shortens the life of the transformer considerably. Putting a suitable rated transorb or gas discharge tube after the transformer may help the bulb burning out situation, but the bad contacts can only be helped by a bigger, better transformer or by replacing the bulb holder contacts once a year or so. -Adam On 5/20/06, Alessandro Queri wrote: > Hello everybody. > I wonder if any of you can help me in solving this problem. > I have a stylish table lamp which i'd like to retrofit. The lamp is built > with a transformer permanently connected to the mains and a switch plus a > bulb on the low voltage side of the transformer. The bulb and the switch are > away from the transformer and I cannot put anything that side (remember, t > is stylysh... ;-( ). What happens is that transformer gets very hot and > after some time breaks even if not used. besides I don't like the > transformer to be always connected to the mains. I'm wondering if there is > any way limiting current on the mains side of the transformer and to sense > in order to switch the real power only when needed. I'd like to use all > semiconductors, all on the mains side, no secondary supply. Any idea? Hope I > made you understand the problem, my english is not that good. > Many thanks in advance. > > Alessandro > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist