Electronics > Projects, Designs, and Technical Stuff
Problem reading multiple mains voltages with microcontroller.
Psi:
--- Quote from: Marco on May 14, 2019, 02:45:03 pm ---There's a time and place for circuits which float on the mains, not everything needs to be isolated. Just need to be careful.
--- End quote ---
Everything should be isolated unless there is a valid reason to not isolate it.
Kjelt:
--- Quote from: Marco on May 14, 2019, 02:45:03 pm ---There's a time and place for circuits which float on the mains, not everything needs to be isolated. Just need to be careful.
--- End quote ---
Exactly it all depends on the requirements.
Many devices are operated at non isolated mains even with non isolated power supplies since there are now many AC-DC converters like ST Viper+ or the sort that convert mains rectified voltage directly to low DC voltage, it does not require any transformer. No transformer saves space and money.
If for instance the only requirement is that a single serial or differential communication line to the outside has to be isolated than it might be cheaper to isolate that single communication channel than to isolate the mains.
But again it all depends on the requirements.
microherb:
--- Quote from: Marco on May 14, 2019, 02:45:03 pm ---There's a time and place for circuits which float on the mains, not everything needs to be isolated. Just need to be careful.
--- End quote ---
Thanks Marco,
The product is a LED lantern, everything is enclosed in a double insulated enclosure so there is no real safety requirement for isolation that I know of. I am aware of the dangers of working on non-isolated circuits.
microherb:
--- Quote from: Psi on May 14, 2019, 02:10:00 pm ---Yes, as others have said your project needing to have an isolated mains connection.
That's the first thing to fix
For taking the HV measurement on the MCU why not use a opto-isolator?
I'm guessing you don't need to measure the mains voltage down to more than say +/- 1V AC
An optoisolator should be able to do that just fine and you get isolation which makes things super easy.
Especially if you want to read multiple mains sources with a single MCU
You can correct for some of the non-linearity with a lookup table if needed.
Or get an opto-isolatior designed to have a linear response.
--- End quote ---
Thanks,
So I had a look at some linear optoisolators, something like the HCNR201. My concern is there is a +/- 5% variation in transfer gain? (About $6AUD in 100 quantities too but at least it's smaller than a transformer).
microherb:
--- Quote from: Marco on May 14, 2019, 01:51:08 pm ---
--- Quote from: microherb on May 14, 2019, 01:59:48 am ---I need full wave rectified from the main 240VAC for the fly-back power supply.
--- End quote ---
Really? Can't you just use a larger input capacitor?
--- End quote ---
There is a requirement for high power factor and low THD so I can't really just half wave rectify. Switcher is HVLED815.
--- Quote ---Any way, the flyback power supply is galvanically isolated ... so you can just use an extra halfwave rectifier for the measurement only. Use the bridge for the fly-back only, but connect the low side of the flyback secondary to "Neutral" (it will need a galvanically isolated feedback to the primary side, but flyback power supplies usually already have that). Use two halfwave rectifiers for the measurements. The circuit will be floating on one of the power connections of course and you should never trust Neutral to be neutral.
--- End quote ---
Interesting, just to confirm, is the attached simplified circuit diagram as you have described above?
Traditionally, there is a capacitor across the low side of the flyback transformer to the switcher ground (Bridge neg) for EMC. I take it that is still OK with the low side of the output now tied to neutral?
Thanks again.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version