Maker Pro
Maker Pro

How to stop spikes or dips in a 0-10v dc output

plisken

Aug 23, 2014
2
Joined
Aug 23, 2014
Messages
2
Hi there, firstly, I'm very new here, first post actually so appologies in advance if I've posted in the wrong place or [insert other reason here].

I'm looking for a little advice, I'll try and be as brief as possible while giving as much information as I think relevent. My knowledge is limited in this area, so apologies in advance...

I've got a very simply circuit diagram, here:
https://www.dropbox.com/s/py2uu7qcrwxywp9/capacitor.pdf?dl=0

My application is such that I have a 24v DC powered sensor and obviously a 24v DC supply. This sensor is a distance measurement device but importantly here, gives a 0-10v output and I find this fine, when measuring with a voltmeter, it acts exactly as expected, varying o/p voltage by object distance, but...

I am trying to log this using a logging device and software and find that I am getting the occasional peak or dip in my wave form, obviouly a split second variation from the flat output I expect and see on the voltmeter etc. So was wondering if a small capacitor accross the input to the logger or sensor output would help. I'm just wondering if this is a residual waveforme from the AC to DC (can't quite mind the name of what I'm referring to here).

So anyway, does any of what I'm saying make sense, ring any bells and more importantly, does my idea of a capacitor sound close or right and obviously any additional (not too technical) help would be greatly appreciated.

I guess if a capacitor is required, any pointers as to value, type etc?

Thanks in advance...
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Welcome to our forum-

Your questions are difficult to answer without knowing the details of the sensor's output, e.g. output resistance. A capacitor is a move in the right direction for smoothig a (almost) DC signal. However, a capacitor works only if there is a certain output resistance of the sensor. Otherwise the capacitor will follow the output's dips and spikes and just sink or source the current required. The datasheet of your sensor should state the utput resistance (or maybe it states a max.output current (possibly even a max. capacitive load)?.

Dimensioning a suitable capacitor also depends on the duration of the dips and spikes and hence the energy in these distortions that needs to be filtered.

You can start by placing a 100nF capacitor across the sensor's output and observe the log on the PC. Do you see any change at all? Is it good enough or not?
If yes, you're probably done.
If not, try a resistor in series from the + output of the sensor to the capacitor (capacitor is in parallel to the logger's input, this is called an RC low pass filter). Use 1kΩ for starters. What happens on the PC's log? Note that this resistor will reduce the input voltage to the logger by an amount that depends on the logger's input resistance (these resistors form a resistive potental divider). If the input resistance of the loger is very high (e.g. 1MΩ), you won't notice any diference. If it is low (e.g. 10kΩ), you will see a drop in voltage. Since this drop is proportional to the series resistance, you can correct it in software by multiplying al measured values by a corrective factor.

Sorry, that's all I can say so far with the limited information at hand.
 

plisken

Aug 23, 2014
2
Joined
Aug 23, 2014
Messages
2
Thanks for your very prompt reply, I'll try and gather some of the details oyu mention (not in office today so not so easy)

the sensor is as follows:
http://www.keyence.co.uk/products/sensor/photoelectric/lr-t/models/lr-tb5000cl/index.jsp

Data sheet says 0-10v output with an external load resistance of 5k ohm or more

Logger: http://sine.ni.com/nips/cds/view/p/lang/en/nid/201986

I've used these types of sensors many times and never had an problem but this is the first time I've used such logging software LABView http://www.ni.com/labview/ normally I do any PC aqusition/logging using VB6 and do my own trimming/flitering (centralising of data readings) in code.

I guess this is a normal type behavour to expect then? a result of as you say an "almost" dc signal. A voltmeter doest show these variations as it displays a running average or rms? but the logger or other device is showing real time, split second captures?

I'll order a small collection of capacitors around the values you mention and give it a go on Monday.

Thanks for your informative and prompt reply.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
I guess this is a normal type behavour to expect then? a result of as you say an "almost" dc signal. A voltmeter doest show these variations as it displays a running average or rms? but the logger or other device is showing real time, split second captures?
Yes. A multimeter integrates the measurand and therefore cannot show spikes. The logger on theother hand measures on a sampling basis (taking measurements every x milliseconds) and therefore will display these spikes.

Note that by adding an RC filter you will also slow down the response of the system. A first order RC filter (simply the resistor and capacitor as explaind above) has a so caled time constant tau=R*C. If you input a step response (e.g. the sensor output jumps from 0V to 10V as an object suddenly cmes into view), the filter will take approx. 3*tau=3*R*C to output the full level.
 
Top