Byron A Jeff wrote: > > > > > 1) That's not a dumb question - you can have lots of fun with mains failure > > when you bring the neutral close to the "ground". > > I thought so. > > > > > 2) Provided your circuit operates from the live and neutral ONLY, you may > > attach the neutral to the 0V (ground) - unless of course some dumb idiot > > wire the power to you with the live and neutral swapped - do first check that. > > Yup that is definitely a possibility. I was planning to drive this circuit > with a wall wart. But it's easy enough to build a quick 5V supply. But the > same issue are still there. Presuming I'm using an integrated bridge rectifier > does it matter which leg of the secondary is connected to ground and which > leg is connected to the input pin? > > BAJ no not if you want only power and you use a transformer "for safety" reversing the secondary leads only counts if the sine wave needs to be in phase.Like coupling two transformers.I did not read the data sheet you alluded to. However if I understand what you are trying to do :power the pic and derive a sync signal for controlling a triac optocoupler to enable zero crossing switching: then you may derive the sync signal from the input to the bridge rectifier and the return path will be the bridge rectifier giving a half wave current limit that and you're on your way as to the pic itself thats what I'm here to learn. ps batteries might last to christmas optically coupled this sounds like fun. ...I just thought of something use a zero crossing triac output optocoupler with a battery powered pic and to heck with the sync signal,propagation delays,troubleshooting hazards etc.