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 regulator has 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