Author Topic: Possible reasons a resistor divider would not work as expected?  (Read 1486 times)

0 Members and 2 Guests are viewing this topic.

Offline ivanmakTopic starter

  • Newbie
  • Posts: 5
  • Country: do
Possible reasons a resistor divider would not work as expected?
« on: October 07, 2021, 10:07:01 pm »
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?
« Last Edit: October 07, 2021, 10:21:32 pm by ivanmak »
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2112
Re: Possible reasons a resistor divider would not work as expected?
« Reply #1 on: October 07, 2021, 10:37:24 pm »
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.
 

Offline bson

  • Supporter
  • ****
  • Posts: 2396
  • Country: us
Re: Possible reasons a resistor divider would not work as expected?
« Reply #2 on: October 07, 2021, 10:41:19 pm »
Shouldn't IP+ be connected to the live mains lead rather than NEUT?
 

Offline bob91343

  • Super Contributor
  • ***
  • Posts: 2675
  • Country: us
Re: Possible reasons a resistor divider would not work as expected?
« Reply #3 on: October 08, 2021, 12:09:34 am »
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?
 

Offline Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3408
  • Country: ca
  • Place text here.
Re: Possible reasons a resistor divider would not work as expected?
« Reply #4 on: October 08, 2021, 01:28:23 am »
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?
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1454
  • Country: ua
Re: Possible reasons a resistor divider would not work as expected?
« Reply #5 on: October 08, 2021, 11:05:55 pm »
Additionally, I see bad soldering in the photo.
 

Offline ivanmakTopic starter

  • Newbie
  • Posts: 5
  • Country: do
Re: Possible reasons a resistor divider would not work as expected?
« Reply #6 on: October 09, 2021, 01:28:02 am »
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.

Well 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.

Shouldn't IP+ be connected to the live mains lead rather than NEUT?


Nope, 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.

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?

The 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.

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?

Each 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.

Additionally, I see bad soldering in the photo.

Well.. it was my second attempt at SMD soldering.

Thanks for taking the time to help me :)
« Last Edit: October 09, 2021, 01:30:23 am by ivanmak »
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 8627
  • Country: fi
Re: Possible reasons a resistor divider would not work as expected?
« Reply #7 on: October 09, 2021, 08:38:04 am »
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.
« Last Edit: October 09, 2021, 08:40:07 am by Siwastaja »
 

Offline ivanmakTopic starter

  • Newbie
  • Posts: 5
  • Country: do
Re: Possible reasons a resistor divider would not work as expected?
« Reply #8 on: October 09, 2021, 12:32:31 pm »
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.

Ooh okay, that will be my next change to the PCB, thanks for telling me.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12436
  • Country: ch
Re: Possible reasons a resistor divider would not work as expected?
« Reply #9 on: October 09, 2021, 02:25:48 pm »
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.

Well 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.
Look 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.


Additionally, I see bad soldering in the photo.

Well.. it was my second attempt at SMD soldering.

Thanks for taking the time to help me :)
I 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).
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 8627
  • Country: fi
Re: Possible reasons a resistor divider would not work as expected?
« Reply #10 on: October 09, 2021, 02:30:58 pm »
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.
 
The following users thanked this post: Jacon

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Possible reasons a resistor divider would not work as expected?
« Reply #11 on: October 09, 2021, 02:40:09 pm »
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?

The 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.

If you're measuring across quite high impedances while holding the probes I could imagine :) you'd see differences between the 0V end, and the 240VAC end, due to stray capacitance.
.  That took much longer than I thought it would.
 

Online AndersJ

  • Frequent Contributor
  • **
  • Posts: 409
  • Country: se
Re: Possible reasons a resistor divider would not work as expected?
« Reply #12 on: October 09, 2021, 03:47:34 pm »
Your voltage will vary if you sample at (almost) a multiple of the line frequency.
You need to synchronize your measurements with the line frequency
to 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.
« Last Edit: October 14, 2021, 10:18:22 pm by AndersJ »
"It should work"
R.N.Naidoo
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 8627
  • Country: fi
Re: Possible reasons a resistor divider would not work as expected?
« Reply #13 on: October 09, 2021, 04:04:49 pm »
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.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12436
  • Country: ch
Re: Possible reasons a resistor divider would not work as expected?
« Reply #14 on: October 09, 2021, 05:59:40 pm »
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.
I 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.
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 8627
  • Country: fi
Re: Possible reasons a resistor divider would not work as expected?
« Reply #15 on: October 09, 2021, 06:06:46 pm »
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.
« Last Edit: October 09, 2021, 06:08:25 pm by Siwastaja »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf