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.
Good Morning,
I can't find chapter 21 Adding System Functions nor 22 Building Your InstaSPIN-FOC and InstaSPIN-MOTION Board.
Are they available?
Where can I find them?
Thanks
Jimmy
Hello,
Unfortunately these have not been completed in the UG yet. I recommend asking any specific questions you have on either topic.
For building your own board there are two main topic areas
1. Voltage sensing: be sure to choose appropriate filtering pole for the maximum speed of your motor.
2. Current sensing: kelvin grounds, symmetric layout of the sense lines, limit effect of noise (system and from the other legs switching), do the final scaling/amplification very close to the MCU ADC pins to limit noise pick up from the inverter
Using Lab5d I am trying to make a mock up of my application. it's a lifting application.
For the application I need an excellent control of the brake. I use the buttons start and stop located on GPIO7 and GPIO9 as my Up and Down buttons.
And I want to use GPIO28 on J12 of the inverter. But I haven't been able to use the same procedure I use for GPIOread. With GPIOread I give the handle and the GPIOnumber and work perfectly. But with GPIO_setHigh it does not do anything.
goUp,goDown,energ_brake are global variables. And on the mainISR I write:
DRV_Obj *obj = (DRV_Obj *)drvHandle; button_Up = GPIO_read(obj->gpioHandle,(GPIO_Number_e)GPIO_Number_9); button_Down = GPIO_read(obj->gpioHandle,(GPIO_Number_e)GPIO_Number_7);
if (button_Up && !button_Down){ goUp=1; goDown=0; energ_brake=1; //J12 GPIO pin1 => GPIO28 is the brake output GPIO_setHigh(obj->gpioHandle,(GPIO_Number_e)GPIO_Number_28); //release the brake CTRL_setSpd_ref_krpm(ctrlHandle,_IQ24(1.6));//speed set to 1600rpm } else if (!button_Up && button_Down){ goUp=0; goDown=1; energ_brake=1; //J12 GPIO pin1 => GPIO28 is the brake output GPIO_setHigh(obj->gpioHandle,(GPIO_Number_e)GPIO_Number_28); //release the brake CTRL_setSpd_ref_krpm(ctrlHandle,_IQ24(-1.6)); //speed set to 1600rpm } else { goUp=0; goDown=0; energ_brake=0; GPIO_setLow(obj->gpioHandle,(GPIO_Number_e)GPIO_Number_28); //brake deenergized CTRL_setSpd_ref_krpm(ctrlHandle,_IQ24(0.0)); //speed set to 0 rpm }
Jaume,
If you run MotorWare.exe there are links to everythng you need.
For DRV8301 EVM it will point you to our controlSUITE repository. controlSUITE is the "standard" repository for all C2000/Piccolo products. We already had kits that use the DRV8301 EVM, so we didn't want to replicate the content inside of the MotorWare installation.
C:\ti\controlSUITE\development_kits\DRV830x-HC-C2-KIT_v104\~DRV830x-HC-EVM-HWdevPkg\DRV830x_RevD_HWDevPKG
J12 is connected to DIMM pins 43 (28) and 93 (29)
GPIO28 is the Rx and GPIO29 is the Tx
Chris,
Now I have discovered where everything is!
I suggest you include a simple text file in the folder of "DRV8301-69M-KIT High Current 3Ph BLDC/PMSM with InstaSPIN-FOC and InstaSPIN-MOTION" indicating that all the files are in the folder "DRV830x-HC-KIT High Current 3ph BLDC/PMSM"
had it not been for your indication "C:\ti\controlSUITE\development_kits\DRV830x-HC-C2-KIT_v104\~DRV830x-HC-EVM-HWdevPkg\DRV830x_RevD_HWDevPKG" I wouldn't have found it.
But now the question is:
Is there a blank project like PM_sensorless, but for InstaSPIN-MOTION?
I see that InstaSPIN BLDC is not availavle for F28069 devices?
I guess I have to reanalyze and get familiar with all the code in PM_Sensorless and adjust it to my application.
ok,
thanks,
"Is there a blank project like PM_sensorless, but for InstaSPIN-MOTION?"
PM_sensorless from controlSUITE is not a blank project. It is a working project pre-tuned for a specific motor.
The InstaSPIN-MOTION projects are adjustable per Motor.
Are you using
C:\ti\motorware\motorware_1_01_00_11\MotorWare.exe
to browse available content?
From there follow the Projects & Labs User's Guide to walk through the labs
C:\ti\motorware\motorware_1_01_00_11\docs\labs\instaspin_labs.pdf
"I see that InstaSPIN BLDC is not availavle for F28069 devices?"
It is available. The controlSUITE projects are dual-built for F28035 and F28069 (it is also a simple port to run on F28027). You just right click on the project in CCS and set the active configuration. Note that this is for the standard F28069 device. If you use the F28069M controlCARD you will have to add in the IQMath library manually as it is NOT in ROM on F28069M like it is for F28069 (on 69M it is replaced with InstaSPIN-F/-M libraries).
ok I didn't write it correctly. PM_sensorless is a working project that needs to be tuned, so for the a user like me it's like a blank project since it's the starting point to start working (but it is far from being blank. agreed)
And I have done all the labs (which are great!) and have decided to use lab5d to adjust it to my application.
I can't find this part of code that I can easily find on PM_Sensorless.-DevInit_F2806x.c:
// QUICK NOTES on USAGE: //----------------------- // If GpioCtrlRegs.GP?MUX?bit.GPIO?= 1, 2 or 3 (i.e. Non GPIO func), then leave // rest of lines commented // If GpioCtrlRegs.GP?MUX?bit.GPIO?= 0 (i.e. GPIO func), then: // 1) uncomment GpioCtrlRegs.GP?DIR.bit.GPIO? = ? and choose pin to be IN or OUT // 2) If IN, can leave next to lines commented // 3) If OUT, uncomment line with ..GPACLEAR.. to force pin LOW or // uncomment line with ..GPASET.. to force pin HIGH or //-------------------------------------------------------------------------------------- // GPIO-00 - PIN FUNCTION = PWM_AH GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; // 0=GPIO, 1=EPWM1A, 2=Resv, 3=Resv // GpioCtrlRegs.GPADIR.bit.GPIO0 = 0; // 1=OUTput, 0=INput // GpioDataRegs.GPACLEAR.bit.GPIO0 = 1; // uncomment if --> Set Low initially // GpioDataRegs.GPASET.bit.GPIO0 = 1; // uncomment if --> Set High initially //-------------------------------------------------------------------------------------- // GPIO-01 - PIN FUNCTION = PWM_AL GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1; // 0=GPIO, 1=EPWM1B, 2=EMU (0), 3=COMP1OUT // GpioCtrlRegs.GPADIR.bit.GPIO1 = 0; // 1=OUTput, 0=INput // GpioDataRegs.GPACLEAR.bit.GPIO1 = 1; // uncomment if --> Set Low initially // GpioDataRegs.GPASET.bit.GPIO1 = 1; // uncomment if --> Set High initially //--------------------------------------------------------------------------------------
where is it on the project labs of InstaMOTION?
I "Open Declaration F3" on the file gpio.c and it's not here. I "Open Declaration F3" on gpio.h and it's not there
Jaume,
Ok, now I understand your question.
For MotorWare you will notice that the proj_lab##.c and all the files at instaspin_XXXX/src are portable, re-used across MCU and Inverter hardware combinations.
You will notice that the /sw/modules is mostly unreliant on MCU or Inverter, and /sw/drivers are MCU specific for the most part.
The file that ties the main solution together with the MCU and Inverter we are using (or your own) are the drv.c and drv.h
example
C:\ti\motorware\motorware_1_01_00_11\sw\drivers\drv\boards\drv8301kit_revD\f28x\f2806x\src
When you start customzing the sw to your own solution youy will want to create something like
C:\ti\motorware\motorware_1_01_00_11\sw\drivers\drv\boards\myboard_revA\f28x\f2806x\src
And FYI, in MotorWare _12 (end of this month) we are making a change that effects this topic. This /drv folder will be called /hal (Hardware Abstraction Layer) going forward.
Thanks Chris,
I have made a lot of progress.
The machine works perfectly, BUT:
I set speedref to 0. I deenergize the brake(then it completely stops). And there is torque applied. Is it possible that the brake causes problems to the control?
If I set Iqref zero it makes an electrical noise.
Where can I learn about controlling an electromechanical brake with a speed control?
I think it would be interesting to include it on the InstaSPIN-MOTION guide.
I'm not sure I quite follow what you are doing. Let me see if this is what you are saying:
You are running your motor attached to a load/brake?
When you set Speed_Ref = 0 and de-engergize the brake (I assume load is then ~0, but there is probably some friction load still happening).
"Is it possible that the brake causes problems to the control?"
Depends on what control you expect. Sensorless InstaSPIN will NOT control zero speed perfectly. As you hit zero speed the FAST estimator does not have any Bemf feedback so its estimator and output starts to drift. How quickly this happens - and how quickly it recovers with just a tiny bit of rotor movement - depends on the size of the Bemf vs. the voltage scaling of the inverter as well as the current/load (more load is better).
But to be clear, it will NOT be able to hold zero speed. To do true zero speed control you need to use a mechanical rotor sernsor or some sort of zero/low speed position detection algorithm (saliency or saturation tracking are most typical).
"If I set Iqref zero it makes an electrical noise."
Are you still in a speed control loop or you have disabled the speed controller and are just directly providing an Iq_ref of 0?
If you do this you probably should just disable the PWMs as well, that way you aren't switching the inverter for no reason.
I have a lift. So the concept "Load" is not straight forward. If the brake is not applied and the inverter is not on the load falls to the ground.
To prevent this I have an electromechanical brake that keeps the motor stopped.
>When you set Speed_Ref = 0 and de-engergize the brake (I assume load is then ~0, but there is probably some friction load still happening).
Friction is 100%. Then what I think is that since the sensorless speed feedback is not perfect it makes some torque.
I think that the solution is to disable the PWM. But the thing is where am I supposed to put my code? It's about ten lines of code... reading two GPIO for up and down and setting speedref ... Right now I have it on the mainISR
yes, what I would do is have a flag in your background (not MAIN ISR) for brake_active
when brake_active
PWM (disable)
brake_active_last_angle = getEST_angle(); // do this just the first time when you activate the brake
when brake_inactive
setEST_angle(brake_active_last_angle);
PWM (enable)
something like that. You may have to reset some PI controllers as well depending on what is happening in your system.