Possible reasons a resistor divider would not work as expected? - Page 1
Forum section: electronics / projects

author: ivanmak
author_rank: Newbie
timestamp: October 07, 2021, 10:07:01 pm
content: I have setup a resistor divider that isn't acting as expected. See attachments for schematic and for how it looks on the PCB. The resistors are converting 234v rms to about 0.2v rms for a voltage sensor (ACS37800). The unexpected acting is the voltage output being very unreliable, when the divider is connected to 110v, the output voltage is 0, but if connected to 234v rms the output slowly varies between 0.08-0.2 volts. I have also tested that the ACS37800 is measuring correctly. Is there something I'm missing? Could current be leaking and dropping the voltage across the resistors? Because the voltage drop between R17 and R8 is 107v and the drop between R18 and R19 is 117v. What could the issue be?

author: Andy Watson
author_rank: Super Contributor
timestamp: October 07, 2021, 10:37:24 pm
content: What does "GND" attach to ?If it has a significant leakage to earth - either directly or via other instrumentation, then you have shorted-out half of your potential divider. To obtain a reliable measurement the ACS37800 and associated circuitry must be floating.

author: bson
author_rank: Unknown
timestamp: October 07, 2021, 10:41:19 pm
content: Shouldn't IP+ be connected to the live mains lead rather than NEUT?

author: bob91343
author_rank: Super Contributor
timestamp: October 08, 2021, 12:09:34 am
content: What are the tolerances of the resistors? How are you measuring the 107 and 117? If the resistors were identical you wouldn't see that 10V difference. How pure is the wave?

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: October 08, 2021, 01:28:23 am
content: One of the reasons could be your expectations are incorrect. The universe is never wrong. What is the voltage rating of your resistors, how are they assembled, what flux did you use and does it need cleaning after?

author: Vovk_Z
author_rank: Super Contributor
timestamp: October 08, 2021, 11:05:55 pm
content: Additionally, I see bad soldering in the photo.

author: ivanmak
author_rank: Newbie
timestamp: October 09, 2021, 01:28:02 am
content: Quote from: Andy Watson on October 07, 2021, 10:37:24 pmWell it seems that the negative input of the voltage sensor which was also connected to ground was connected to VAC (240v, through 1M*2 resistors) but it should have been connected to Neutral, same goes for the positive input of the sensor (was connected to neutral when it should have been 240v). And that seemed to fix the problem, but I have yet to test it at 110v.Quote from: bson on October 07, 2021, 10:41:19 pmNope, IP+ is part of current sensing feature of the chip. If I were to connect it to LIVE I would have shorted out the mains. But if you were talking about VINP, then you are correct.Quote from: bob91343 on October 08, 2021, 12:09:34 amThe resistor has a tolerance of 5% but I don't think it's big enough to make changes of >40v. Although I should go with lower tolerances for next iteration for increased accuracy.Quote from: Alex Eisenhut on October 08, 2021, 01:28:23 amEach resistor has a max working voltage of 200v, so they should be fine. But I didn't know that the flux might sometimes need to be cleaned, I'll look more into that.Quote from: Vovk_Z on October 08, 2021, 11:05:55 pmWell.. it was my second attempt at SMD soldering.Thanks for taking the time to help me

author: Siwastaja
author_rank: Super Contributor
timestamp: October 09, 2021, 08:38:04 am
content: Likely unrelated to the problem, but four 200V rated resistors in series is a disaster for safe mains measurement. Mains is peaky and even just one peak carbonizes undersized resistors, shifting the value or creating excessive continuous currents. Given 260VAC*sqrt(2) = 366V under perfectly normal conditions, you don't have much margin.You should aim for around some 1.5-2kV rating minimum. SMD is fine but you need longer packages and/or more in series. I like THT parts for mains measurement dividers though despite preferring SMD pretty much for everything else.Additional protection (fuse/fusible resistor + MOV) is highly recommended.

author: ivanmak
author_rank: Newbie
timestamp: October 09, 2021, 12:32:31 pm
content: Quote from: Siwastaja on October 09, 2021, 08:38:04 amOoh okay, that will be my next change to the PCB, thanks for telling me.

author: tooki
author_rank: Super Contributor
timestamp: October 09, 2021, 02:25:48 pm
content: Quote from: ivanmak on October 09, 2021, 01:28:02 amLook at the datasheet again: the schematic on page 20 clearly shows that neutral (shown here as chassis ground*), connects to signal ground via the second pair of 1M resistors, whereas your schematic has it backwards. That’s what your fix corrected.*Only knowable by extrapolation from the page before, which has the schematic whose description says it shows neutral connected directly to ground. The schematic on the first page, which shows “L (N)” and “N (L)” for the two AC connections isn’t even explained as far as I could tell at first glance, doesn’t help.Quote from: ivanmak on October 09, 2021, 01:28:02 amI really don’t think mains voltage is where you should be learning PCB layout and SMD soldering. I’ll actually be doing my first PCB with mains in a month or two, but under the supervision of experienced professionals who will make sure I don’t overlook anything that could make it unsafe (or cause EMI problems).

author: Siwastaja
author_rank: Super Contributor
timestamp: October 09, 2021, 02:30:58 pm
content: Poor solder job looks like lead-free solder contributed to it; it's harder to use properly. Starting with leaded solder might help you with learning curve. It's acceptable (RoHS exemption) in prototypes anyway, so I only use leaded; outsourced production obviously uses lead-free.

author: StillTrying
author_rank: Super Contributor
timestamp: October 09, 2021, 02:40:09 pm
content: Quote from: ivanmak on October 09, 2021, 01:28:02 amIf you're measuring across quite high impedanceswhile holding the probesI could imagineyou'd see differences between the 0V end, and the 240VAC end, due to stray capacitance.

author: AndersJ
author_rank: Frequent Contributor
timestamp: October 09, 2021, 03:47:34 pm
content: Your voltage will vary if you sample at (almost) a multiple of the line frequency.You need to synchronize your measurements with the line frequencyto always measure at the same point on the sinusoidal waveform.Perhaps best at 90 or 270 degrees.Easiest is probably to rectify and measure at DC.

author: Siwastaja
author_rank: Super Contributor
timestamp: October 09, 2021, 04:04:49 pm
content: Or just measure as often as you can (defined by bandwidth, ADC and processing limitations) and calculate RMS which is what you usually want. Other usual "interesting" values could be peak, and of course the whole waveform. You can easily do all of this by sampling at some 1kHz or so.

author: tooki
author_rank: Super Contributor
timestamp: October 09, 2021, 05:59:40 pm
content: Quote from: Siwastaja on October 09, 2021, 02:30:58 pmI think that’s nonsense. Does lead-free flow as nicely as leaded? No. Is it the horror people make it out to be? Also no. Good quality lead free solder works just fine. There are some leaded solders (or rather, the solder and flux core combination) that perform worse than many lead free solders.I work at a training center, where every year we have several groups of electronics apprentices come in to learn how to solder, among other things. They’re absolute novices and manage to do just fine with lead-free.

author: Siwastaja
author_rank: Super Contributor
timestamp: October 09, 2021, 06:06:46 pm
content: Didn't say it's horror, just a tad more difficult. You and I have no problem working with it, but beginner can use every stepping stone they can find, and starting with leaded is one. It makes soldering a bit easier and adds margins. Personally I use leaded paste to add temperature margin between solder flowing and some specific iffy plastic connectors melting.With leaded solder beginner sees how solder should flow, forming a nice shiny fillet. This will be their target with lead-free as well although it will never look as pretty as leaded.