Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


De-Aliasing the Input to a Datalogger

De-Aliasing the Input to a Datalogger

De-Aliasing the Input to a Datalogger

Most of what I have learned about anti-aliasing in ADC inputs involves filters built into the ADC, or oversampling, and other such strategies that focus on changes to the system logging the data. I'm stuck with a datalogger which I'm not not able to modify for this supposedly simple project, but I've got too much aliasing going on. The external circuit that transforms the input signal to the scaled signal that the datalogger can read is the place to fix this, and seems to be the source of the problem. For those interested, here is the datalogger:


A neighbour of mine has made spot-measurements of his house voltage and is concerned about the safety of appliances in his house. He tells me he has seen readings higher than 130V, which is outside the allowable variation by local utility regulation. We want to record some evidence of our own, to understand the problem better, before pursuing the matter with the utility company or paying a consultant that the utility will respect. My goal is to provide the datalogger with a DC output about 4.0 volts which is scaled to the input voltage, taken from the 120VAC main power line. If the line drifts up to 130VAC, then the DC signal should rise from 4.0 to 4.3. The datalogger can re-scale the data, but it doesn't seem to deal with ripple very well.

To make the scaled DC signal, I made a simple linear DC power supply circuit with no regulation. The AC is stepped down to about 4VAC through a transformer. The output AC is turned into DC with a full-wave bridge rectifier. Across the rectifier I have connected a 10uF capacitor and a 1k resistor. I believe this provides a DC output that will "follow" fluctuations in line-in AC voltage in a linear proportion.

I believe that aliasing is the problem because my digital multimeter gives readings that wander up and down, and I've hooked the circuit up to the datalogger and get the same result. Meanwhile the needle on my analog meter stays steady as a rock if I measure the same thing. The true RMS DMM readings wander up and down by 10%, so I do believe the sampling is the problem. Both the datalogger and the digital multimeter behave the same way. Simultaneous measurements of AC or DC voltage with my analog meter shows all steady. I can't change the sampling rate of the DMM or the datalogger.

I have already increased the capacitor from 1uF to 10uF with no measurable effect. Should I try more?

Is there a way to filter or smooth out enough of the ripple that I can limit the aliasing to 1% (0.05VDC)?

Is there a different circuit that will do what I want better than the linear power supply?

No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.

RE: De-Aliasing the Input to a Datalogger

The analog meter probably has a lower input impedance, which would tend to "settle down" the power supply you've built.

An inexpensive analog meter might have an input impedance of 1k ohm per volt (of range). A DVOM might easily be 10M ohm.

The power supply as shown, with a light load like a DVOM, will tend to float to the most recent peak voltage, including (to some degree) the otherwise insignificant little bumps.

edit: You've got a 1k ohm resistor. Which should be sufficient. Sorry I failed to notice it at first.

RE: De-Aliasing the Input to a Datalogger

Aliasing are the measuring artifacts caused when the input signal includes significant frequency spectrum components that are above sampling rate, with a 2:1 ratio as at least two samples are needed to define a cycle.

Most modern DVOMs these days are "True RMS", so they'll be sampling well above the power line frequency of 50 or 60 Hz. Many will be reasonably accurate even to around 1 kHz. There are now such DVOMs for $20 price class, nearly ideal except for some legitimate safety concerns if used on high energy circuits.

So, as long as the power line doesn't carry significant levels of strange interference, then hopefully aliasing isn't actually an issue. Also, your power supply is emitting a DC voltage, plus or minus any noise that gets through.

Edit: specification mentions up to 32 kHz input but on the Counter inputs. Doesn't give any details about ripple rejection on the analog voltage inputs.

Maybe add more filtering to your power supply, like a series resistor and another capacitor (obviously can't use a regulator). Choose your preferred time constant, but it'll need to be at least a good fraction of a second.

RE: De-Aliasing the Input to a Datalogger

Some DVOMs will provide MIN and MAX registers. So in principle, set it to AC (high voltage), the probes could be jammed in the outlet, reset the MIN/MAX registers, and let it run.

There'd be some safety considerations...

It probably wouldn't time stamp.


Going back to your original concept, you might need to put a modest load resistor on your power supply. That'll tend to bring it from something like a representation of peak voltage, towards the general direction of average (rectified average, not the zero average of AC). edit: 1k is probably reasonable.

About 40 years ago, I designed and built a little box with an expanded (offset) scale line voltage meter. Very similar concept, but with a regulated voltage to provide the baseline, so the scale on the meter was something like 100 to 140 VAC.

It probably had a lamp to put a modest load on the unregulated part of the power supply.

It worked well, as I recall.


Commercial power quality monitors would measure all sorts of parameters, and record and report just the exceptions.


(Multiple posts because I'm using a phone.)

RE: De-Aliasing the Input to a Datalogger

Thanks, but you will have to bear with me. I do not speak EE Jargon as clearly as I would like, and clearly this is the case.
Edit: Something else to clarify "I can't change the datalogger's sampling rate" which means the fastest sample rate for this logger is 1 second. It's a really old datalogger. There is no such thing as 1kHz sample rate for this device. So no point in exploring the ripple in detail.

I only need to feed the datalogger a signal it can use. Since the datalogger samples data like the DVM does, I compared its measurement to the DVM readings and the analog meter for a third reference. My concern is that the circuit is generating too much ripple, causing the datalogger reading to jump around. So what will clean up the ripple so that the datalogger can use the DC?

No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.

RE: De-Aliasing the Input to a Datalogger

"...fastest sample rate for this logger is 1 second..."

Might as well try a series resistor and then a parallel capacitor at the data logger input, with a large time constant. Enough to knock down the 60 Hz (actually 120 Hz due to the bridge rectifier) ripple.

The series resistor will act as a voltage divider with the input impedance of the data logger input, so it needs to be low resistance (less than 1k ohms). For example 220 ohms, a common standard value.

Parallel capacitor might be around hundreds of uF, garden variety electrolytic territory. For example 500 uF.

EDIT: It must be late. smile

The ripple will be dropped across the series resistor. The voltage on the data logger input will be much closer to ripple free. And still representative of the line voltage.

None of these values are critical. Consider these or anything similar as starting values. Feel free to experiment, or use what is available.

It's so much easier to eliminate ripple with a voltage regulator, but not a solution here obviously.

I'm not even considering a series inductor, as they're less practical for several reasons.

RE: De-Aliasing the Input to a Datalogger

If you're trying to go against a PoCo you will get nowhere with your setup. Trying to measure around a rectifier is fraught with ifs/buts/gotchas and the PoCo will know that and probably blow you off.

I'd ask them to log your voltage for a couple of days which a lot of PoCos will do or get out your wallet and pick up a reasonable data logging meter.

Home Depot sells this one as an example. You can set it to log RMS voltage once every second up to once a day for 100,000 samples. If you logged the voltage (to 0.1V) every 10 seconds x 100k = 11.5days of 10 second logs and plopped that on their counter you'd get some results.

Keith Cress
kcress - http://www.flaminsystems.com

RE: De-Aliasing the Input to a Datalogger

Right, Keith!

I ran a few LT Spice simulations and they show lots of problems with SW setup. Not to talk about those wave-forms shown. If the sine looks like a string of half arcs - there is a serious problem. That problem is more in the brain of the person that drew the wave-forms than IRL.

Original circuit:

And wave-form out:

There are soo many problems with that wave-form. Diode voltage drop, "impulse catcher" (diodes and naked capacitor does that, very high ripple because the time constant isn't enough. And then some - like temperature dependency and other things.

Increasing the capacitor alone doesn't help much. But if the source impedance into the filter is made fairly constant by adding a 1 k load across the bridge output, increasing the resistors to 10 and 10 k and going to 100 uF capacitor, you get a smooth output that doesn't show aliases:

Using 10+10 k will give you an effective Rout equal to 2.5 kohms and that only introduces an error around .25% - which drowns in all the other errors. It can, if needed, be easily be calibrated out of the recording.

I wonder: What problems does your neighbor have?

Gunnar Englund
Half full - Half empty? I don't mind. It's what in it that counts.

RE: De-Aliasing the Input to a Datalogger

Sorry, Rout is 5 kohms. Still not serious.

Gunnar Englund
Half full - Half empty? I don't mind. It's what in it that counts.

RE: De-Aliasing the Input to a Datalogger

Thank you everyone!
I may have confused myself during the "fussing around" the other day. This morning I hooked up a different capacitor across the bridge output and this time the DC stabilized nicely. The first capacitor I soldered into the circuit probably was broken. I have a junk box of old parts that I use for tinkering. I must have drawn a dud out of it the first time. I tried a few others today, from 100uF to 1000uF and they all filtered the ripple.

No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.

RE: De-Aliasing the Input to a Datalogger

About for the neighbour's problem:
He has solar panels on his house & garage roof, and some of the Enphase string inverters have tripped due to overvoltage. He believes that the power provider is allowing the voltage of the lines to rise beyond limits. I can see his point, but his system is complex, and I've thought of a few other things that could be going on. I would like to test the line voltage in various places in his system. One test close to his service entrance, and one test on the solar panel's feed-in circuits where they come into the combiner panel. Spot checks aren't really the thing. We need to watch it long-term, like at least a week, to see trends if there are any.

I might make another one for myself. I'm not grid-tied, but I do get brown outs. Seeing trends in my own supply might be interesting.

FWIW: the term "neighbour" is loosely defined in big-sky country. He is several miles away from me, on a different branch of the electric transmission trunk line, but it is all owned by the same power company. Each of us is on a long thin string coming from the branch line, meaning there are many local things that could affect him that wouldn't affect me, and vice-versa.

No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.

RE: De-Aliasing the Input to a Datalogger

Re. The bad capacitor.

It's worth mentioning my general observation that the success rate of troubleshooting over the internet is about (first approximation) 50%.

This is due to the limitations of the medium, as compared to being there.

I'm glad it worked out.

Your neighbourhood sounds....spacious.

RE: De-Aliasing the Input to a Datalogger

Solar on the ends of long lines is notorious for over voltage-ing the lines. It's the driving problem in causing the shift to control of power-walls and solar installations to the PoCos.

I'll bet that ultimately the solution will be a power-wall for your neighbor where the maximum from his solar will have to be fed to local storage for local reuse at night or for a more spread-out return to the gird than peak solar return with all the other remote solar all over supplying the grid right when everyone else doesn't need power.

See Rule 21

I saw somewhere, I can't find again, that showed an example of remote houses out on the grid causing excessive voltage rise that the PoCo had no real control over. This was a major reason requiring Rule 21 creation. It allows the PoCo to reduce solar injection into the grid.

Keith Cress
kcress - http://www.flaminsystems.com

RE: De-Aliasing the Input to a Datalogger

I sense that perhaps the evil plan with the data logger is to see if there's a diurnal effect.

RE: De-Aliasing the Input to a Datalogger

Hi VE1BLL; I suspect there will definitely be a diurnal effect that has a strong insolation correlation.

Keith Cress
kcress - http://www.flaminsystems.com

RE: De-Aliasing the Input to a Datalogger

Hi SparWeb.
1. Are the measurements being taken when the solar is on-line?

2. Have you tried contacting the customer service department of the POCO for advice and possible help?
We may or may not be on the same POCO. I had some conversations with my POCO customer service department a few years ago and found them to be very approachable.
If your friend has a digital KWHr meter it may already be measuring the voltage swings. Many of them have the capability to measure and record (per phase on a three phase system) Volts, Amps, Demand, and PF.
In another place and time, I was able to get a file of all measured parameters taken at 15 minute intervals for the preceding month.
The cost:- A two liter bottle of Pepsi, supply my own floppy disk. (I had friends).
In some cases a tech could make one trip and download the info.
In other cases it was one trip to set up the meter program and a second trip a month later to download the info.
It's worth a phone call to the customer service dept.

3. Is it possible that the solar installation is causing the problem?

4. Are there any consumers on the line, either upstream or downstream, who may be causing the problems?
A large motor starting or running may be causing issues.
There are a lot of ways a motor can cause a voltage rise.
A heavy load on your phase may cause a voltage drop which, when the motor stops will become a voltage rise, until the voltage regulator for that phase corrects.
A heavy load on another phase may cause a voltage rise on your phase.
A large motor, some distance downstream from a voltage regulator can interact with the corrected voltages and produce unexpected results.

5. Have you moved in the last few miles?
Your early posts led me to suspect that you were south of a major city.
More recent posts lead me to suspect that you are east of the same city.
If so, is there any chance of a tour of your setup some day?

6. BTW If you are rectifying your voltage you may be measuring the average voltage rather than the RMS.
The old analog meters were measured average voltage, but a form factor of about 1.1 was applied and the scales were marked to indicate the equivalent RMS of a sine wave.
The average of a distorted sine wave tended to be lower than the RMS.

7. A series reactor was mentioned. The windings of the small transformer may make an effective series reactance.

8. Consider addressing harmonics closer to the source; Put a large capacitor on the transformer input to kill the harmonics.
Scotty, Gunnar and Keith are better able than I to recommend actual values.

Anecdote warning:
I attended a pump station start-up on behalf of my employer.
The design engineers were there.
They had searched in vain for 480 Volt motors but could only find 460 Volt rated motors.
The panel had ground detection voltmeters.
They had a crew from the POCO there to check the voltages and transformer taps before energizing.
The ratio between the line to line voltage and the line to neutral voltages were obviously not in a 1.73 ratio.
With no load, the magnetizing currents were causing distorted wave forms which did not have a form factor of 1.1
I ended up giving a tutorial to a couple of engineers with more qualifications but less experience than myself.
I don't know if I convinced them but they were willing to step aside and let me throw the switch.
As soon as a small load was applied, the voltages lined up at the 1.73 ratio.

What's the point?
The point is that using an average responding device to measuring a waveform with harmonics may lead to unexpected errors.

1. Call customer service.
2. Look for an accurate "Off the Shelf" A-D transponder. You may need to add a square root extractor.

A programmed approach.
10 Call POCO, else 20
20 Look for an A/D device and a Square Root extractor.
30 Check the price.
40 Goto 10

"Why not the best?"
Jimmy Carter

RE: De-Aliasing the Input to a Datalogger

Hi Bill,
I always knew you were interested so now I assume you just didn't see my invitation from a few months ago, somehow. The invitation that was offered still stands. I have always been east of the city, just not as far as you (and you've dropped enough hints that I guess you're in "dinosaur" territory).

I'll try to answer your questions:

1) The solar is the likely cause, but measures have been put in place by the PoCo that should be preventing it. The guy's solar installation is "unique" to put it mildly. His story is worthy of its own page, in fact... http://www.sparweb.ca/Diary/2019_May_11.html
(Please please do your best to put up with the nasty webpage navigation on my site. I am NOT a HTML coder, and it shows!)

2) Pierre has a 20-year long saga to tell of his own. His power company "wires provider" once gave him a printed paper report about voltage excursions, but of course from their perspective it was a document geared to showing that it was "his fault". He's got his back up about that and wants some data of his own. No, we don't expect to have better credentials than the consultants hired by the power company. We just need to collect data that we own, to start with. Keith's comments about credibility are already understood. The PoCo would blow us off if we approached them with this kind of gadget. The goal is to have the data to ourselves, to read and examine, and to sample from various locations in his system, without interference or paying fees to a consultant. Later we can use what we learn to strategize or optimize.

3) It should be obvious now that solar definitely could be the cause, but what if we found evidence to the contrary? What if Pierre's next-door neighbour plugged this in and found the same thing? What if two houses down the road the same thing is measured? FYI, Pierre's PoCo has installed a solid-state transformer on his pole, while the folks down the road have standard "jugs". I find it difficult to believe that Pierre's system, big though it is, could cause a 10-15% overvoltage on the 14kV overhead lines, when the point of the PoCo installing a solid-state 70kVA transformer was to stop this from happening. And if Pierre's system actually is driving overvoltages, then a datalogger in the house next door should read an overvoltage simultaneously as one in Pierre's house, while a datalogger in my house (not on the same branch) would not. Triangulation.

4) There are plenty of consumers and producers on the lines. There is a pipeline pumping station just a mile from me, but I am on a single wire just 1 mile away from a 140kVA 3-phase distribution branch. His branch comes from the city but he's on a very long skinny string more likely to have voltage excursions. In electrical terms, I'm probably too "far away" to be a good baseline reference, but he has friends in a nearby town that would be. When taking measurements in multiple places using "free" equipment and volunteers, the project can grow a little at little or no cost. Imagine how expensive collecting this data would be if someone was being paid to do it?

5) This is my weather station: https://www.weatherlink.com/map/4935084f-1110-40f1...
You are welcome to contact me any time. I will send you an e-mail.

6) Datalogging always requires the same steps, in conceptual form: transform the "phenomenon" into a signal the datalogger can read, then transform the datalogger's measurement of that signal into a message that represents the "phenomenon" as accurately as possible. So in this case, I'm transforming 120VAC into 4VDC, then telling the datalogger to multiply the input by a slope and offset to print "120VAC" on the screen again. It hardly matters what an analog meter thinks in this case. And the 4VDC isn't important, either, as long as it can fluctuate in close proportion to the 120VAC signal being measured. This datalogger needs most of its analog inputs scaled between 0V-5VDC.

7+8) The interface to the datalogger works now. A bad capcacitor turned out to be the problem, but I thought I'd done something wrong and went off on a tangent. The logger has been logging all night, plugged into MY wall, until I can deliver it to Pierre. ~122VAC, mostly.

Programming in BASIC:
This datalogger is so old it ACTUALLY is programmed in BASIC.
I have 15 of them. I got them cheap from guvvermint auction.

30 PRICE=20

No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.

RE: De-Aliasing the Input to a Datalogger

"I have 15 of them."

If you need multiple copies of your little power supply, then keep in mind that you could use inexpensive unregulated "AC adapters" to do the same thing.

Recently I needed a 4 Vdc RS-232 assertion, and I used an old AC Adapter to provide it.

Also, I use an AC Adapter to provide a 12 Vdc signal when the septic tank pump is on. I use it to count pump cycles for assurance that everything is working.

Only if you need multiple copies, then it might be a cost-efficient approach.

You'd still need to add your 1k load resistor.

RE: De-Aliasing the Input to a Datalogger

Great idea VE1BLL!

Nice round-up Bill!

Nice thought summation Spar.

Spar; Next time you visit your buddy would you please get us a picture of the solid-state-transformer? It could be useful in this discussion.
How big is his solar array? It's not in the report on your site. Looks Enormous..

Keith Cress
kcress - http://www.flaminsystems.com

RE: De-Aliasing the Input to a Datalogger

I already have a few pictures of the solid-state regulator at Pierre's house.(sorry I incorrectly wrote "transformer" above)
But this topic has drifted a little. I think I should be breaking this thread into a separate topic. There's more to tell, and the story will evolve, depending on what I find at Pierre's house, and it doesn't really have much to do with the ripple on a rectified DC signal any more. In fact, that title will become confusing, pretty soon.

No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.

RE: De-Aliasing the Input to a Datalogger

SparWeb, I don't think your capacitor was "broke". It was just plain too small with the 10 uF and 1 k load. Not to mention the 1 uF you started with.

Put it back in your junk box. You may need it some other time.

Gunnar Englund
Half full - Half empty? I don't mind. It's what in it that counts.

RE: De-Aliasing the Input to a Datalogger

Stuff about the PV System continued here: thread1528-454094: Troubleshooting a Solar PV System

Skogs, you may be right, but removing the cap from the circuit involved clipping its leads very close to the can. No leads left to solder anew. Junk either way you look at it wink

No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.

RE: De-Aliasing the Input to a Datalogger

Yes, I may have been hasty to "roll my own", when I do have a few wall-warts that could be sacrificed more easily.

No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.

RE: De-Aliasing the Input to a Datalogger

Do you have any more info on the utility's solid-state 70kVA transformer?

Also, having 100+ panels pushing power out to the grid on a residental service could have a few percent rise through the service transformer. Having the utility at the emergency maximum of 106% on the primary side with plus a few more percent through the service transformer gets you close to 10% overvoltage.

RE: De-Aliasing the Input to a Datalogger

Hi bacon4life,
You can read more about the guy's PV installation and grid connection here: thread1528-454094: Troubleshooting a Solar PV System

No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.

RE: De-Aliasing the Input to a Datalogger

It's been plugged into the wall in my house for over a week. Here's some of the data. Nothing very interesting. The voltage obviously peaks overnight, usually going up to 124 volts. It's also much more steady overnight. You can see that I turn on the coffeemaker and toaster at about 6:15 AM, and supper starts cooking between 6 and 7 PM.

Sorry, all this proves is that I am pretty dull. The point is to use it at Pierre's house, and in multiple points in his system.

No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


eBook - Manufacturing the Cars of Tomorrow
In this ebook, we'll explore how additive manufacturing is going to transform the way cars are made. This includes commentary from thought leaders such as Ford's CTO, Ken Washington, Customer case studies of ways 3D printing is being used today, and a variety of part examples where 3D printing is already impacting how automobiles are made. Download Now
White Paper - Smart Manufacturing for Semiconductor
New technologies and approaches present great opportunities for semiconductor manufacturers to achieve high levels of innovation, yield and improvement. This white paper explores some of these cutting-edge technologies and how they can be applied effectively in the semiconductor industry. Read about how Smart Manufacturing is transforming the semiconductor industry. Download Now
White Paper - Analysis and Simulation in Aircraft Structure Certification
Organizations using simulation and analysis tools effectively see the benefits in their ability to achieve certification faster and with drastically less total cost than those who do not maximize these tools. Read this White Paper to learn about how digital tools such as analysis and simulation help in aircraft structure certification. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close