cancel
Showing results for 
Search instead for 
Did you mean: 

MotorControl Workbench with AS5600(12-Bit Programmable Contactless Potentiometer)

Shevtsov
Associate II

Hi everyone!

I try use SDK with sensor AS5600(12-Bit Programmable Contactless

Potentiometer) and 1/2-H Bridge Driver DRV8313

Motor is 24N28P

MCU: STM32F072C8T6

One shunt resistor with LM2904

I choose hall sensors in Workbench:

  • Sensors displacenent: 120
  • Placement electrical angle: 0
  • Input capture filter duration: 5.33usec

and I convert values AS5600 in HALL-values: 5,1,3,2,6,4 depends on angle. In my case every change of angle 4.25 degree - change hallstate in struct HALL_Handle_t

I do it in while() and if hallstate is changed I call void * HALL_TIMx_CC_IRQHandler( void * pHandleVoid ). Here and in static void HALL_Init_Electrical_Angle( HALL_Handle_t * pHandle ) I comment next code ih these functions:

 
 /*     pHandle->HallState  =(uint8_t) ((LL_GPIO_IsInputPinSet( pHandle->H3Port, pHandle->H3Pin ) << 2)
                            | (LL_GPIO_IsInputPinSet( pHandle->H2Port, pHandle->H2Pin ) << 1)
                            | LL_GPIO_IsInputPinSet( pHandle->H1Port, pHandle->H1Pin ) );
*/

and instead of

bPrevHallState = pHandle->HallState;

i write

bPrevHallState = myVariableOfPrevHallState

But my motor don't spin - only vibrate or brake-on condition. It seems that I check out everything and have no idea what to do next.

Could you help me, please?

4 REPLIES 4
Laurent Ca...
Lead II

Dear @Shevtsov​ 

Welcome to the STM32 Community

Could you give more details to the STM32 Community about your setup -the material you use- ?

(HW and also SW: CPU(s), tools and versions, board(s), motor(s) and so on)

And more especially did you use STM32 MC tools (such as MC_suite, STM32 MC Motor Profile, STM32 MC SDK, STM32 MC Workbench, the used example, the origin of the base of your application source code, and so on)?

Best regards

Laurent Ca...
Lead II

The question has been set only to the "STM32 Motor Control" topic (the question is only about the STM32 MC SDK). 

Best regards

Thank you for answer!

HW:

It's all on my PCB(I designed it).

SW:

  • ST Motor Control Workbench ver.5.4.4.20160
  • Keil ver.5.29.0.0

I want to replace PCB that set in motor DM5015 and use my own pcb and control motor with CAN-interface.

And I need to use sensors like AS5600 - it needs to know position of rotor. My goal is make something like 6-axial mini-robot