Introduction
Today, more and more designers are turning to electronic microcontrollers to control power stages in motor control and digital power systems. Using the integrated analog comparator functions of microcontrollers, such as the C2000™ Piccolo™ microcontrollers from Texas Instruments (TI), can protect system power supplies while also allowing designers to reduce the number of external analog components required at the board level. In such motor control and digital power systems, designers are still limited to the analog domain when it comes to protecting against overvoltage or undervoltage in the event of execution errors in the microcontroller itself. By using the integrated analog functions of the TI C2000 Piccolo microcontroller family, systems can be designed around a single controller without the need for external support circuitry. This primarily involves using analog comparators to monitor overvoltage or undervoltage and overcurrent or undercurrent events in the analog domain of the power stage.
Advantages of Piccolo Microprocessors
Piccolo microcontrollers use TI's high-performance TMS320C28x™ core to provide all the performance and peripherals required to control a system with a single standalone controller. With ample headroom and dedicated peripherals, Piccolo microcontrollers enable developers to implement more advanced control algorithms, further improving performance while reducing system cost.
The Piccolo microcontroller architecture has been optimized for digital control applications, with advanced architectural features and enhanced high-speed signal processing capabilities. The Piccolo's main CPU core has built-in digital signal processing (DSP) functions such as single-cycle 32×32-bit multiplication and accumulation units, which greatly improves the calculation speed. In addition, control peripherals such as analog-to-digital converters (ADCs) and pulse width modulators (PWMs) are designed to be very flexible and can be easily adapted to almost any purpose with minimal software overhead. For example, the ADC has an automatic sequencer that allows developers to program it to cycle through samples in a specific order so that the value is ready when the application needs it. With smarter control peripherals and a powerful CPU core, the control loop runs tighter, improving the dynamic characteristics of the control algorithm and reducing interference behavior.
Key Piccolo MCU features include:
• 40 to 90 MIPS of processing performance
• Full-featured operation from a single 3.3-V supply
• Dual internal high-precision oscillators; no external crystal required
• 12-bit ADC with 16 channels and a maximum sampling rate of 4.6 megasamples per second
• Up to 19 channels of PWM outputs with configurable automatic dead time
• Up to 8 of the 19 PWM channels can operate in high-resolution mode, which can be as low as 150 picoseconds
• Integrated analog comparators connect directly between dedicated inputs and PWM outputs (and dedicated output channels), eliminating the need for external analog components
Piccolo MCUs integrate analog comparators
TI's Piccolo microcontroller family offers two or three analog comparators, depending on the device family. In this article, we will focus on the F2802x Piccolo microcontroller family, which is equipped with two comparators. Although both comparators are integrated into the digital device, they operate similarly to traditional 30nS analog comparators. The two comparators are connected to the internal clock of the F2802/3x/6x microcontrollers.
Asynchronous – The comparator blocks operate as long as the device itself has power. The two comparators have two inputs (this is similar to a standard analog comparator, but they are connected to the device pins through the analog input/output (AIO) mux) and have the additional ability to provide an internal reference to the voltage by using the internal digital-to-analog converter (DAC) on the device. This internal DAC function is very important in digital power stage applications such as peak current mode control, because the DAC can be used as a ramp generator for the peak current mode trip point. The output of the comparator block can also be used internally by connecting to the PWM trip area, or referenced externally through the GPIO mux. This white paper focuses on the F2802x device family, but the internal comparator function can also be converted to the F2803x and F2806x Piccolo families.
Using the comparator externally (for F2802x Piccolo microcontrollers)
Because the comparators inside the Piccolo F2802x microcontrollers are implemented as true analog components, they can be used for control functions external to the processor. Referring to Figure 1 below, changes can be made in the general purpose input/output (GPIO) mux to connect the output of the comparator to an external device pin. Rather than having the comparator trigger an internal PWM event (such as when used for "peak current mode control"), the GPIO mux allows the comparator to output an active high or low signal external to the device. The analog input trip point can be characterized as either an internal or external reference with a maximum input of 3.3 volts.
Figure 1. Comparator output achieved with changes in the GPIO mux.
Let’s look at one of these use cases: For systems that use analog controllers in the power stage, the number of board-level components can be reduced when the F2802x Piccolo microcontroller is used as a “maintenance management” microcontroller. This is much the same as in digital control systems, where the analog comparator function can be used to enable or disable the power stage when used with a power device with an enable or disable pin. In many cases, analog comparators can also be used to trip relays in the system or initiate specific processor tasks. Now we can integrate these functions into the microcontroller itself instead of implementing them with external components, saving board space and cost.
Demonstrates the Analog Comparator on the F2802x Piccolo Microprocessor
Now that we have seen the structure and setup of the analog comparators within the Piccolo F2802x microcontroller family, we will now focus on how to use these comparators within the development environment of the TI C2000 LaunchPad evaluation kit. The C2000 LaunchPad is a low-cost evaluation kit that features the F28027 Piccolo microcontroller. The C2000 LaunchPad is equipped with pin headers that allow designers to test the various analog and digital inputs and outputs of the C2000 microcontroller. The kit also includes a separate USB to JTAG interface, which provides protection for the development PC while eliminating the need for expensive external emulator hardware. For the software setup in this example, we will demonstrate the VisSim model-based embedded graphical software tool provided by Visual Solutions, Inc. A two-month free trial of VisSim can be downloaded directly from the company's website at www.vissim.com.
Test case – Comparator event of external reference triggers PWM event
In this test case using the C2000 LaunchPad (Figure 2), we have a very simple VisSim graph that generates a 25Khz PWM signal to drive GPIO0 and GPIO1; it also has an externally referenced comparator signal that triggers a corresponding pair of high and low PWM events and GPIO trips. The example below is a screenshot of the VisSim graph, with the comparator output levels in blue and green and the voltage applied to the input A comparator pin in yellow. In the VisSim graph, the input voltage has been normalized to represent VDDA as 1. On the C2000 LaunchPad, VDDA is set to 3.3. As shown in the figure, we cycle the input signal between 0 and 3.3 V.
In the VisSim graph, the Comparator-1 DAC is set to 0.1 full scale (0.33V) and the Comparator-2 DAC is set to 0.9 full scale (2.97V). The DAC values are graphically represented in red in the same subgraph as the input voltages so that it is obvious when a comparator trips. Additionally, we have configured Comparator-1 to fully turn the PWM on when the input voltage is below the DAC value of 0.33V. We have also configured Comparator-2 to fully turn the PWM off when the input voltage exceeds 2.97V, and it also trips GPIO-3 (the hardware also allows the PWM to enter HiZ mode when a comparator event occurs). When running the VisSim graph, the LEDs on the C2000 LaunchPad will display at medium brightness if the voltages provided are within the normal range of the comparators, or if no voltage is applied to ADCIN2 or ADCIN4. Therefore, when the input voltage is below 0.33V, the LED will be off, and when the input voltage is above 2.97V, the LED will be at full brightness. Since we also need to demonstrate the use of the comparator input and output, the output of COMP2DAC is also connected to GPIO3. This can indicate the use when an event is triggered external to the F28027 Piccolo microcontroller, such as shutting down an external power stage. When we connect ADCINA4 to 3.3V, the brightness of the two rightmost LEDs will be at full brightness, while the LED on GPIO3, which is on the leftmost, will be off. This indicates that the comparator is triggering GPIO3 high. We can also use an oscilloscope on pin J1-5 and see the logic level change when we connect or disconnect 3.3V to pin J1-6.
If a variable voltage source is not available, you can connect a jumper between the GND pin and ADCIN2 (jumper from J5-2 to J1-8), in which case the PWM will trip due to low input voltage and the LED will turn off. If we remove the jumper, the brightness of the LED will return to medium brightness. We can then connect 3.3V to ADCIN2 (jumper from J1-1 to J1-6), in which case the PWM will trip because the high threshold of the comparator is reached, the brightness of the LED will reach maximum and the LED on GPIO-3 will turn off. Removing the jumper again will return the LED to medium brightness, and the LED on the leftmost GPIO-3 of the C2000 LaunchPad will light up.
Figure 2. VisSim diagram of two comparator trigger events affecting the PWM output of the VisSim microcontroller.
The following figure (Figure 3) is a diagram of VisSim actually running on the C2000 LaunchPad hardware. When initializing the comparator DACs for the threshold levels, we use a fixed point constant of 0.1 for Comparator-1 and 0.9 for Comparator-2. (0.1@Fx6,16 corresponds to 0.33V and 0.9@Fx6,16 corresponds to 2.97V.) The C2000 LaunchPad will support ADC inputs between GND and 3.3V.
Note that in this example we were able to set up the entire structure including the PWM unit, ADC input, comparator, and corresponding GPIO output events without writing any code.
Figure 3. VisSim diagram running on C2000 LaunchPad hardware
This example of testing the comparator functionality on a C2000 LaunchPad can be obtained in VisSim by going to Embedded->Examples->Piccolo->Launchpad and selecting either PWMComparatorTRIP2.
in conclusion
In this article, we have discussed the possibilities of increasing system functionality while reducing external component requirements through the analog comparator functions of the Piccolo microcontroller unit, which helps save cost and board space. We have also taken a detailed look at the setup and demonstration of these functions using the low-cost C2000 LaunchPad platform and the fully graphical VisSim programming solution.
Learn more
For more examples of applications, hardware and software, see TI's controlSUITE™ software. This downloadable GUI software features C2000-based development tools, application notes, design guides, hardware schematics and software examples, including digital power and motor control libraries compatible with the F2802x Piccolo family of microcontrollers. Download this software from www.ti.com/controlsuite.
To learn more about Visual Solutions, Inc.'s VisSim simulation, modeling and programming software and to download a free trial version, visit the company's website at www.vissim.com.
For more information on peak current mode control using the internal comparator and slope compensation DAC, refer to the following technical application note:
Step-by-Step Design Guide for Digital Peak Current Mode Control: A Single-Chip Solution - Dr. Ali Shirsavar
Digital Peak Current Mode Control with Slope Compensation Using the TMS320F2803x - Dr. Ali Shirsavar and Richard Poley
Previous article:“TMS320xF24xx to C2000™ Piccolo™ TMS320F280xx
Next article:Design of low-cost flammable gas leak alarm based on sensor
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Milestone! SmartSens CMOS image sensor chip shipments exceed 100 million units in a single month!
- Taishi Micro released the ultra-high integration automotive touch chip TCAE10
- The first of its kind in the world: a high-spectral real-time imaging device with 100 channels and 1 million pixels independently developed by Chinese scientists
- Melexis Launches Breakthrough Arcminaxis™ Position Sensing Technology and Products for Robotic Joints
- ams and OSRAM held a roundtable forum at the China Development Center: Close to local customer needs, leading the new direction of the intelligent era
- Optimizing Vision System Power Consumption Using Wake-on-Motion
- Infineon Technologies Expands Leading REAL3™ Time-of-Flight Portfolio with New Automotive-Qualified Laser Driver IC
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Why do we write =0 when assigning a variable a value of 0, but write =0xffffffffu when assigning it a value of 0xffffffff?
- Learning PCB
- TMDSLCDK138 board about PRU part program
- NI Taobao brand store, Double Eleven hot items return
- About the role of capacitance and inductance in LoRa radio frequency circuit
- Two-color 2835 painting 10 series 14 parallel
- ESP32-S2-Kaluga-1 Kit v1.3
- Solution to MotionFX getting stuck when executing MotionFX_initialize(); function
- W806 Lianshengde 9.9 yuan development board experience 4 --- SDK surprise discovery
- A Complete List of "English Abbreviations" in Hardware Schematics