attila Posted September 12, 2018 Share Posted September 12, 2018 I've got a question on how to measure the capacitance, charge... Link to comment Share on other sites More sharing options...
attila Posted September 12, 2018 Author Share Posted September 12, 2018 1. The best, most accurate way to measure the capacitor is using the Impedance Analyzer interface. For this you can use the Impedance Analyzer adapter for Analog Discovery or a using reference resistor with a circuit setup shown in help.https://store.digilentinc.com/impedance-analyzer-for-analog-discovery/ https://forum.digilentinc.com/topic/15602-impedance-analyzer-internal-compensation/?do=findComment&comment=38071 2. You can use a custom measurement to calculate the capacitance from charge/discharge. This is useful for bigger capacitors for faster measurement. Workspace: capacitor.dwf3work Resistor: 1000 Capacitance: var res = Channel.measure("Resistor") // 1000 var hz = Time.Rate.real // sample rate var data = Channel.visibledata var samples = data.length-1 var vpeak = 100 var ipeak = -1 var v = 0 var v2 = 0 var v3 = 0 var charge = false var charge2 = false var charge3 = false var value = 0 var count = 0 for(var i = 0; i <= samples; i++){ v3 = v2 v2 = v v = data[i] charge3 = charge2 charge2 = charge if(v2!=v) charge = v>v2 // filter charge/discharge start detection from noise if((charge3!=charge2 && charge2==charge) || i==samples){ if(ipeak>=0 && i-ipeak>10){ // make sure to have sufficient samples var d = vpeak/v3 if(d<1) d = 1.0/d if(d>3){ // make sure to have significant voltage difference value += (i-ipeak-2)/hz/logn(d)/res count++ } } ipeak = i // store index for time calculation vpeak = v // and peak voltage for next measurement } } count?value/count:0 // average 3. In order to measure the energy, WF v3.8.12 will add integrate feature for math channels. This adds initialization option where you can declare global variables, like one to store the sum. Workspace: energy.dwf3work 4. To measure the charge: Workspace: charge.dwf3work Link to comment Share on other sites More sharing options...
Question
attila
I've got a question on how to measure the capacitance, charge...
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.