Skip to content

This software has two use cases:- it calculates the charging parameters (current, voltage and power) of an electric vehicle (EV) by using current and voltage samples stored in memory- it serves as an Analog Front End (AFE) sending data over SPI.In both cases, current values are adjusted by rotating the potentiometer.

License

Notifications You must be signed in to change notification settings

nxp-appcodehub/dm-nxp-km-metrology

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NXP Application Code Hub

NXP KM metrology

NXP KM metrology software has two use cases:

  • it calculates the charging parameters (current, voltage and power) of an electric vehicle (EV) by using current and voltage samples stored in memory
  • it serves as an Analog Front End (AFE) sending data over SPI

In both cases, current values are adjusted by rotating the potentiometer.

Boards: TWR-KM35Z75M

Categories: Analog Front End, Industrial

Peripherals: DISPLAY, I2C, ADC, SPI, UART

Toolchains: MCUXpresso IDE

Table of Contents

  1. Software
  2. Hardware
  3. Setup
  4. Results
  5. Support
  6. Release Notes

1. Software

2. Hardware

Mandatory hardware:

  • TWR-KM35Z75M board
  • a board with exposed UART and SPI interfaces

Note: EVSE-SIG-BRD1X/2X is used in this document to exemplify hardware connections. If you are using another board, check the documentation and schematic to adapt the wiring.

3. Setup

3.1 Hardware assembly

To use TWR-KM35 for its metrology capabilities, you need only a UART connection between the TWR-KM35 and the EVSE-SIG-BRD1X/EVSE-SIG-BRD2X (or any other board), as illustrated in the following image.

plot

To use TWR-KM35 board as an AFE, you must use SPI interface. The UART connection is optional. The connections between the TWR-KM35 and the EVSE-SIG-BRD2X (or any other board) are illustrated in the following image.

plot

Connect a microUSB cable between you personal computer and J27 connector on TWR-KM35 to power on the board.

To power on the EVSE-SIG-BRD1X/EVSE-SIG-BRD2X, place J2 on position 1-2 and connect a 5V power supply to J1 barrel connector. If you are not using EVSE-SIG-BRD1X/EVSE-SIG-BRD2X, check the schematic of the corresponding board for powering options.

3.2 Software setup and flashing

  1. Clone the APP-CODE-HUB/dm-nxp-km-metrology
  2. Import the project from filesystem or archive

plot

  1. After importing the project, click on it in the workspace to select it, then click on the hammer button to build it
  2. To flash the project, go to Quickstart Panel and select Debug with LinkServer probes. When the debugger gets to main() function, click on Resume All Debug sessions to start the program

4. Results

Once the hardware connections are made and the TWR-KM35 is flashed, the current value is displayed on the board's display and metrology data is sent over UART.

To change the current value, rotate R21 potentiometer (upper right corner, on the back of the board).

plot

5. Support

Questions regarding the content/correctness of this example can be entered as Issues within this GitHub repository.

Warning: For more general technical questions regarding NXP Microcontrollers and the difference in expected functionality, enter your questions on the NXP Community Forum

Project Metadata

Board badge

Category badge Category badge

Peripheral badge Peripheral badge Peripheral badge Peripheral badge Peripheral badge

Toolchain badge

Follow us on Youtube Follow us on LinkedIn Follow us on Facebook Follow us on Twitter

6. Release Notes

Version Description / Update Date
1.2.0 Initial release on Application Code Hub April 11th 2025
Trademarks and Service Marks: There are a number of proprietary logos, service marks, trademarks, slogans and product designations ("Marks") found on this Site. By making the Marks available on this Site, NXP is not granting you a license to use them in any fashion. Access to this Site does not confer upon you any license to the Marks under any of NXP or any third party's intellectual property rights. While NXP encourages others to link to our URL, no NXP trademark or service mark may be used as a hyperlink without NXP’s prior written permission. The following Marks are the property of NXP. This list is not comprehensive; the absence of a Mark from the list does not constitute a waiver of intellectual property rights established by NXP in a Mark.
NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD, Airfast, Altivec, ByLink, CodeWarrior, ColdFire, ColdFire+, CoolFlux, CoolFlux DSP, DESFire, EdgeLock, EdgeScale, EdgeVerse, elQ, Embrace, Freescale, GreenChip, HITAG, ICODE and I-CODE, Immersiv3D, I2C-bus logo , JCOP, Kinetis, Layerscape, MagniV, Mantis, MCCI, MIFARE, MIFARE Classic, MIFARE FleX, MIFARE4Mobile, MIFARE Plus, MIFARE Ultralight, MiGLO, MOBILEGT, NTAG, PEG, Plus X, POR, PowerQUICC, Processor Expert, QorIQ, QorIQ Qonverge, RoadLink wordmark and logo, SafeAssure, SafeAssure logo , SmartLX, SmartMX, StarCore, Symphony, Tower, TriMedia, Trimension, UCODE, VortiQa, Vybrid are trademarks of NXP B.V. All other product or service names are the property of their respective owners. © 2021 NXP B.V.

About

This software has two use cases:- it calculates the charging parameters (current, voltage and power) of an electric vehicle (EV) by using current and voltage samples stored in memory- it serves as an Analog Front End (AFE) sending data over SPI.In both cases, current values are adjusted by rotating the potentiometer.

Resources

License

Stars

Watchers

Forks

Packages

No packages published