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.

Is Instaspin Motion 2channel drive by using TMS320F28069M possible ?

Other Parts Discussed in Thread: TMS320F28069M, DRV8332, MOTORWARE, DRV8301-69M-KIT, DRV8301, CONTROLSUITE

Hello,

I have a question :

Is 2ch motor drive by using TMS320F28069M Instaspin Motion possible ?

If it is possible , by what condition ?

And, is there any problem when 2ch motor drive by using ,TMS320F28069M about "PWM frequency", the relationship between ISR and CTRL, CTRL and EST ? (ISR,CTRL and EST are the items that is wrote

on the Piccolo Instaspin Motion users guide,attached file7220.spruhi9a.pdf)

Hiroyasu

  • Hiroyasu,

    2 channel motor drive is possible using InstaSPIN-MOTION on the TMS320F28069M.  

    The example projects contain a code example for a single motor drive.  So all of the structures related to motor control need to be duplicated for your second motor.  

    You need to be careful to setup the PWM frequency and decimation rates correctly so that you don't overrun an interrupt or use too much of the processor.  So more consideration needs to be taken for these items.

    There will be a 2 axes evaluation board released later this year featuring InstaSPIN.  

  • as Adam mentioned, it is possible but we haven't released a SW example.  The SW gets pretty complex as you have to duplicate many of the structures, and of course the timing is the most critical.

    there are HVAC systems using InstaSPIN to control the compressor and motor today though.  One common timing solution is to run at 16 KHz for the fastest PWM for the fan, but decimate by (2) for this control so it is effectively at 8 KHz. And then run the compressor at 8 KHz PWM with 8 KHz control, and sample all the compressor currents first, then the fan currents, then the voltages (which change much slower).

    Because this is so complex we will eventually show an example using an RTOS/Scheduler, but that will be next year.

     

  • Hello Adam and Chris,

    Thank you for your reply.

    Regards,

    Hiroyasu

  • Hello Adam, Chris and Hiroyasu !

    I'm Giovanni, from Italy, and I'd like to develop a board with 2 motors drives.
    The system will be battery powered (lead acid) and will be applied to wheelchairs used by childrens with disabilities ... just like an e-bike !!!
    The Insitute where I'm trying to give my help is in Sucre, Bolivia, and I will go back there in the next summer holidays.
    Here is the link: http://www.hsjd.org/orden/instituto-psicopedagogico.php
    The project and the board will not be "for sale", and I'll be very grateful to TI for any kind of help you can give me !!!

    I found and purchase a DRV8312-69M with InstanSPIN firmware: it seems to be really powerful and easy-to-use solution, so I would like to develop my board with a TMS320F28069M and two DRV8332 drivers.

    I'm an HW engineer, and I'm not a zero-level Firmware programmer (at work, I'm currently using ccs5 to develop an MPS430-based earth-leakage relay)... but I'm not really an expert in C language, so ... I need your help !!!

    My questions follows:

    1) HAL level:
    -> the ADC Voltage and Current channels coming from the 2 power drivers should have a preferred pin definition (for instance, ADC-A0_7 for driver1 and ADC-B0_7 for driver2) or the pin-assignment is free ?
    -> the PWM and /RST output sets should be assigned to (ePWM1A_B, ePWM2A_B, ePWM3A_B) for driver 1 and (ePWM4A_B, ePWM5A_B, ePWM6A_B) for driver 2: is this correct ?

    2) InstaSPIN level:
    I will need only VELOCITY CONTROL for the two motors. I'll not need Position control, and don't think to use Trajectory and Velocity Planning state machines.
    -> please, can you help me to understand which are the specific InstanSPIN structures and modules to be duplicated ?
    -> please, can you explain me what does it mean "duplicate" structure ? Should I create objects and handles for the two controllers and duplicate the routine calls with the two handles ? Or should I duplicate the Instanspin routines (for instance running first controller in ROM and the second controller in RAM) to keep "phisically" separated contoller loops and routine internal variables?
    -> please, can you give me any suggestion (or, better, a C-written example) on which could be the best setup for PWM frequency, ISR decimation and Velocity loops decimation to obtain a simple and stable system, avoiding ISR overrun ?

    3) FAST estimator level:
    All the InstanSPIN routines may be "phisically" duplicated, if necessary, EXCEPT the FAST estimator, which only resides in ROM:
    -> how can the FAST estimator work if used in two different control loops ? Does it have internal registers which should be saved and "toggled" when toggling between the two control loops, or it is sufficient a call with the correct handle ?

    4) XDS100V2 emulator:
    I'd like to integrate the XDS100V2 emulator on the board, using the same schematics of the F28069M CONTROLCARD, and develop the program with a free licence of ccs6 (which is contained in the kit I purchased), but I'm not sure it will work:
    -> in the schematics there is an eeprom (U16 93C56) connected to the FTDI (U15 FT2232H). The eeprom contents are free or is it a protection for ccs6 free licence use ?
    -> if the eeprom programming file is free, where could I download it ?

    Thank you very much for your help and your patience ... I know it's a lot of questions, and, maybe, ... others will follow !!!
    Have a nice day,

    Giovanni Marelli
  • Giovanni,
    A couple questions / comments first

    1. Are you trying to drive the two wheels of a wheelchair independently? If so, this is very challenging to do sensorlessly under loads, especially with a direct drive wheel (if the motor is geared significantly to the wheel it makes it a bit easier). If this is the case I would recommend using sensors. The MOTION projects show the use of encoders....we don't currently have an example for using MOTION with Hall sensors .

    2. Right now we don't have an example in the MotorWare structure for controlling two inverters with the same F2806x/5x device. It is possible - and we have customers in production - but we don't have the example ready for broad usage through MotorWare. It will probably be the summer before we release anything.

    3. I don't recommend using DRV8332. I would base your design off of DRV8301 like our DRV8301-69M-KIT if your motor is <60V and <100A (or design is scaled to 40A max).

    answering your questions:
    1. it doesn't really matter as long as you are going to use sequential (non-simultaneous) sampling. Which is what we show in the MotorWare examples. But if you can I would go ahead and pair up certain signals, ex:
    A0/B0 = Ia, Ib Motor 1
    A1/B1 = Ic (optional), FREE
    A2/B2 = Va, Vb Motor 1
    A3/B3 = Vc, Vbus Motor 1
    A4/B4 = Ia, Ib Motor 2
    A5/B5 = Ic (optional), FREE
    A6/B6 = Va, Vb Motor 2
    A7/B7 = Vc, Vbus Motor 2

    2. This is too complex to answer here...we really need to show you an example. Regarding the control rates, that is very dependent on the characteristics of the motor (R/L, max frequency, etc.)

    3. it's sufficient to call with the correct handle, though the timing is critical, which is why we need to publish an example

    4. the contents are free. You can download the file from the XDS100 wiki
    http://processors.wiki.ti.com/index.php/XDS100#Q:_Ok.2C_I_built_an_XDS100.2C_but_how_do_I_program_the_EEPROM_for_manufacturing.3F
  • Thank you, Chris, thanks a lot !!!
    ... I'll try to make treasure of your suggestions and I'll be back soon with with some other questions ...

    Have a nice day,
    Giovanni
  • Good morning, Chris !

    I've studied the DRV8301 driver and ... OK, you convinced me, so I would like to develop my project, starting from the F2806X ISO-CONTROLCARDR0X4 and DRV830x_RevD_HWDevPKG Schematics and PCB Layouts, which should be the ones used in DRV8301-69M-KIT.

    I would like to "double" the DRV830x Board, and manage the two Motor drivers from a F2806XM (or F) 100 pin device, taking a lot of care in Power Layout, trying to avoid that the high frequency motor current of the two motors will "move" the GND connections between the two DRV830x nd the microcontroller.
    I would like to implement the full XDS100 circuit (JTAG+UART), an isolated SPI to communicate with a remote control, and the USB module to communicate with a Bluetooth dongle (I don't know if it will be possible ... let me try !!!)

    Before starting my work, I would like to send you the GPIO mapping and ask you if you can, please, check it for me.

    Here is the Map:

    GPIO MAP.pdf

    ... and the last question ... in your opinion: is my solution a good solution, or should it be better to use two smaller microcontrollers (F2805xM or F ; F2802xF), one for each driver, linking them with an SPI ???

    Thanks a lot for your patience, and have a nice day !!!
    Giovanni

  • 1. Sorry, I'm not going to be able to check your GPIO mapping.
    2. I think that because we have not released a MotorWare project that properly shows how to control both inverters with a single MCU it may be lower risk to use two MCUs. I also will say that you should read my previous post again....synchronized operation of two direct drive motors using a sensorless scheme is VERY challenging. Any small differences in the timing, start-up, or speed of each motor can cause severe mechanical issues which are not attractive as a user of the machine. I would highly caution you to think about this before moving forward. Your engineering job will be much easier if you control a single motor to provide propulsion or you use encoders to more accurately control each wheel, especially at zero and low speed.
  • Good moring, Chris !!!

    Many thanks for your patience and your precious warnings.

    I have got clear that I will use sensored motors, desiging my board with Encoders (Connected to QEP) and Hall (Connected to CAP and HCAP) Inputs, and I agree that it not will be easy to drive two independent motors, but, using a single motor for propulsion only, in which way could I turn left or right my wheelchair ??? If you have any suggestion with respect to this, you are welcome !!!

    I don't want to make you crazy, but is very important to me to choose the best HW (and future FW !!!) structure before starting with designing the board. At the moment I have three possibilities:

    1) Using 2 independent sensored motors and DRV8301 drivers, driven by two independent FW control loops in a SINGLE CPU (F2806xM or F). The system will use the USB port and digital inputs (START, STOP, LEFT, RIGHT, ...) to accept control commands.

    2) Using 2 independent sensored motors and DRV8301 drivers, driven by two independent CPUs (F2805xM or F or F2802xF), which will communicate with an internal isolated SPI or SCI. The control commands will be implemented with shared digital inputs (START, STOP, LEFT, RIGHT, ...) or using two USB port (one for each controller).

    3) Using 1 sensored motor and DRV8301, driven by a single CPU (F2805xM or F or F2802xF), for propulsion purpose only. But, with this solution, I don'know how to turn left or right my wheelchair ...

    For the three options, could you suggest me which one could be the best and cheaper CPU to use (06x, 05x or 02x if sufficient), and if it is better to use a InstaSPIN Motion (M) device, or a cheaper InstaSPIN FOC (F) will be enough.


    Thank you very much for your precious help.

    Have a nice day,

       Giovanni

  • since this is just a 2 wheeled wheelchair I agree, you need independent control of each. And you certainly want to do this with sensored motors. Hall sensors is probably enough (and will be cheaper).

    you will control each independently in velocity mode with hall senor feedback.

    my concern with 1) is simply that we haven't released a SW example yet on how to do this for MotorWare / InstaSPIN. You would probably have to use a non-InstaSPIN based control solution like
    C:\ti\controlSUITE\development_kits\DRV8312-C2-KIT_v128\BLDC_Sensored
    and set-up a 2nd inverter control.
    and could use an F2803x or F2806x device (if you want USB).

    you could also consider looking at this kit
    C:\ti\controlSUITE\development_kits\LVMultiAxis+PfcKit_v1.4\2xPM_Sensorless_v1_1
    for a software example. It is doing 2 inverter control but sensorless. Starting here with the 2 inverter code, and then modifying for HALL based BLDC may be the best path forward for you.

    my other concern with using InstaSPIN is
    a) InstaSPIN-FOC examples are just for sensorless, and if using Hall sensors you really won't benefit much by using our -FOC solution.
    b) InstaSPIN-MOTION sensored examples just use an encoder. You can of course use hall sensors here, but we don't show you an example. You will get some ease of use benefits from MOTION...but not sure enough to offset the additional trouble you are making for yourself.