Measure multiple loads using meter lib

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Measure multiple loads using meter lib

Jump to solution
3,131 Views
zixunli
Contributor I

Hi, we are a start up specialized in home automation. Now we want to upgrade our solution using kinetis-m mcu for power measure. We want to measure multiple parallel loads (heating, lighting, etc) in a single phase system, is the meter lib suitable for this application? If any modification is needed, could you send me the NDA document in order to get the source code? 

Regards, 

Zixun

0 Kudos
Reply
1 Solution
2,894 Views
MarMi
NXP Employee
NXP Employee

Hi Zixun,

Yes, you can make several calls to metering functions with different data structures where each data structure represents 1 phase meter.  Computing 4-6 loads will be demanding for higher sampling frequencies and hence you should also consider use of Kinetis-M with metering co processor (MKM34Z256) - configure your 1phase meter including required sampling rate in the configuration tool to see approximate requirements for core clock frequency for respective core.

I think that "meterlib1phkwh_test" example computed for multiple instances should do what you need.

Kind regards,

Martin M.

View solution in original post

9 Replies
2,894 Views
MarMi
NXP Employee
NXP Employee

Hi Zixun,

Filter library can process up to 4 current measurements (measured by SD ADC) and one/four voltages (measured by SAR ADC). How many single phase loads you want to measure?

Martin M.  

0 Kudos
Reply
2,894 Views
zixunli
Contributor I

Hi, we would like to have 6 current measurements in total. 

To have 4 measurements, you mean call 4 times 1ph function ?

0 Kudos
Reply
2,894 Views
MarMi
NXP Employee
NXP Employee

Hi Zixun,

From library point of view, it can be done but Kinetis-M has four SD ADC converters. It is better to use SD ADC for current measurement over SAR ADC.

Have you already evaluated any NXP metering library?

Kind regards,

Martin M. 

0 Kudos
Reply
2,894 Views
zixunli
Contributor I

In fact we need 4 primary and 2 auxiliary input, so using SAR ADC for auxiliary input is OK. 

I'm comparing multiple solutions and it looks like is the best mcu platform for us. If software is OK, I'll then test it with an evaluation board. 

0 Kudos
Reply
2,894 Views
zixunli
Contributor I

I was a little too quick when I ask questions. I reviewed the code and it seems like there is no problem using multiple loads as all data of one channel are packed in a structure.

I was confused because in the manual it says the meterlib take 2.4KB ram, so I thought maybe there are some sort of data buffer and it will be corrupted when using multiple channel.

0 Kudos
Reply
2,895 Views
MarMi
NXP Employee
NXP Employee

Hi Zixun,

Yes, you can make several calls to metering functions with different data structures where each data structure represents 1 phase meter.  Computing 4-6 loads will be demanding for higher sampling frequencies and hence you should also consider use of Kinetis-M with metering co processor (MKM34Z256) - configure your 1phase meter including required sampling rate in the configuration tool to see approximate requirements for core clock frequency for respective core.

I think that "meterlib1phkwh_test" example computed for multiple instances should do what you need.

Kind regards,

Martin M.

1,845 Views
GanesanGuru
Contributor IV

Hi @MarMi ,

I'm planning to work with MKM34Z256 MCU, hence which IDE should be chosen for metering applications ? I came across this, which suggests Application note software for AN4265 - Filter based metering. How to incorporate this metering lib into the IDE?

0 Kudos
Reply
1,827 Views
MarMi
NXP Employee
NXP Employee

Hello,
We used IAR EWARM tool chain the most in the past. Filter based metering library comes with library files supporting also gcc toolchains.

Let my colleagues, who works in metering area to provide up to date suggestions.

Kind regards,
Martin M. 

1,819 Views
GanesanGuru
Contributor IV

Thanks @MarMi ,

Is there any possibility download and combine this AN-SW file (which is based on Filter based AN4265, rather than FFT based which is actually used in DRM163 + IARv7), and use with other IDE's like MCUXpresso IDE / Keil / VS Code extensions?

PS : Even the example projects in that AN-SW file are compiled w.r.t IAR only

Tags (1)
0 Kudos
Reply