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.

stepper motor

Other Parts Discussed in Thread: DRV8829, MSP430F2617, DRV8880, DRV8825, DRV8818, DRV8828, DRV8829EVM

Hi,

I am doing a project of door control system using stepper motor indexer mode, can anyone help me out how we can control door by switches using stepper motor, I have to write code in c/c++...

  • Is it a stepper motor (step/direction signals) or really an indexer? And what do you expect - somebody that gives you full code? Or what is your question?

    May be a ready to use solution is better for you: http://halaser.eu/e1701m.php

  • I want to control the door using the switch actions with the help of stepper motor, I took the CPG006 EVM DRV8829 from TI, but in that there are two options to give controls to stepper, 1 is by UART and other is by indexer mode, so in the code given by TI I wanted to just remove the UART code and write code to send controls via indexer, hence I wanted to know how I can program the controller in this way.
  • Raju,

    Are you using an AM335x or MSP430 to do your signalling to J10 in indexer mode?
    Looking at the DRV8829 TRM, you would need to provide the correct signals to the DIRECTION, etc pins.

    What code are you talking about "given by TI"? Do you know what type of signals you need to send J10 (e.g PWM, simple GPIO toggles??)

    Lali
  • Hi Raju,

    The source code is provided at LINK. This code was written as a demonstration of the device capabilities.

    As Lali pointed out, using the indexer mode requires control signals on J10.

    The MSP430F2617 interprets the J10 control inputs and sends them to the DRV8829 to control the stepper.

  • Hi Lalindra Jayatilleke,

    I am using MSP430F2617 to do singnalling to J10 in indexer mode, the code given by TI includes a source file Appint (application initialization) in that they have mentioned about the indexer mode USM0 USM1 USM2 bit initialization but after that they disabled it and used UART for communication and controlling the stepper, so now in my project I wanted to take use of the USM[0, 1, 2] indexer mode bits by sending signals through J10 and J11 connectors by using any of the Switch device, So If I press the switch the door should open for certain duration and then it should close using the stepper motor, so how I can make this possible. What logic I can use to write the code for this. 

  • Hi Raju,

    You may need change the code and using the index mode. Then the USMx is setting for micro stepping settings. Feed STEP/DIR signals into J10 with start your motor in index mode. Then you can drive the motor in normal STEP/DIR index mode.

    The F2617 MCU in this DRV8829 module actually plays as an index logic machine since DRV8829 is not a device with on-chip index for stepper. So you may also able to fully use just this F2617 as well for high level STEP/DIR commands input logic. Then the system is fully applied into this EVM. Finally only the OPEN/CLOSE button to the system to control your door.

    But you need to work out yourself for all above high level control.

    BTW, you can also choose another stepper driver solution with on-chip index, such as DRV8825, DRV8818, DRV8880. Then all you need is using a MCU to program the high level STEP/DIR arrangement for your door control and feed the signals to these index device directly. In this way your system will look much more clear and simple.

    Best regards,
  • HI  Wilson Zuo,

    Is there any reference design and code the project I am doing, I mean any reference For controlling the door using the DRV8829 indexer mode or any other design and code, Which I can keep it as reference and do the project.

  • Hi Raju,

    Please refer to

    Application Report 1  -- High-Resolution Microstepping Driver with the DRV8828/29/40  ( LINK )

    Application Report 2 -- High Resolution Microstepping Driver With the DRV88xx Series ( LINK )

    These provide a basic understanding of how to control the DRV8829 in a stepper environment.

    The EVM code was written to demonstrate the motor driver. For a specific application, code changes are required.

    The sine table is listed inside the source code provided with the DRV8829EVM. This is used as a lookup table to provide the DAC voltage, the PHASE, and the ENABLE inputs to control the winding currents. Depending on the microstep level desired, the code increments to the next point in the sine table.

  • Hi Rick Duncan,
    I was connecting the DRV8829 EVM board through JTAG FET but after making all the connection and debugging the code I am getting the error as
    MSP430: Error initializing emulator: Interface Communication error, what would be the problem
  • Hi Raju,

    Do you have the USB connector J9 plugged in when attempting to use the JTAG FET? The USB powers the MSP430.

    If that is not the issue, then it could be a mismatch between the target MCU specified in the debug tool and the MSP430F2617.

  • Hi Rick Duncan,

    I am connecting the DRV8829 EVM module through the J8 connector and the USB end is connected to PC and the JTAG another end is connected to the EVM J8 connector this connection is enough right.

  • Hi Rick Duncan,
    I am trying to connect it from JTAG i.e., one end of the USB is connected to my system and after connecting to JTAG power LED will glow, another end is connected to the DRV8829 EVM boards J8 JTAG connector. Is this connection is enough?
    And can you please tel me what is that JP2 connector is for which is beside the J8 JTAG connector.
  • Hi, 

    Rick Duncan

    their was driver problem and OS issue so I reinstalled the os and now drivers of the MSP FET are installed but now again I am getting 1 more error  

    MSP430: File Loader: Verification failed: Values at address 0x000000000000311D do not match Please verify target memory and memory map.

    MSP430: GEL: File: D:\WorkingDirectory\steppermotor\Stepper driver EVM\steppermotor\stepper\Debug\stepper.out: a data verification error occurred, file load failed.

    what would be this error

  • Hi Raju,

    To program the device:
    Place a shunt across pins 2 to 3 of jumper JP2. This signals that the target (EVM) will provide power to the MSP430.
    Connect the USB. This powers the MSP430.
    Connect the MSP430 FET and program the device.



    If you still see the error messages, please post to the MSP430 forum and provide information that will help them such as:
    Compiler version used
    Operating system
    A log of the error messages

    You can also search the MSP430 forum for similar problems.
  • Hi Rick Duncan,

     I want to make a application for control of door open and close using switches, when I press the switch the door should open and wait for some times and it should again close the door, as I am new in programming I need help from you for doing this project, how to write the code for this application, I am not getting the logic to write the code, I want to write c or c++ code, I am using the texas instruments MSP430F2617 controller and DRV8829 driver for this operation and I have purchased the Evaluation module of DRV8829 board showing how bipolar stepper motor would work using the driver by giving instructions from computer system application, but here I dont want to give instructions from system but instead I want to use switches, when switch pressed the door should open and then close, now I need to write code for the application how I can write, or can you please tell me where to change the firmware code in order to operate the stepper motor in indexer mode. As I am new to this I am not able to understand where to change the code.

  • HI Wilson Zuo,

    I want to make a application for control of door open and close using switches, when I press the switch the door should open and wait for some times and it should again close the door, as I am new in programming I need help from you for doing this project, how to write the code for this application, I am not getting the logic to write the code, I want to write c or c++ code, I am using the texas instruments MSP430F2617 controller and DRV8829 driver for this operation and I have purchased the Evaluation module of DRV8829 board showing how bipolar stepper motor would work using the driver by giving instructions from computer system application, but here I dont want to give instructions from system but instead I want to use switches, when switch pressed the door should open and then close, now I need to write code for the application how I can write, or can you please tell me where to change the firmware code in order to operate the stepper motor in indexer mode. As I am new to this I am not able to understand where to change the code.

  • Hi, Lalindra Jayatilleke,

     I want to make a application for control of door open and close using switches, when I press the switch the door should open and wait for some times and it should again close the door, as I am new in programming I need help from you for doing this project, how to write the code for this application, I am not getting the logic to write the code, I want to write c or c++ code, I am using the texas instruments MSP430F2617 controller and DRV8829 driver for this operation and I have purchased the Evaluation module of DRV8829 board showing how bipolar stepper motor would work using the driver by giving instructions from computer system application, but here I dont want to give instructions from system but instead I want to use switches, when switch pressed the door should open and then close, now I need to write code for the application how I can write, or can you please tel me where i need to change the existing firmware code and make the controller to receive the controls from the indexer.

  • I want to make a application for control of door open and close using switches, when I press the switch the door should open and wait for some times and it should again close the door, as I am new in programming I need help from you for doing this project, how to write the code for this application, I am not getting the logic to write the code, I want to write c or c++ code, I am using the texas instruments MSP430F2617 controller and DRV8829 driver for this operation and I have purchased the Evaluation module of DRV8829 board showing how bipolar stepper motor would work using the driver by giving instructions from computer system application, but here I dont want to give instructions from system but instead I want to use switches, when switch pressed the door should open and then close, now I need to write code for the application how I can write, or can you please tel me where i need to change the existing firmware code and make the controller to receive the controls from the indexer.
  • Do you think you get more answers just because you spam the board with the same information again and again?

     

  • Hi Raju,

    As mentioned, the GUI and code loaded in the EVM allows quick evaluation of the DRV8829 devices. It is not intended to be used in an end application.

    The source code is provided, and can be modified. It is up to you to determine how to modify the firmware and if necessary the EVM to provide additional inputs to the mcu.