karan123
Super Member
- Total Posts : 1069
- Reward points : 0
- Joined: 2009/02/02 11:11:21
- Location: 0
- Status: offline
Read Sinusoidal Current Cycle by Cycle:
Hello,
How to read current ( Sin ) Cycle by Cycle with MCU (PIC18F4520) ADC of variable Inductive load ? Voltage lead/lag from Current.
-- Karan
|
Bob White
Super Member
- Total Posts : 370
- Reward points : 0
- Joined: 2010/11/06 19:52:38
- Location: Denver, Colorado
- Status: online
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 20:48:19
(permalink)
Your question is vague and ambiguous. What are you really asking?
About possible current sensors?
Algorithms to process the output of an A2D converter to compute the RMS current?
Something else?
|
karan123
Super Member
- Total Posts : 1069
- Reward points : 0
- Joined: 2009/02/02 11:11:21
- Location: 0
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 21:01:59
(permalink)
Your question is vague and ambiguous. What are you really asking?
I have to measure AC Current of Inductive load without External A2D Converter.
About possible current sensors? Rogowiski Coil.
Algorithms to process the output of an A2D converter to compute the RMS current? Yes, With Internal ADC of PIC But cycle by cycle RMS or Average Current.
Something else? See above
Thanks.
|
PStechPaul
Super Member
- Total Posts : 3048
- Reward points : 0
- Joined: 2006/06/27 16:11:32
- Location: Cockeysville, MD, USA
- Status: online
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 21:32:18
(permalink)
|
karan123
Super Member
- Total Posts : 1069
- Reward points : 0
- Joined: 2009/02/02 11:11:21
- Location: 0
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 21:50:27
(permalink)
PStechPaul This was extensively discussed in your previous thread several months ago. https://www.microchip.com/forums/m1148151.aspx You will need an integrator with the Rogowski coil.
Yes, Thanks ..As you said ,there is (in Software) No need of taking Zero Crossing of Current ,Zero Crossing ofLine Voltage will used to read cycle by cycle for measurement of Current. Is this vaild for Inductive Load? Where Voltage lead with current. The suggestion in that thread, I am not getting Appropriate results Thanks for your concern. -- Karan
|
ric
Super Member
- Total Posts : 30244
- Reward points : 0
- Joined: 2003/11/07 12:41:26
- Location: Australia, Melbourne
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 22:03:05
(permalink)
karan123 I am not getting Appropriate results
Could you be any less helpful in your replies? What on earth does "not getting Appropriate results" actually mean?
To get a useful answer, always state which PIC you are using!
|
PStechPaul
Super Member
- Total Posts : 3048
- Reward points : 0
- Joined: 2006/06/27 16:11:32
- Location: Cockeysville, MD, USA
- Status: online
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 22:18:30
(permalink)
If you are only reading current, the load does not matter. But if it is distorted, you should use a true RMS method. Just take 40 readings at a 2 kHz sampling rate (500 uSec/sample) which will measure a single cycle. Square each reading, total all 40, and take square root. Result is true RMS of one cycle. It may be better to start reading at a zero crossing, but not necessary.
|
karan123
Super Member
- Total Posts : 1069
- Reward points : 0
- Joined: 2009/02/02 11:11:21
- Location: 0
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 22:24:48
(permalink)
ric
karan123 I am not getting Appropriate results
Could you be any less helpful in your replies?What on earth does "not getting Appropriate results" actually mean?
Ok .. I mean to say that Current (Load) is significantly delay ( in milliseconds ) ZCD voltage in case Inductive load.Then how to measure cycle by cycle. -- Karan
|
karan123
Super Member
- Total Posts : 1069
- Reward points : 0
- Joined: 2009/02/02 11:11:21
- Location: 0
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 22:32:27
(permalink)
PStechPaul If you are only reading current, the load does not matter. But if it is distorted, you should use a true RMS method. Just take 40 readings at a 2 kHz sampling rate (500 uSec/sample) which will measure a single cycle. Square each reading, total all 40, and take square root. Result is true RMS of one cycle. It may be better to start reading at a zero crossing, but not necessary.
Ok.. Waveform is stable sin wave without any distortion. If current wave is shifted from (ZCD) voltage ,how the measurement could be accurate cycle by cycle. -- Karan
post edited by karan123 - 2021/02/21 22:36:59
|
karan123
Super Member
- Total Posts : 1069
- Reward points : 0
- Joined: 2009/02/02 11:11:21
- Location: 0
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 22:33:34
(permalink)
PStechPaul It may be better to start reading at a zero crossing, but not necessary.
Ok.. Waveform is stable sin wave without any distortion. If current wave is shifted from (ZCD) voltage ,how the measurement could be accurate cycle by cycle. -- Karan
post edited by karan123 - 2021/02/21 22:36:41
|
PStechPaul
Super Member
- Total Posts : 3048
- Reward points : 0
- Joined: 2006/06/27 16:11:32
- Location: Cockeysville, MD, USA
- Status: online
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 22:50:09
(permalink)
If you take samples over a period of time equal to that of a single cycle, it does not matter where the sampling starts. If you really want to, you can just detect a ZC of the current waveform.
|
karan123
Super Member
- Total Posts : 1069
- Reward points : 0
- Joined: 2009/02/02 11:11:21
- Location: 0
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 22:54:46
(permalink)
Ok... Thanks .
I will modify hardware accordingly to detect zero crossing of current. Actually I have to measure one cycle and control other (Next) cycle for CC.
-- Karan
|
davea
Super Member
- Total Posts : 643
- Reward points : 0
- Joined: 2016/01/28 13:12:13
- Location: Tampa Bay FL USA
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 23:11:39
(permalink)
Actually I have to measure one cycle and control other (Next) cycle for CC. what exactly are you trying to do.. measure power factor power factor correction does CC mean constant current
|
karan123
Super Member
- Total Posts : 1069
- Reward points : 0
- Joined: 2009/02/02 11:11:21
- Location: 0
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 23:16:34
(permalink)
Yes, CC means Constant But cycle by cycle. I have to meaure current (one) from thyristors and control on other (next) cycle to make and so on to make Constant current source.
Not for Power Factor.
|
davea
Super Member
- Total Posts : 643
- Reward points : 0
- Joined: 2016/01/28 13:12:13
- Location: Tampa Bay FL USA
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 23:41:29
(permalink)
at what current is the output AC or DC
|
PStechPaul
Super Member
- Total Posts : 3048
- Reward points : 0
- Joined: 2006/06/27 16:11:32
- Location: Cockeysville, MD, USA
- Status: online
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/21 23:53:57
(permalink)
First, provide code that successfully builds and runs and properly reads the output current. Once that is working well, add the code to adjust firing angle for the SCR controller.
|
karan123
Super Member
- Total Posts : 1069
- Reward points : 0
- Joined: 2009/02/02 11:11:21
- Location: 0
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/22 00:12:21
(permalink)
davea at what current is the output AC or DC
AC
|
PStechPaul
Super Member
- Total Posts : 3048
- Reward points : 0
- Joined: 2006/06/27 16:11:32
- Location: Cockeysville, MD, USA
- Status: online
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/22 00:34:07
(permalink)
If the current control is a dual SCR with phase firing, the waveform will have a sharp transition which will cause current measurement error because of the sampling frequency. With 10 samples per half-cycle, the RMS measurement can have error in the order of 10%. Faster sampling can improve this, and possibly a series inductor might smooth the sharp transition and improve accuracy.
|
karan123
Super Member
- Total Posts : 1069
- Reward points : 0
- Joined: 2009/02/02 11:11:21
- Location: 0
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/22 03:33:09
(permalink)
PStechPaul If the current control is a dual SCR with phase firing, the waveform will have a sharp transition which will cause current measurement error because of the sampling frequency. With 10 samples per half-cycle, the RMS measurement can have error in the order of 10%. Faster sampling can improve this, and possibly a series inductor might smooth the sharp transition and improve accuracy.
I will send waveform after some time.
|
TS9
Super Member
- Total Posts : 936
- Reward points : 0
- Joined: 2010/05/07 10:52:22
- Status: offline
Re: Read Sinusoidal Current Cycle by Cycle:
2021/02/26 10:05:14
(permalink)
What Intergrator circuit you have used ?
post edited by TS9 - 2021/02/26 10:17:51
|