- The range 10 mA to 10A, I assume you want a resolution of 1 mA or something like that.
that means you want ~ a 10,000 : 1 ratio of measurement, so a 14 bit A/D will do OK. So use
DelSig, that will yield 133K SPS, more than enough.
- At each sample point you are getting instantaneous and V values. This ap note might help with the requisite calculations.
You are going to have to establish a period of the fundamental, that’s nothing more than a zero cross detector. Complicate dby need for AGC loop, or just use the sample set to find the zero cross assuming one period to the next values are stable, or use signal averaging to eliminate chenage in load effects.
Thanks Dana, I have been studying the concepts you mentioned. However, I could not have found a way to implement them. Could you give more details or circuit schematics?
The core of the approach is using an A/D converter, there are several example projects
on Creator Start page, "Find Example Project" link.
The A/D will measure voltage, and if you insert a low value R in one leg of the load, the V
drop across that R which indicates current. To get period you can either detect that in code
looking at your samples, or use a comparator signal conditioned to the AC line, its output
connects to a timer enable, and you measure the time from start of comparator trip to its
end, thats 1/2 period.
Tackle each phase of this 1 step at a time, and google searches will give you many hints,
references to work from.
1) Implement A/D, get it working, and measure voltage. Scale the line input to meet
2) Implement comparator and timer to measure period. Use PSOC to generate a frequency
of your choosing as your signal to measure. Again there are example projects for timer and
3) Google measure ac line load, something like that, for methods to measure load current,
and signal condition that to meet PSOC input limitations.
PSOC limitations for a signal input are Vdda >= Vinunknown >= Vssa.