SSZT713 May   2018

 

  1.   1
  2.   2
    1.     3
    2.     Additional Resources

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.

GUID-53756E5F-A5EE-4E7A-ABF2-FC7328FF225C-low.png Figure 1 Qualification Result Based on Specified Parameters for GPxQSELn and GPxCTRL[QUALPRD]

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.

Additional Resources