output to a darlington then a mains relay problem.

Hi All,

I've tried this on a picaxe and on an arduino, same result.

I'm trying to output Morse code to a 40W 240v desk lamp. The board outputs to a darlington array which in turn outputs to a 12v mains relay, the relay interupts the live wire to the desk lamp.

I know the code is OK as the relay clicks perfectly when the mains power is not switched on, however when the mains is connected, the system runs through its routine for about 1 - 2 minutes and then freezes, a reset sets it going for another minute or 2 then the same thing happens.

When trying the picaxe version I also got a small shock off the board! I've no idea how though.

Its almost as if the relay is pushing voltage back towards the darlington, but I've changed bothe the darlington and the relay but no change.

Anyone got any ideas?

Ben
http://www.woodeson.co.uk

PS: Please keep the answers simple as I'm pretty much a beginner at electronics.

do you have a reverse diode across the relay, 1n4001, ?
http://www.rentron.com/Files/Stamp/pc-relay4.gif

ditto on the diode advice...

Also, have you thought of using a solid-state relay? A regular relay won't switch as quickly, and more importantly its contacts will eventually burn out from arcing. If you like the sound of the relay, you could use both kinds: regular relay for the sound, SSR for good switching.

D