Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Capture module doesn't capture rising/falling events from Hall sensor

0 votes
208 views
Hi, I'm using PLECS with a BLDC motor and I'm having some issues with the capture of events module when using an Hall sensor.

I am using a F26069M Launchpad with the DRV8305EVM boostpack and the BLDC motor is the QBL4208-100 from TRINAMIC.

At the beginning I thought that the Hall sensor output for each phase was a sinusoidal Voltage signal that varies accordingly to the electrical position of the rotor: after some researches and readings of TRINAMIC's forums and datasheets I found out my Hall Sensor works as https://www.trinamic.com/fileadmin/assets/Landingpage/animation_png/Hall-Sensor-BLDC-Web.gif shows.

Since I need to read a series of 0s and 1s I then started using the eCAP module of the F28069M in order to determine the position of the rotor assuming that I should apply the time-difference operation explained at page.445 of the F28069M manual https://www.ti.com/lit/ug/spruh18i/spruh18i.pdf?ts=1668961716403&ref_url=https%253A%252F%252Fwww.google.com%252F

 

My hardware is wired like this: 120° Hall sensor from BLDC motor goes into the eQEP2 pins on the bottom of the Launchpad where these pins are setted as eCAP1/2/3 on GPIOs 11/7/9.
This configuration and the behaviour of the Hall sensor should be equal to the one stated in the table 2 at page.4 of the RT-Box example https://www.plexim.com/sites/default/files/demo_models_categorized/rtbox/launchpad_interface_demo.pdf    - can you please confirm?

From now on please assume only the phase A Hall sensor connected and that the motor is being turned by my thumb.

After reading the c2000 manual from PLECS, in order to see if the settings of GPIO11 were correct for phase A, with the rotor standing still I set at first the CAPTURE module as Event1 rising and Event2 falling with both resets on "false" as this gives back a ramp that wraps aroun 0-2^32 accordingly to what is stated on the TexasInstrument manual (As far as I know this should be the correct behaviour of the CAPTURE module output because not moving the rotor means not resetting the counter and so it counts up until it reaches its maximum value).

With this in mind, with a full electrical turn I should get that the Hall output of phase A should be 0 0 0 0 1 1 1 1, which means that I could set 2 events: Event 1 rising and Event 2 falling.
By setting the reset counters to "true" both for Event 1 and Event 2, I should be able to see a saw-tooth shaped output from the CAPTURE module while the rotor spins as the time-difference behaviour mentioned above in the TI Manual states. Unfortunately this does not happen and the CAPTURE module in PLECS remains constant at a value of ~1.8e6 indipendently of the rotor position either if I spin it with my thumb or if it stands still.

Why does this happen? Am I missing something or did I misunderstand the eCAP output behaviour?

Another related question I have is: on the TI manual it looks like that the output of the eCAP should be a single signal but why does the CAPTURE module from PLECS outputs a number of signals equal to the numer of Events set under the CAPTURE module mask?

I hope I've been clear enough in explaining my problem but I wasn't able to explain it in any easier way.

Thanks in advance to whoever will answer me.

Have a good day,
Alberto
asked Nov 23, 2022 by Alberto (16 points)
retagged Nov 23, 2022 by Alberto
Contacted the requestor directly to discuss this question.

 - Manu

Please log in or register to answer this question.

...