• AVR Freaks

Helpful ReplyHot!Is there a way to increase the acquisition time of MCP3421?

Author
avais20
Starting Member
  • Total Posts : 54
  • Reward points : 0
  • Joined: 2012/04/26 11:39:42
  • Location: 0
  • Status: offline
2019/12/04 09:54:22 (permalink)
0

Is there a way to increase the acquisition time of MCP3421?

Hi,
Is there a way to increase the acquisition time of  MCP3421?
 
#1
ric
Super Member
  • Total Posts : 27966
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/04 15:10:34 (permalink)
0
So you want it to be slower?
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#2
Mysil
Super Member
  • Total Posts : 3676
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/04 15:52:23 (permalink)
0
Hi,
What are you up to?
If there is much too high input impedance, then you may try with a capacitor.
Between the 2 input pins if doing differential measurements.
If you are doing single ended measurements, then the other input pin must still be connected,
to ground, if that is the reference of measurement you want.
Something between 1 nF and 100 nF depending on frequency you are trying to measure.
 
You may try to use the One shot conversion mode, with a interval of your choice.
 
What is the signal you are trying to measure?
These devices work by doing a lot of separate measurements in sequence, and calculating the average,
but this doesn't help if there is low frequency noise.
 
    Mysil
post edited by Mysil - 2019/12/04 15:56:50
#3
ric
Super Member
  • Total Posts : 27966
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/04 16:03:05 (permalink)
0
I suspect they really want to REDUCE the acquisition time.
If you're going to be so terse in your question, you need to get your terminology right!
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#4
avais20
Starting Member
  • Total Posts : 54
  • Reward points : 0
  • Joined: 2012/04/26 11:39:42
  • Location: 0
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/05 03:11:56 (permalink)
0
Thank you Mysil ,Yes the input impedance is very high. Adding a Capacitor is the simple solution that was not coming to my mind despite repeated retakes.
My previous question was: here https://www.microchip.com/forums/m1110255.aspx?tree=true
Now i will  add a capacitor between two resistor pairs so the high voltage pulse will be filtered out and maximum input current specification of ADC will also be met. The high voltage pulse is 600V for 1 to 5 ms.
 
 ------R1------ ----R2-----  <IN+
                   =C=
-------R3----- -----R4------ <IN-
 
I think increasing the acquisition time might also have worked.
I will check the result of adding the capacitor and update soon. 
 
Thanks
 
#5
Mysil
Super Member
  • Total Posts : 3676
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/06 11:58:50 (permalink) ☄ Helpfulby avais20 2019/12/12 09:13:18
0
Hi,
You cannot scale down a voltage with circuit as shown in message #5.
 
Be aware of the Maximum rating in the datasheet for the ADC chip:
All inputs and outputs w.r.t VSS ............... –0.3V to VDD+0.3V
Anything outside of this,
then current will start flowing in ESD protection diodes,
and cause all kinds of strange effects.
 
You must create a voltage divider using at least one more resistor:
    ----R1----+----R2----+---+ >IN+
                         |   |
                         R5  C1
                         |   |
    ----R3----+----R4----+---+ >IN-  


But you still do not know what common-mode voltage will be present on the input pins of the voltage sensor.
Anything other than completely symmetrical voltage on the high voltage connection, with respect to Vss of the sensor chip, will cause strange effects.

I would try to create a floating midpoint between Vss and Vdd of the sensor chip, something like this:
    ----R1----+----R2----+---------+ >IN+
                         |         |
                         R5        C1
                         |         |
                  Vss-R7-+-R8-Vdd  |
                         |         |
                         R6        |
                         |         |
    ----R3----+----R4----+---------+ >IN-  

R5 = R6 = R7 = R8 = 10 kOhm
R1 = R2 = R3 = R4 = 1.5 MOhm

This could be able to cope with anything between -600 V to +600
on either of the input connections, with reference to Vss, that is ground of the sensor supply connection, and the microcontroller it may be connected to.


    Mysil
#6
Mysil
Super Member
  • Total Posts : 3676
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/06 12:23:08 (permalink)
0
Then, if you are trying to measure a pulse, set the ADC converter  to PGA amplifier = 1,
and the measurement sequence to the shortest value possible,
that is 240 samples/s, implies 12 bit mode.
With 1 sample every 4 milliseconds, there is a 1/4 possibility to measure the pulse, if the pulse is 1 millisecond long.
 
    Mysil
 
#7
avais20
Starting Member
  • Total Posts : 54
  • Reward points : 0
  • Joined: 2012/04/26 11:39:42
  • Location: 0
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/11 13:27:35 (permalink)
0
[image]E:\1.JPG[/image]
Well Mysil it works, A simplified schematic is uploaded.
The charged capacitor is discharged on triggering the SCR through RL which is destroyed in the process.
I will measure RL in parallel with the shunt resistors. The maximum capacitor discharge time is 0.2 seconds
when RL is not connected. I want the MCP 3421 to be able to always safely bear the 600 volts pulse. And
donot want to add a relay to disconnect it from RL. The circuit is 9volts battery operated. MCP3421 connects
to 18F46k22.
I think the circut shown bears the high side A+ well. What is your opinion about the ground side?
#8
avais20
Starting Member
  • Total Posts : 54
  • Reward points : 0
  • Joined: 2012/04/26 11:39:42
  • Location: 0
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/11 13:54:20 (permalink)
0
Well it was tough uploading an image.
post edited by avais20 - 2019/12/11 14:02:02

Attached Image(s)

#9
avais20
Starting Member
  • Total Posts : 54
  • Reward points : 0
  • Joined: 2012/04/26 11:39:42
  • Location: 0
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/11 13:54:56 (permalink)
#10
Mysil
Super Member
  • Total Posts : 3676
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/11 16:49:09 (permalink)
0
Hi,
There seem to me that there may be some mistakes or inaccuriacies in the diagram in message #9.
I think D4 is shown wrong, I think it should be connected to V33 instead.
Then  D1 seem to be turned the wrong way around.
More important, I would prefer the clamping diodes, 
D1 and D2 to be connected to the junctions between 470 k and 10 k resistors R2 and R3,
and D3 and D4 to be connected to junction between R5 and R6.
There should be nothing else connected to junction between 470 k resistors R1 and R2,
nor R4 and R5.
The reason for using 2 high value resistors in series, is voltage rating limitation end to end for each resistor.
 
Use of Ground connection symbol in the diagram is confusing and misleading.
You may already have done it better in actual circuit,
where power supply in the Battery powered Instrument part of the circuit,
is hopefully isolated and floating with respect to the high voltage power circuit.
It might be better to use a different symbol and the label Vss for the low side of V33 power
connected to MCP3421, PIC18F46K22 and a display or whatever.
 
I still do not like the input signal connection to  Vin+ Pin 1 and Vin- pin 6,
I still want a 10 k resistor connected between Pin 1 and Pin 6,
but with clamping diodes in place and correctly connected,
there will be nothing destroyed.
And with the battery powered instrument suitably  enclosed in a isolated housing, it may even be safe.
 
    Mysil
#11
PStechPaul
Super Member
  • Total Posts : 2810
  • Reward points : 0
  • Joined: 2006/06/27 16:11:32
  • Location: Cockeysville, MD, USA
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/11 21:48:20 (permalink)
0
There do seem to be multiple problems in the schematic:

I agree with most of Mysil's observations, plus:
 
1. The SCR Q1 will short the 600V supply to GND.
2. I assume you will be using the LM334 1mA current to measure resistance of RL. It will read 3 mV for 3 ohms and 400 mV for 400 ohms.
3. There seems to be no reason for a differential amplifier to measure voltage on RL to GND.
4. The time constant for the RC network is about 1 second (4x470k x 0.47 uF) - 5 sec to 1%
5. The purpose of the 47 uH inductor L1 is unclear
6. What is supposed to happen when relay K1 closes?

 
#12
avais20
Starting Member
  • Total Posts : 54
  • Reward points : 0
  • Joined: 2012/04/26 11:39:42
  • Location: 0
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/12 08:51:22 (permalink)
0
The circuit is not isolated yet the Ground for Capacitor is connected to MCP ground as shown.
A 10 K resistor between 1 and 6 will discharge the capacitor CX1 and is not possible.
I initially tested with Shottky Diode from CX1 to V33 but the leakage IR charged the capacitor.
The results are acceptable with any or all of the D1 ,D2,D3,D4 in place. UF4007 and 1N4007
show good results.
If i move D2 to R2 R3 junction then it becomes parallel to the built in diode of MCP3421 and i want 
to avoid the internal diode conducting. I am sure about the positive side but still not sure about 
the negative side when the capacitor discharges. I have tested the discharge several times the
18F and MCP are not damaged but i also want to fully understand what is happening here.
The relay is for additional safety and provides mechanical cut off from the charged capacitor.
First the relay is closed and then the SCR is triggered. This forces the capacitor to discharge through RL.
 
Yes the time constant is too much. I will reduce R and C values to bring it to about 0.25 Seconds. 
 
 
 
#13
avais20
Starting Member
  • Total Posts : 54
  • Reward points : 0
  • Joined: 2012/04/26 11:39:42
  • Location: 0
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/12 09:10:01 (permalink)
0
Thanks for pointing out 4x470k , i would have missed that and used 2X470k.
The inductor is to limit the current a bit at start of pulse. It is relatively small and 
 saturates quickly. 
 
#14
PStechPaul
Super Member
  • Total Posts : 2810
  • Reward points : 0
  • Joined: 2006/06/27 16:11:32
  • Location: Cockeysville, MD, USA
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/12 14:56:45 (permalink)
0
R3 and R6 are connected to the MCP3421 so the external diodes will conduct before those of the IC.
 
Can your 600V supply (and the SCR) handle a short to GND?
 
It is unclear what you are doing. It looks like you may be analyzing the characteristics of the resistor RL when subjected to high voltage. I would think you would want to read the current through it as it is overloaded and destructs, but that would require a current measuring shunt and a high sampling rate with a fast TC to gather data when the pulse is applied.
 
Also, with the circuit as shown, the voltage on the (+) input to the ADC will be negative when the capacitor is discharged.
post edited by PStechPaul - 2019/12/12 15:02:58

 
#15
Mysil
Super Member
  • Total Posts : 3676
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: Is there a way to increase the acquisition time of MCP3421? 2019/12/13 05:11:49 (permalink)
0
Hi,
It is still unclear to me, what kind of measurement the original poster is trying to achieve.
Circuit as shown, may seem to work as some kind of integrating pulse detector,
somewhat like a VU-meter.
Measuremen of negative differential voltage is not a problem in itself,
the ADC in MCP3421 is able to measure voltage differences between VIN+ and VIN-,
both positive and negative, as long as the circuit is floating,
and biased such that both VIN+ and VIN- pins are both within the allowed range: Vss - 0.3V to Vdd + 0.3V,
and stay within that range also when a measurement signal is applied.
Range of measurement is: (VIN+) - (VIN-)  between -2.048 V to +2.048 V, when the builtin amplifier is set to 1x. 
 
To use the full range of measurements, both positive and negative, the input pins Vin+ and Vin-
should both be somewhere around midway between Vss and Vdd, when there is no measurement signal.
If Vin- is tied to Vss, then Vin+ can only measure positive voltages.
If Vin- is tied to Vdd  aka. V33, then Vin+ can only measure negative voltages.
 
I still maintain that D1 and D2 should be connected to junction R2 to R3,
and D3 and D4 should be connected to junction R5 to R6.
Integrating capacitor CX1 should be moved to connect directly to VIN+ and VIN- input pins.
 
    Mysil
#16
Jump to:
© 2020 APG vNext Commercial Version 4.5