Hi there,

I'd like to know if there's an easy and preferably cheap (in terms of components) way that my PIC can determine whether current is being drawn by a mains level (i.e. 240V) device. Ideally it would be nice to know how much current too.

There's nothing to stop me wiring this device into the mains cable, but obviously the pic operates on 5v, and I don't know how to connect the two without incinerating the pic.

I'm sorry if this is a really inane questions - while I'm reasonably happy with the programming side of things my knowledge of electronics is fairly elementary.

Any suggestions are appreciated.

Thanks.