Vasile, The problem with not isolating the mains voltage is that I would then need to isolate ALL of the 8 inputs, 8 outputs Temperature inputs and RS485 instead of just isolating the 3 x 230VAC inputs. I expect the additional circuitry to add opto couplers to all inputs and outputs and DC-DC converters for Analogue inputs etc will soon add up, not to mention cost. It also means I need to remember to use an isolation transformer during development so the scope probe earth does not cause problems. The other issue is what happens if the user wires the input incorrectly and places Phase on the logic earth ? There was a circuit floating around written by Stephen Woodward that described using 2 optos which had their outputs wired together. One opto was driven via the Anode and the other by the cathode. Have you seen an arrangement similar to this ? Kind Regards David -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf Of Vasile Surducan Sent: Saturday, 30 July 2005 1:23 PM To: Microcontroller discussion list - Public. Subject: [EE] Re: Circuit for measuring mains voltage On 7/30/05, Russell McMahon wrote: > > How large is the transformer ? > > A transformer is a very eledgant solution, technology notwithstanding. > You can get very small main transformers - certainly under 25mm^2 > footprint. > Jinx may be able to comment due to recent similar experience. Using a transformer it's still an old methode for our days having only the disadvantage of PCB space consuming and a magnetic field generator. > > An alternative is a purpose build double tx, single rx opto made for > this sort of task. There are a number available. The sender uses a > feedback loop to contioj the sending signal and the receiver slaves > this. Opto tx drift not a problem. Why double tx ? A PIC running floated on to 230V mains with an optoisolated full duplex communication (half duplex on 2 wire EIA485 or whatever). I have a few projects running this way. > > Infineon HCNR200, HCNR201 > "High-Linearity Analog Optocouplers" > 0.01% non linearity > The light side of the force at work. > > Clare AN107 Linear Opto Couplers (Google knows) > LOC110. LOC111. LOC112 > Techniques apply to other manufacturer's products. > > I have often thought that you could probably do an OK version of this > using a std dual opto IC. And at least one operational amplifier. It works very good, is temperature compensated. On the nonisolated section (mains) the voltage is converted into current using a simple resistor. On the isolated section a middle supply voltage is negative feedback controlled by an OA and two photo-transistors. Two more resistors required to fix the middle voltage of the supply. It works very nice and is cheaper than any optoisolated amplifier factory made. cheers, VAsile -- 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