Abov A31L12X Application Note

Current sensing board design guide using low power mcu
Table of Contents

Advertisement

Quick Links

A31L12X
Current Sensing Board Design Guide
using Low Power MCU
Application Note
Version 1.00
Global Top Smart MCU Innovator, ABOV Semiconductor
www.abovsemi.com

Advertisement

Table of Contents
loading

Summary of Contents for Abov A31L12X

  • Page 1 A31L12X Current Sensing Board Design Guide using Low Power MCU Application Note Version 1.00 Global Top Smart MCU Innovator, ABOV Semiconductor www.abovsemi.com...
  • Page 2: Table Of Contents

    Figure 5. Internal SCK, SPI Comm. Operation 24-bit ADC (LTC2400)........... 9 Figure 6. 4-Digit LCD Panel (GDC8310) ....................10 Figure 7. Connections Circuit Diagram of A31L12X and 4-Digit LCD Panel ........11 Figure 8. Current Measurement State Machine Diagram ..............12 Figure 9.
  • Page 3: Introduction

    A31L12X Current Sensing Board Design Guide introduces a method to design a current sensing board using an A31L12X that is a 32-bit Ultra-Low Power MCU. This document intends that users should design the current sensing board to measure the operating current of an application board having A31L12X and check the operating current of the A31L12X.
  • Page 4: Current Sensing Board Block Diagram

    2. Current Sensing Board Block Diagram 32-bit MCU Current Sensing Board Design Guide Current Sensing Board Block Diagram Figure 1 shows a functional block diagram of the Current Sensing Board. Figure 1. Functional Block Diagram...
  • Page 5: Hardware Description: Parts And Circuits

    32-bit MCU Current Sensing Board Design Guide 3. Hardware Description: Parts and Circuits Hardware Description: Parts and Circuits In Chapter 3, parts and circuits of the Current Sensing Board are introduced. Current-Sense Amplifier (INA190) The Current-Sense Amplifier (INA190), also called a current-shunt monitor, is commonly used for the precision current measurement.
  • Page 6 3. Hardware Description: Parts and Circuits 32-bit MCU Current Sensing Board Design Guide Users need to determine the range of the current to sense before selecting the resistor value of R and the INA190 GAIN. sense ① Using two formulas, example values of the R and INA190 Gain are determined: sense ����...
  • Page 7: Figure 3. Current Sense Amplifier Circuit Layout Example

    32-bit MCU Current Sensing Board Design Guide 3. Hardware Description: Parts and Circuits The one-way application of the INA190 described in step 1 has the following layout guideline: ① As shown in Figure 3, a bypass capacitor of the power source must be placed close to the power and ground pin of the INA190.
  • Page 8: 24-Bit Analog To Digital Converter (Ltc2400)

    3. Hardware Description: Parts and Circuits 32-bit MCU Current Sensing Board Design Guide 24-Bit Analog to Digital Converter (LTC2400) The 24-bit Analog to Digital Converter is used to convert the precision analog voltage signal to digital signal. Small voltage signal across the small Shunt (Sensing) resistor is sensed to measure the exact micro current.
  • Page 9: Figure 5. Internal Sck, Spi Comm. Operation 24-Bit Adc (Ltc2400)

    (A31L12X) becomes Slave to receive the ADC data through the MOSI pin. ⑤ On the other hand, the CS of the LTC2400 is input and the MCU (A31L12X) becomes Master. Its output signal controls specific timing and allows to start communication through the SCK and SDO of the LTC2400.
  • Page 10: Lcd Module And Interfaces

    3. Hardware Description: Parts and Circuits 32-bit MCU Current Sensing Board Design Guide LCD Module and Interfaces The LCD module and interfaces are used for confirming the control operation and checking output values. The LCD module uses 4-digit 7-segment LCD to display the measured current value in uA or mA units including decimal points.
  • Page 11: Figure 7. Connections Circuit Diagram Of A31L12X And 4-Digit Lcd Panel

    Figure 6 shows a basic circuit configuration of the LCD module. Users who use this part for LCD control need to consider the followings: The LCD module in Figure 6 can be controlled by using LCD driver peripherals of A31L12X. The GDC8310 operates with 3.3V of operation voltage and uses 1/4 Duty 1/3 Bias drive techniques.
  • Page 12: Software Structure

    4. Software Structure 32-bit MCU Current Sensing Board Design Guide Software Structure In Chapter 4, knowledge that software developers must have is described. Figure 8 shows a State Machine diagram of the software that drives the Current Sensing Board. "Click Button" Start Current Measurement for 5 seconds "5 seconds later"...
  • Page 13: State Machine Software Code

    32-bit MCU Current Sensing Board Design Guide 4. Software Structure State Machine Software Code Figure 9. Function Declaration using Function Pointers Figure 9 shows an example code of function declarations that use Function Pointers. UponEnter[S_MAX] includes functions executed when the current State changes (entering new State) due to the event occurrence such as button-pressing.
  • Page 14: Figure 10. Example Code 1/2 Showing Statemachine Function Structure

    4. Software Structure 32-bit MCU Current Sensing Board Design Guide Figure 10. Example Code 1/2 showing StateMachine Function Structure Figure 10 shows the first half of example code that is implemented in the StateMachine function. The example code operates as follows: When the StateMachine function is called, the event and current State is stored as parameters.
  • Page 15: Figure 11. Example Code 2/2 Showing Statemachine Function Structure

    32-bit MCU Current Sensing Board Design Guide 4. Software Structure Figure 11. Example Code 2/2 showing StateMachine Function Structure Figure 11 shows the second half of example code that is implemented in the StateMachine function. The example code operates as follows: According to the current State and next State processed in the first half of the example code, functions to be called are determined.
  • Page 16: 24-Bit Adc Communication Software Code

    4. Software Structure 32-bit MCU Current Sensing Board Design Guide 24-bit ADC Communication Software Code Figure 12 shows an example software code that intends to communicate with the 24-bit ADC shown in Figure 5. Figure 12. 24-bit ADC (LTC2400) SPI Comm. Operation Code and Waveforms If the MCU sets the CS pin to LOW, the ADC outputs through the SCK and SDO (always to LOW).
  • Page 17 32-bit MCU Current Sensing Board Design Guide 4. Software Structure To receive ADC 32-bit data consecutively, the level state of the SDO is read by using the GPIO external interrupt at Positive Edge (see the above example code in Figure 12). When spi_data fills up the 32-bit length, BIT 4 to BIT 27 that are corresponding to the 24-bit ADC data is converted to 24-bit data by bit masking.
  • Page 18: Quick Start Guide: Setup And Use

    A button controlling the start and termination of the current measurement An input terminal dedicated to a 9V voltage battery A terminal for the MCU (A31L12X) download and debugging (SWD). Please refer to the pin map in red box next to Debugger terminal in Figure 13.
  • Page 19: Example Firmware Project Compiling And Downloading

    32-bit MCU Current Sensing Board Design Guide 5. Quick Start Guide: Setup and Use Example Firmware Project Compiling and Downloading In this section, users can learn a method to compile, debug, and download an example firmware project. Figure 14. Example Project Folder Directory Figure 15.
  • Page 20 5. Quick Start Guide: Setup and Use 32-bit MCU Current Sensing Board Design Guide Click on the icon 1 shown in Figure 15 to start compilation. When the compilation is completed, connect to the debugger terminal on the example board. Click on the icon 2 shown in Figure 15 to start firmware download.
  • Page 21: How To Use Current Measurement Board

    32-bit MCU Current Sensing Board Design Guide 5. Quick Start Guide: Setup and Use How to use Current Measurement Board This section explains a method to measure the current by using the Current Sensing Board. Figure 16. Current Sensing Board Connections Connections of the Current Sensing Board shown in Figure 16 are detailed in the followings: Connect the board as shown in Figure 16 and turn on the power of the Current Sensing Board.
  • Page 22 5. Quick Start Guide: Setup and Use 32-bit MCU Current Sensing Board Design Guide Press the button 4 shown in Figure 16 to start the current measurement. — If pressing the button for a long period, it means to proceed the current measurement continuously.
  • Page 23: Example Circuit Diagram And Firmware Source For Current Sensing Board

    32-bit MCU Current Sensing Board Design Guide 5. Quick Start Guide: Setup and Use Example Circuit Diagram and Firmware Source for Current Sensing Board Figure 17 and Figure 18 show the example circuit diagrams of the Current Sensing Board. Figure 17. Example Circuit Diagram of Current Sensing Board (1)
  • Page 24: Figure 18. Example Circuit Diagram Of Current Sensing Board (2)

    5. Quick Start Guide: Setup and Use 32-bit MCU Current Sensing Board Design Guide Figure 18. Example Circuit Diagram of Current Sensing Board (2)
  • Page 25 32-bit MCU Current Sensing Board Design Guide 5. Quick Start Guide: Setup and Use By providing the example source on ABOV’s website, users can open the example firmware and utilize it in actual design.
  • Page 26: Conclusion

    6. Conclusion 32-bit MCU Current Sensing Board Design Guide Conclusion This document introduces a method to design hardware and configure software for the current sensing and measurement. This document provides actual example board to help users design and use the hardware quickly.
  • Page 27: References

    32-bit MCU Current Sensing Board Design Guide 7. References References Texas Instrument — INA190 (Current-Sense Amplifier)  Linear Technology — LCT2400 (24-bit ADC)  ABOV Semi — A31L12X (32bit-MCU) ...
  • Page 28: Revision History

    Revision History 32-bit MCU Current Sensing Board Design Guide Revision History Version Date Description 1.00 20.11.30 Initial preliminary version created...
  • Page 29 ABOV Semiconductor ("ABOV") reserves the right to make changes, corrections, enhancements, modifications, and improvements to ABOV products and/or to this document at any time without notice. ABOV does not give warranties as to the accuracy or completeness of the information included herein. Purchasers should obtain the latest relevant information of ABOV products before placing orders.

Table of Contents