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.

CCS/DRV8301-HC-C2-KIT: Sensor integration

Part Number: DRV8301-HC-C2-KIT
Other Parts Discussed in Thread: DRV8301, MOTORWARE, CONTROLSUITE

Tool/software: Code Composer Studio

Hi 

All I need to know is how to do the sensor integration on the board, I need to read a Optical Sensor. 

Pleas assist. 

Thanks 

  • What kind of interface does the optical sensor have? Also, have you looked at the jumper definitions for the EVM you are using? For instance, J12 breaks out GPIO signals for use, and J8 breaks out user SPI signals for use. Please review the DRV830x Rev D Hardware Quick Start Guide in Motorware to have an idea which jumpers do what; that will be your best resource for finding a way to interface an external sensor with your MCU via the DRV8301 EVM

    Sean
  • Hi.

    Its a GP1A51HR Optical Sensor. I will have to use an ADC. How do I go about addressing the ADC pins? Is there any code examples you can point me to that will assist with rapid integration. I have downloaded manuals but none seem to pay attention to the addressing of the pins and how this will be coded. I have used Arduino and Python. I have looked at the coding and it seems lower level. Can you suggest a resource that can assist ?
  • Have you used ControlSUITE or Motorware? These are our software repositories for generic C2000 devices (ControlSUITE) or for specifically InstaSPIN-enabled devices (Motorware).

    In terms of the EVM, if you look at the schematic (which is included in Control Suite), you'll see that there aren't any additional ADC pins broken out for the user. Of the 8 that are broken out (3 for phase current, 3 for phase voltage, 1 for DC bus voltage, 1 for tach/potentiometer), the only one you could re-purpose would be the potentiometer input. You would have to modify the board to physically disconnect the potentiometer marked "speed control", and then you could line into ADCB0 through the TSI line (which was meant as a test point, but can be re-purposed to present a signal to the ADC input).

    The quickest way to get familiar with adding an ADC input would be to look at the "motorware_hal_tutorial.pdf" file in Motorware under Training: User's Guides , Labs, and Tutorials -> InstaSPIN Projects Additional Tutorials. There is a section in that document that discusses how to interface the potentiometer into a Motorware lab to perform speed control; you'll have to co-opt this to instead present your sensor input. The idea should be pretty similar.

    Sean