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.

DRV8301-69M-KIT: New to the platform and have some questions

Part Number: DRV8301-69M-KIT
Other Parts Discussed in Thread: MOTORWARE,

Hello, I have quite a few questions, but I'll try to keep things well spaced.

I'm an embedded systems student at a university in Finland and I have previous experience with Atmel's MCUs (ATtiny, ATmega, Xmega and M0+ ARM) and I am used to chip level register assignment from those MCUs. I have been learning and developing a brushless motor controller for about a year now and I have been watching TI's old youtube serie "Teaching old motors new tricks" to get a hang of FOC basics and theory. I'm feeling pretty comfortable with it now, so I also decided to look into TI's InstaSPIN solutions as a better "end-game" alternative compared to developing my own controller from scratch. The controller is currently developed for a electric skateboard, which can be checked out -->here<--, but I'm also looking a controller, which can be later adapted to higher power and other type motor topologies. I've been reading a lot of TI's documentation of their Piccolo InstaSPIN-FOC for a couple days and have checked out MotorWare and it's lab examples for CCS.

I am ordering the DRV8301-69M-KIT this week to get started on the practical learning on the platform.

That's my background, now for the questions:

-Having been used to directly point to registers for write/read (eg. REG_PORTB = 0x31; X = REG_INA;). The Piccolo seems to like if pretty much everything is done through the HAL for register and peripheral configuration rather then point to individual registers for configuration. Is this the right understanding that I've gotten?

-Some of the variable types seem a bit odd, because I'm coming from Atmel, but for example in the lab examples, when debugging and using the watch window there is value for example: "X = 0.078189932 (Q-Value(24)) long". What is "Q-value(24)"? Is it something to do with IQmath? And also looking at the module API documentation as an example: "_iq EST_getAngle_pu (EST_Handle handle)" "Gets the angle value from the estimator in per unit (pu), IQ24." So what does the angle variable look like that this function returns?

-Piccolo and scalability. Can this platform be used with PM motors starting from tens of watts to multi kiloWatt induction motors, as long as the external hardware is setup to give proper feedback to the MCUs ADCs and user.h file updated accordingly? Shunt resistor and voltage divider based solutions for low power applications and then for example Hall-devices for higher currents and voltage transducers for high voltages?

-Currently I have two students at the local university making and writing their bachelor's degree works for me. They are developing a smartphone app and a wireless remote control and we plan to interface them to a Atmel MCU on the motor controller with their respective radios and then interface the Atmel MCU to the Piccolo MCU via SPI/UART/etc. We plan on using the Piccolo in torque control mode so we need to send the wanted torque to the Piccolo and preferably send back motor speed, motor current, DC bus voltage and either duty% or it's derivative to calculate motor power. I have peeked at some of the functions from the est.h and I saw "EST_getTorque_lbin"  and "EST_getSpeed_krpm", so I assume that those parameters can be polled, but what about the other ones we need?

-I would hope to map my throttle setting to a current for the motor for example: "positive acceleration range 0 A - 30 A, so 20% throttle would equal 6 Amps of motor current and 50% -> 15 Amps and so on". We would have a different scale for deceleration (0 A - 15 A), but I hope you get the idea. We can then implement in the smartphone a custom throttle curve, which we apply in the Atmel MCU before sending the adapted current to the Piccolo. With the motor speed feedback from the Piccolo we can also implement max. speed restriction and limit the commanded torque/current that way.

A looot of text, but I hope you guys can answer couple of them. Also on the off-topic of electric skateboards. These Mellow guys are using the Piccolo MCUs for their completely sensorless motor control in their board and that really got me interested in the platform. My own controller has so far been using sensored setups and it would so nice if this platform could help me accelerate the development.

    • Yes, module registers should be addressed through the HAL to maintain continuity throughout InstaSPIN code
    • Yes, these are examples of IQMath, whose function is to represent floating point numbers in a fixed point core. For a pu representation, you can expect the range [-1,1] to represent an angle of [-pi,pi], or something similar across a 2pi range
    • Yes, the MCU only depends on the ADCs to sense the external system. Hardware setup -correctly- for any range of output wattages is acceptable.
    • This should definitely be possible

    Sean

  • Can you give a short summary how you could implement forward braking (regen braking) on the Piccolo platform. I searched the "instaspin_labs.pdf" for regen, braking and brake keywords, but got no hits.

    As an example, if the motor was spinning in a forward direction with a positive commanded iq-value for positive torque, would entering a negative commanded iq-value result in reverse drive ant not in forward braking?