Sheena Patel
In my last post, I talked about how to interpret a CW/CCW pulse train output (PTO) for motor control on C2000™ Piccolo™ F28004x devices. In this post, I will discuss a situation in which you must deal with noisy signal interference on an input signal.
A wide variety of mechanisms can introduce noise into a system. For example, if your system does not have separate power and control grounds, noise from power switching can very easily contaminate your control ground. In a system that uses shunt-based current sensing, this common ground mode is likely. This will lead to system-wide issues like ringing on signal lines, which makes it difficult to differentiate when a signal is going high or low. In this case, you will need to add a circuit of your own design to ensure that transient noise does not affect normal system operation.
In the motor drives domain, one area susceptible to noise is the encoder pulse signal. In order to deliver accurate position feedback about the rotor’s location, the encoder pulse needs to have high integrity so that noise is not mistaken for the signal.
A qualification circuit is one way to evaluate and classify signals coming into the system as true (signal) or false (noise). One method for qualification could be analog RC filters paired with external comparators to remove noise at unwanted frequencies. This method is doable, but introduces a few issues. For one, the RC filters are restricted by the tolerances of the resistors and capacitors. It is possible to tweak the resistance of the filter by substituting a potentiometer for a resistor; however, the capacitor still has a certain tolerance, and designing-in capacitors with minimal tolerances gets costly quickly.
The C2000™ Piccolo™ F28004x MCU accounts for this through input qualification, which is available on any general-purpose input/output (GPIO) pin on-chip. Input qualification takes into account the number of samples taken (the sampling window) and the length of time between when GPIO signal samples (the sampling period).
These parameters can be handled in software on the F28004x, by simply setting variable values. In Figure 1, GPxQSELn has been set to 1,0, which indicates a sampling window of six samples (a three-sample configuration is also possible). This means that a six-sample window will be taken before determining the classification of the signal as high or low. The sampling period width is set in GPxCTRL.
In Figure 1, this sampling period is indicated by GPxCTRL[QUALPRD]. As you can see, once six samples of the GPIO signal going low are detected, only then does the qualifier output change to low.
This flexible method of qualifying a signal mitigates the risk of ringing or oscillations affecting the signal being transmitted by the encoders. Because qualification parameters are set in software, they are easily adjustable depending on the application. Additionally, if you would like to use a circuit with comparators, the F28004x includes on-chip comparator subsystems to which you can directly route an output signal from an external RC filter.
Please feel free to learn more about input qualification and other capabilities on C2000™ devices below.
TI PROVIDES TECHNICAL AND RELIABILITY DATA (INCLUDING DATASHEETS), DESIGN RESOURCES (INCLUDING REFERENCE DESIGNS), APPLICATION OR OTHER DESIGN ADVICE, WEB TOOLS, SAFETY INFORMATION, AND OTHER RESOURCES “AS IS” AND WITH ALL FAULTS, AND DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS.
These resources are intended for skilled developers designing with TI products. You are solely responsible for (1) selecting the appropriate TI products for your application, (2) designing, validating and testing your application, and (3) ensuring your application meets applicable standards, and any other safety, security, or other requirements. These resources are subject to change without notice. TI grants you permission to use these resources only for development of an application that uses the TI products described in the resource. Other reproduction and display of these resources is prohibited. No license is granted to any other TI intellectual property right or to any third party intellectual property right. TI disclaims responsibility for, and you will fully indemnify TI and its representatives against, any claims, damages, costs, losses, and liabilities arising out of your use of these resources.
TI’s products are provided subject to TI’s Terms of Sale (www.ti.com/legal/termsofsale.html) or other applicable terms available either on ti.com or provided in conjunction with such TI products. TI’s provision of these resources does not expand or otherwise alter TI’s applicable warranties or warranty disclaimers for TI products.
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2023, Texas Instruments Incorporated