This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28069F: Using both comparator and ADC functions simultaneously

Part Number: TMS320F28069F

I am laying out a custom motor driver board and I have two questions.

1) Can I map any of the analog current and voltage sense lines to any one of the analog pins on both A and/or B?  I noticed that some of the designs divided the inputs between the A & B channels is this necessary for performance or is it arbitrary?

2) I would like to connect my current sense lines to pins that have both the ADC and the comparator function.  I would like to use BOTH the ADC and the comparator at the same time.  I would ike to use the ADC for the normal InstaSpinFOC functionality and the comparator for (unipolar) peak current fault detection.  Is this possible?

Thanks,

Tim

  • Here is the mapping I would like to use

  • Tim,

    Keep in mind that each ADC has only one sample & hold, so if you need to sample different channels simultaneously they need to be on different ADCs, and those ADCs triggered by the same source.  That's why you often see motor phase currents (for example) mapped to separate ADCs.  In your mapping, all three current inputs go to the same ADC, so you would have to sample them sequentially and this would introduce a phase error between them.

    There are no issues in using the ADC and comparator with the same input, indeed, it is common to do so.

    BTW, I notice one of your input channels is labelled "V BAT".  If this is a steady battery voltage, please be careful about leaving the voltage there when the device is un-powered.  Ideally the ADC inputs should not see more than a diode voltage drop before power-up.  This is stated in section 5.12 of the datasheet for digital pins, but it actually applies to analog pins too.  Alternatively you can clamp the maximum input current to +/-2mA.  An update to the datasheet will be posted with this information.  

    Regards,

    Richard

  • Hi Richard,

    Thanks for the answer. Regarding my question about the ADC channels, let me be a bit more specific. Will the mapping shown above work OK with InstaSpin FOC? Is there a better mapping, knowing that I would like to have comparators on the current sense lines?

    Thanks,
    Tim
  • Also, along with letting me know the best mapping for InstaSpin FOC can you let me know if the following circuit is sufficient to protect against the V_BATT issue you mentioned?  I am not sure I fully understood the failure mode.

  • Tim,

    It looks like the 100K resistor will protect the device.  Providing the input clamp current doesn't exceed 2mA (datasheet, table 5.1) when the device is un-powered it is OK.

    I will ask someone to respond your other question about InstaSPIN today.

    Regards,

    Richard

  • Richard,

    Thanks for the feedback and for passing on the question about mapping. On that note I am able and willing to route the current detect signals to an ADC input optimal for FOC and also route the same signal to another comparator pin if necessary - just need to know what is best.
    Thanks
  • Hi Tim,

    1) Can I map any of the analog current and voltage sense lines to any one of the analog pins on both A and/or B? I noticed that some of the designs divided the inputs between the A & B channels is this necessary for performance or is it arbitrary?
    A: You can map the current/voltage signal to any analog pins if you don't want sample the phase current and voltage simultaneously. The current input was divided to two channels in some kits, just enable you can sample two phase current inputs simultaneously. It's not must do.

    2) I would like to connect my current sense lines to pins that have both the ADC and the comparator function. I would like to use BOTH the ADC and the comparator at the same time. I would ike to use the ADC for the normal InstaSpinFOC functionality and the comparator for (unipolar) peak current fault detection. Is this possible?
    A: This is a good idea, you can use the adc and compator in the same time, but only can protect unipolar peak current (positive or negative) using compator.

    Your posted both circuit can work well, it's a good and correct design.
  • I am measuring 3 phase currents. Does this cause too much delay to cycle through all three sequentially? Is there any performance improvement if I move one of the three to the other ADC? Thanks.