Using power supplies with common input + and output + (Not common ground) - Page 1
Forum section: electronics / projects

author: FoxesRule
author_rank: Newbie
timestamp: February 07, 2024, 04:36:50 am
content: Hi everyone :-)I have recently come across the LSF01-K5B12SS non isolated regulator for around 1.8$ on Digikey which really sparked my interest as it is a really cheap way to power circuits from mains voltages (Or high voltage DC sources)I have attached the datasheet for those that are interested...The 12V version of the regulator can output 83mA and has a input voltage range of 15V DC to 380V DC (or 85V to 264V AC)I decided to play around with it and came across an interesting dilemma... normally non-isolated regulators have common grounds, but this regulatorhas a common + rail. (The input and output + terminals are shorted out)*Figure 1 and Figure 2*So if you try to measure the input voltage through a voltage divider and a microcontroller ADC you have a problem. Many applications require the ability to measure the input voltage. (For example, for my application I would like to add a relay that switches off if there is undervoltage or overvoltage in the mains power supply)If you connect the voltage divider and ADC to measure over the regulator + input and - output (pins 4 and 3) you will always measure 12V. If you add a diode between the regulator + output and the voltage divider, it does not fix the problem.*Figure 3 and Schematic*If you connect the voltage divider and the ADC to measure over the regulator + input and - input (Pins 1 and 2), then you bypass the regulator - input and - output pins, effectively bypassing the regulator.*Figure 4*A simple way to fix this is to use an isolated PSU such as the LS03-13B12R3, however, in the spirit of learning electronics 😊 I really would like see if there is a way around this problem of using a power supply that has a common positive rail as opposed to a common ground for the inputs and outputs.Is there any simpler and cheaper way to use the LSF01-K5B12SS non-isolated regulator and still be able to measure the voltage input with a microcontroller? I feel like I am missing some obvious solution to the problem...Thank you!-FoxesRule

author: tooki
author_rank: Super Contributor
timestamp: February 10, 2024, 11:45:05 am
content: Op-amp buffer?

author: Ian.M
author_rank: Super Contributor
timestamp: February 10, 2024, 12:26:28 pm
content: Return the 'lower' end of the input voltage potential divider to Uno 5V rather than OUT-. Note that there is an offset of 7V (due to the difference between Uno Vin held at 12V by the LFS01-K12 regulator, and Uno 5V), and the ADC result must be subtracted from 1023, then the result scaled by the divider factor before adding the offset. For AC input, add a diode in front of the divider so it only gets negative half cycles.If you are using a bare MCU rather than a MCU module with onboard regulator, consider using a negative regulator to feed the MCU 'Gnd' so its Vcc can be the same as LFS01+common. This gets rid of the offset.

author: GoStags
author_rank: Newbie
timestamp: February 10, 2024, 12:37:15 pm
content: Use a Linear Optoisolator. A simple differential amplifier would also work but common mode rejection may make it inaccurate.