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.

TIVA C Series TM4C123G project, assistance for a beginner

Greetings Community.

I need help to develop a control system project.

I was assigned a project that involves the development of a PID for a propeller motor to maintain the angular position of a pivoted bar using the wind force of the propeller. The project requires the implementation of a TM4C123GXL using the Code Composer Studio C language to create the PID. The angular position sensor must be an accelerometer and a gyroscope module, such as the MPU6050.

Unfortunately, I was not provided with an adequate introduction or a course of the Code Composer Studio software for the development of my project.

I'm at zero. If someone can guide me on how to star, I will be really grateful.

Here's an example of the control system.

  • Hello Juan,

    Welcome to the E2E forums!

    Sorry to hear about the rough start, I'll give you a small list of resources to draw upon for both learning and handling your application.

    For Code Composer Studio, there is a Getting Started video for Version 7.x which hopefully will get you more familiar with the IDE: https://training.ti.com/getting-started-code-composer-studio-v7

    For our TM4C devices, I would suggest starting first and foremost by downloading TivaWare: http://www.ti.com/tool/SW-TM4C

    TivaWare will install all the resources we have available for you, including documentation, example projects, our full driver library ('driverlib') and some other handy libraries as well. To learn more about a specific feature offered in TivaWare, I'd recommend you start with the documents folder that can be found at [Install Path]\TivaWare_C_Series-2.1.4.178\docs

    Since you mentioned the MPU6050, I want to highlight that the sensorlib which is included with TivaWare has support for that device. The sensorlib documentation is located in the docs folder and is titled: SW-TM4C-SENSORLIB-UG-2.1.4.178.pdf. It's also uploaded online at http://www.ti.com/lit/ug/spmu371d/spmu371d.pdf. I would recommend reading Section 15 as that covers the MPU6050. Unfortunately, we don't have a pre-built example for the MPU6050 to just import into CCS, but the documentation does provide a detailed programming example in Section 15.3 you should be able to leverage.

    If you really want to leverage an existing example, the MPU9150 also is supported in sensorlib, and there is an example project for it that requires the Sensor Hub BoosterPack (http://www.ti.com/tool/BOOSTXL-SENSHUB). The example project is located at [Install Path]\TivaWare_C_Series-2.1.4.178\examples\boards\ek-tm4c123gxl-boostxl-senshub\compdcm_mpu9150

    Hopefully these resources get you going quickly, if you are having challenges with the implementation feel free to follow-up with details of what steps you've taken and what the issue(s) is.

  • It would prove wise to ask - sooner rather than later - if your, "Motor - Motor Driver - and Propeller" in combination (i.e. the "Propulsion System") - proves capable of producing adequate, "down-force."

    It is suspected that you'd want the "Propulsion System" to achieve your "Pivot Bar's" horizontal attitude - at near 50% - Pulse Width Modulation (PWM) Motor Drive Levels.     This is so as it enables, "The maximum adjustment of horizontal attitude - both "above & below" your (assumed) "horizontal pivot bar target." 

    This further suggests that your "Propulsion System" is able to achieve the desired Pivot Bar "horizontal attitude" - with your motor operating at 50% power.     Importantly - this can be tested (independently - and before) your introduction of the MCU.     You may be able to tweak that behavior via the addition of  "small weights - strategically placed" - along the pivot bar.

    Note that firm/I have seen (similar) projects (more than once) - in which the "MCU had NO Chance" - due to inadequacies - w/in the "physical/external system!"

    In addition - you do not list your related, "experience level" - other than to note, "Little w/CCS."       This project - due to the demands imposed by a "so advanced" sensor - motor drive/control - and the "PID loop" - may prove "overly ambitious" for a (near) beginner.     (the only thing missing is the instructor's enforcing "DRM-Only" (i.e. code obfuscation!) 

    While (never) broached here - such project "Lives/Dies" upon your adoption of  "KISS."     It will immensely assist you to,  "Break this project into the smallest possible, measurable tasks, and attack these systematically - one at a time!       You "Start" by identifying, "Each such task" - then listing what is required to accomplish that goal - focusing "Like a laser" upon each (individually - almost never "en masse") - and then by acquiring, "all that is needed."     The detail, extent & accuracy of your list - and your systematic execution - most always - will directly impact  your success!     (or not)

    You - at least - have received "Advanced Warning."     (along w/a guide to "Achieve Success."   KISS)     Good luck...