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.

Block diagram of a balancing robot, is it possible?

Other Parts Discussed in Thread: DRV8301-69M-KIT, DRV8301, EK-TM4C123GXL, ENERGIA, ISO1050, ISO15, ISO35, MOTORWARE

Hi!

I want to build a balancing robot (like segway). Following is my structure diagram:



The BLDC control kit DRV8301-69M-KIT is considered for both left and right BLDC motor. I want to use the torque control function to drive the robot.

For the tilt angle sensing, I consider the tiva real-time control board(DK-TM4C123G) which has 9-DOF sensor.

My question is can I use tiva to drive both motor control board by SPI communication?

In other words, can the TIVA development board send the control signal to control the torque by motor board, and motor control board also feedback the data of wheel position and velocity?

I haven't used any TI product before, any suggestion will be appreciated.

Thanks!!

  • hau-shiue Juang said:
    can I use tiva to drive both motor control board by SPI communication?

    First - very nice job w/your block diagram - we use such - always helps.

    To your issue - does the DRV8301 "normally/customarily" employ SPI as its expected, control medium?  Such should appear w/in first few pages of product spec - likely front page.  (our firm builds similar - I've not reviewed DRV in any detail as its not suitably rated - our applications)  If not SPI - alternative control/command data paths may include: Uart, I2C, CAN, and (fastest) parallel. 

    It should be stated that it is possible to switch/convert from one signaling mode to another (i.e. SPI to CAN) - but this flexibility incurs the downside of task addition while reducing data throughput...

    Missing from your request is the proper specifying of "just what" constitutes, desired performance.  Serial communication channels are desirable - but rarely can they match the speed of parallel.  The MCU you mention is usually equipped w/multiple serial ports - larger packages include more ports.

    You may want to investigate tech write-ups re: Segway.  This may reveal how/why certain design decisions were made - and may provide "hard numbers" - which will then enable better commentary as to your likelihood of success w/in the parameters of parts/data payloads -  meshing w/ your diagram...

  • cb1_mobile said:
    Missing from your request is the proper specifying of desired performance.

     It miss much more about what is inside DRV8301 block, I can imagine a twin 3Phase motor are driven from so processor can drive one PWM set but not two.

     Coupling two C2000 or TIVA series processor close to each motor work better sending them command transported by PWM, SPI, I2C or  better CAN.

     Again no detail about Kalman filter and other as you pointed too deciding the use of which processor to match motion control.

     

  • hau-shiue Juang said:
    In other words, can the TIVA development board send the control signal to control the torque by motor board, and motor control board also feedback the data of wheel position and velocity?

     Sorry for mistake, I answered to CB1 post before reading original post in detail and I missed DRV8301 refer to a ready PICCOLO series ready to use INSTASPIN than bare driver
     SO

     yes it can control the two motion board, SPI is an HIGH speed inter peripheral communication, good for what is close to processor bad for remote controller and also common ground required in an High current/spikes like motor controller start a nightmare and or continuous failures.

     Evaluate communicating ONLY on isolated CAN bus, both series are can enabled and C2000 sides is eCAN and if not add an isolated can driver. Take great care about grounding and power distribution like on automotive appliances.

     When evaluating Kalman parameter try avoiding interference with profile on INSTASPIN part, from Motor browse the user manual, you can evaluate all real motor simply from running it on learning mode. This is a great piece of near ready to use hardware and software enjoy it.

  • cb1_mobile said:

    can I use tiva to drive both motor control board by SPI communication?

    First - very nice job w/your block diagram - we use such - always helps.

    To your issue - does the DRV8301 "normally/customarily" employ SPI as its expected, control medium?  Such should appear w/in first few pages of product spec - likely front page.  (our firm builds similar - I've not reviewed DRV in any detail as its not suitably rated - our applications)  If not SPI - alternative control/command data paths may include: Uart, I2C, CAN, and (fastest) parallel. 

    It should be stated that it is possible to switch/convert from one signaling mode to another (i.e. SPI to CAN) - but this flexibility incurs the downside of task addition while reducing data throughput...

    Missing from your request is the proper specifying of "just what" constitutes, desired performance.  Serial communication channels are desirable - but rarely can they match the speed of parallel.  The MCU you mention is usually equipped w/multiple serial ports - larger packages include more ports.

    You may want to investigate tech write-ups re: Segway.  This may reveal how/why certain design decisions were made - and may provide "hard numbers" - which will then enable better commentary as to your likelihood of success w/in the parameters of parts/data payloads -  meshing w/ your diagram...

    [/quote]Thanks for your answer

    I have read some datasheet of the TIVA and DRV8301-69M-KIT and Piccolo before.
    The only thing I know is that both the TIVA and Piccolo have SPI communication interface.

    I want to ask whether you have ever succeeded in using Tiva for SPI communication to control another development board.
    I haven't used the TI IDE before.
    This is what I am worried about.

    The experiment of mine: I have built a balancing robot (a small one) by the Arduino.
    I use the lipo battery and motor with hall sensor as the power.
    As to the tilt angle estimator, I use the complementary filter.
    Now I am planning to build a bigger one (with the powerful BLDC motor!!)

  • I have one addition to the good advice already offered.

    Since you mention having already done a similar project with Arduino, then i suggest looking into the Tiva LaunchPad (EK-TM4C123GXL) and Energia (http://energia.nu) Energia uses the same wiring framework foundation as Arduino.  Migrating to Energia and Tiva LaunchPad (or C2000) may be a smaller step toward your final goal.

    Also note that TivaWare is offered for several professional IDE's if one that list better matches your previous experience it may be a better choice than changing to the TI IDE.

    From a high level, to answer the original question, yes the task seems to be within the limits of the Tiva MCU.  However as forum regular cb1 so often reminds us the devil is in the details.

    Dexter

  • Stellaris Dexter said:
    However as forum regular cb1 so often reminds us the devil is in the details.

    Do note... "and, the devil made me do it!..."  (after the x100th post, "My MCU don't work!)  {and that was it...}

    Scaling up the driver/motor power "should not" seriously impact the system's, "speed of response."  Still absent is a survey of required response times - which may serve by highlighting which program segments should run at the highest rates - enabling a more proper analysis... 

  • hau-shiue Juang said:

    I want to ask whether you have ever succeeded in using Tiva for SPI communication to control another development board.
    I haven't used the TI IDE before.
    This is what I am worried about.

     Yes, SPI peripheral and processor where few cm from controlling in a LOW current environment!

     COntrolling a remote HIGH current require an high speed  communication cable and signal isolator to separate grond from one processor to the other avoiding dangerous current loop.. You are planning a several amp PWM controller not a small prototype, so why not use CAN BUS? Is ready on tiva board and I am sure wiring a sop8 chip is not so difficult like wiring a digital isolator.

     Digital isolator can save you a HOT hole with lot of smelling smoke and firework in all your processor...

    hau-shiue Juang said:
    The experiment of mine: I have built a balancing robot (a small one) by the Arduino.
    I use the lipo battery and motor with hall sensor as the power.
    As to the tilt angle estimator, I use the complementary filter.

     Using an 8 bit processor cannot help process faster enough digital filtering, again you are upgrading to a processing power that DON'T need compromise, Piccolo has digital signal processing capability and can smooth motor response, TIVA has floating point capability directly processing multiple feedback from motor and sensor too. If you are thinking about a human transporter then you need a rock stable solution with enough power to compute stability and some sensitivity to skill of driver. My first attempt to drive a Segway failed miserably..

     Stop think in arduino term if you wish a professional product, convert it if you are trying a complex hobby device, don't expect best result just rising computing power 1-1000 with controller fitted to arrange a slow device, can also become unstable and oscillate too.

     When you get acquainted with Instaspin you can do much more and best tune your application with ease.

  • cb1_mobile said:
    Do note... "and, the devil made me do it!..."  (after the x100th post, "My MCU don't work!)  {and that was it...}

      This remind me a "devil" on motor driven item... Don't try this yourself till you are an experienced pilot ;)

     Still some document of "fine tuning" revealing some human feeling are present about high speed controller training, damping and smoothing function as from his speak where near shut down..

     CB1, is your Devil at this level? ;)

  • [quote user= said:

     Yes, SPI peripheral and processor where few cm from controlling in a LOW current environment!

     COntrolling a remote HIGH current require an high speed  communication cable and signal isolator to separate grond from one processor to the other avoiding dangerous current loop.. You are planning a several amp PWM controller not a small prototype, so why not use CAN BUS? Is ready on tiva board and I am sure wiring a sop8 chip is not so difficult like wiring a digital isolator.

     Digital isolator can save you a HOT hole with lot of smelling smoke and firework in all your processor...

    Hi!

     

    My question is, is there any CAN bus on the DRV8301-69M-KIT?
    I know there is CAN bus on TIVA, which gives a convenient way to communicate with another board that has the CAN bus.

     

    Thanks!

  • hau-shiue Juang said:
    My question is, is there any CAN bus on the DRV8301-69M-KIT?
    I know there is CAN bus on TIVA, which gives a convenient way to communicate with another board that has the CAN

    Good question but I am not able to answer you precisely and no documentation is online to evaluate what is on motor controller so:

    Processor has eCAN on chip

    Control Board export eCAN signal on edge

     No knowledge of what is on base so mzy be present or not and you need wire up two small board with  iso1050 isolated CAN driver the worst case.

     I suggest move this question to C2000 forum where TI employee or someone is using this kit can answer more precisely.

  • Stellaris Dexter said:

    I have one addition to the good advice already offered.

    Since you mention having already done a similar project with Arduino, then i suggest looking into the Tiva LaunchPad (EK-TM4C123GXL) and Energia (http://energia.nu) Energia uses the same wiring framework foundation as Arduino.  Migrating to Energia and Tiva LaunchPad (or C2000) may be a smaller step toward your final goal.

    Also note that TivaWare is offered for several professional IDE's if one that list better matches your previous experience it may be a better choice than changing to the TI IDE.

    From a high level, to answer the original question, yes the task seems to be within the limits of the Tiva MCU.  However as forum regular cb1 so often reminds us the devil is in the details.

    Dexter

    Hi!

    I also consider the InstaSPIN-FOC LaunchPad and DRV8301 BoosterPack Bundle as the relatively low-cost solutions for the BLDC control.

    I have a question that can the InstaSPIN-FOC function give me the direct torque control(DTC) for the BLDC?
    This website:
    http://www.ti.com/ww/en/mcu/instaspin/instaspin-foc.shtml says that the FAST™ can control the flux, angle, speed and torque.
    I just want to check again, thanks!!

  • hau-shiue Juang said:

    I also consider the InstaSPIN-FOC LaunchPad and DRV8301 BoosterPack Bundle as the relatively low-cost solutions for the BLDC control.

     F28027 has no CLA, no coprocessor nor CAN, this can be a good starting point to familiarize with INSTASPIN, remember to use an isolator between interface you plan to use and controller, ISO15 or ISO35 for rs422 485 or one isolating SPI or what you think use to experiment motion. USB is isolated on Launchpad so you don't have to care also if using multiple board.

     This KIT is also limited to 24V, with some rework you can change MOS and resistor to scale to a more high voltage, generally motor are driven from 36 or 48V rail and this sound limiting but torque (limited) and all other parameter are well controlled also at low voltage.

  • hau-shiue Juang said:

    My question is, is there any CAN bus on the DRV8301-69M-KIT?
    I know there is CAN bus on TIVA, which gives a convenient way to communicate with another board that has the CAN bus.

     The answer is yes, see what is on page 5 of board manual (reported here after text) and picture of board on page 7 both CAN and SPI are isolated on board.

     Try install motorware package from this page then browse all manual and software to see what is offering. I am not using this package I usually use C2000 to drive step motor in microstepping mode but I plan to use on near future to evaluate use an ACI motor instead of a DC one.

     I forgot in preceding post 28027 is fixed point VS 2806x Floating point

     FROM Page 5 snip:

    Three-Phase Power Stage, DRV830x capable of driving 3-phase brushless DC motors
    and Permanent Magnet Synchronous Motors.

    .....................................

    Isolated CAN and SPI communication (will only work if MCU supports and SW is
    enabled)

    ..................................

    JTAG connector for external emulators
    Quadrature Encoder Interface and Hall Sensor Interface available for speed and position
    measurement (only if MCU supports and SW is enabled)

    ........................

    Hardware Developer’s Package that includes schematics and bill of materials
    .....................

  • hau-shiue Juang said:

    Hi!

    I also consider the InstaSPIN-FOC LaunchPad and DRV8301 BoosterPack Bundle as the relatively low-cost solutions for the BLDC control.

    I have a question that can the InstaSPIN-FOC function give me the direct torque control(DTC) for the BLDC?
    This website:
    http://www.ti.com/ww/en/mcu/instaspin/instaspin-foc.shtml says that the FAST™ can control the flux, angle, speed and torque.
    I just want to check again, thanks!!

    I am not familiar enough with the InstaSPIN-FOC function to answer specific questions, please ask this on the C2000 forums.

    Dexter

  • Stellaris Dexter said:

    I am not familiar enough with the InstaSPIN-FOC function to answer specific questions, please ask this on the C2000 forums.

     I am not familiar with the kit with but nothing useful can be added on C2000 forum, people on that forum  are also there, project require knowledge in both processors so it can added a parallel thread asking specific data.

  • Stellaris Dexter said:
    InstaSPIN-FOC function

     At time of stellaris InstaSpin was also available on that series, is this work in progress also for TIVA or that function remain confined to C2000 series?

  • Currently InstaSpin is limited to C2000.  There is work to bring this technology to a Tiva device, I don't know the details or schedule.

    Dexter

  • Any update on which board you selected as your main control board?  I would like to do something similar with TI control board.

    thanks

  • Sorry for the lately reply.

    Actually I already finished some balancing robots by Arduino.
    Here are some videos:

    Stand
    Forward Moving
    Line Following 1
    Line Following 2

    I already purchase the DRV-8301-69M-KIT for my new robot.
    The past six month I was working on dynamics modeling(Newton's second law and the Lagrangian), structure design by CAD, C++ learning and coding.
    And once I finish it, I will post it!

    Thanks


  • hau-shiue Juang said:
    I already purchase the DRV-8301-69M-KIT for my new robot.
    The past six month I was working on dynamics modeling(Newton's second law and the Lagrangian), structure design by CAD, C++ learning and coding.
    And once I finish it, I will post it!

     Hi Hau, good job, but model is too much unstable due to lack of computing power, try do an inexpensive move, buy a TIVA launchpad and mount instead of EXPENSIVE arduino, you gain 32bit and floating point too...

     For remote controlling try evaluate blutooth or better wifi module CC3000, if you don't feel confortable with new IDE, first  try energia porting arduino work as is. When all is ok  then you can experience all your new job from IDe you choose. As a bargain new CCS 6.x from TI also support energia sketch helping tracing and find where error can be.

     see you.

  • Now I have some problem on the BLDC motor control with the DRV8301-69M-Kit.
    The motor is a sensored BLDC hub motor. The motor kit application software seems cannot estimate the hub motor's parameter very well. Also the control seems "time variant". I mean I have record a set of data which is given by the successful motor parameter estimation. The hub motor can be controlled by these parameter after parameter estimation. But once I restart the software and reconnect the USB, then do the motor control which skip the estimation. Just setting the parameter directly, and it operated(spin) sometime but often stuck. Sometime the motor make a loud noise and the development board turned off with a long beep sound, I was scared out of my wits at the first I encountered this problem.

    Also I want to ask is there any recommend board for measure the sensor signal(maybe I2C or analog input), processing data and do realtime control.

    Any suggestion will be appreciated!

  • hau-shiue Juang said:
    Now I have some problem on the BLDC motor control with the DRV8301-69M-Kit.
    The motor is a sensored BLDC hub motor. The motor kit application software seems cannot estimate the hub motor's

     Hi Hau, you jumped from preistoric arduino to a giant of actual tecnology so it scare you by it power...

     I suggest you to move to C2000 and or instaspin forum then report all parameter of your board, of motor you know or not and issue you encountered. Here is Tiva and you can get less support.

     I wait for your new post in the appropriate area to see if I can help you

  • Roberto Romano said:

     I suggest you to move to C2000 and or instaspin forum then report all parameter of your board, of motor you know or not and issue you encountered. Here is Tiva and you can get less support.

     I wait for your new post in the appropriate area to see if I can help you



    Thank you for your suggestion!
    Now I am upgrading my CCS and Motorware, I will move to C2000 after I finished some test.