Author Topic: Check if a motor is running  (Read 4035 times)

0 Members and 1 Guest are viewing this topic.

Offline backd00rTopic starter

  • Contributor
  • Posts: 32
  • Country: us
Check if a motor is running
« on: April 01, 2015, 04:19:50 pm »
I am building a BLDC motor controller and I need an easy way to check with a pic if a the motor is running or not. I was thinking about measuring the frequency of the hall sensors but I am not sure how to program that. Please advise
 

Offline Wilksey

  • Super Contributor
  • ***
  • Posts: 1329
Re: Check if a motor is running
« Reply #1 on: April 01, 2015, 05:06:33 pm »
It may or may not be of any use but I did a demo board once where I measured the current to determine if a motor was running.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Check if a motor is running
« Reply #2 on: April 01, 2015, 05:30:07 pm »
You don't need to measure the speed to make an Is it running? (yes/no) decision.  You just need a missing pulse detector.  Whether that's done in external hardware or inside the PIC in a peripheral module or pure software is highly dependent on what resources your PIC has available.   If you want the PIC to handle it for you, you would do better to post your question in one of Microchip's own forums if you want specific solutions.
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: Check if a motor is running
« Reply #3 on: April 01, 2015, 09:37:45 pm »
To be sure the rotor is spinning, and since it's a BLDC, you should check the Hall's sequence, not only if they are "toggling".
 

Offline max_torque

  • Super Contributor
  • ***
  • Posts: 1279
  • Country: gb
    • bitdynamics
Re: Check if a motor is running
« Reply #4 on: April 01, 2015, 10:06:35 pm »
I am building a BLDC motor controller and I need an easy way to check with a pic if a the motor is running or not. I was thinking about measuring the frequency of the hall sensors but I am not sure how to program that. Please advise


So you are planning to build your own BLDC motor controller. Cool.

But you're not sure how to program a very basic bit of code to see if the motor is spinning, even though knowing the motors rotor position at all times (and hence it's velocity) is the absolute backbone of any BLDC motor control code. 

Hmm, i don't see this ending well...................
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Check if a motor is running
« Reply #5 on: April 01, 2015, 10:14:10 pm »
It might be an open-hardware design for which prebuilt 'canned' firmware is available, and the PIC may be a separate MCU that is not directly in control of the motor.   If so, he's in with a chance, otherwise I agree that the most likely outcome is that it repeatedly elects a pope till he runs out of replacement silicon/motors/cash/unburnt fingertips.
 

Offline backd00rTopic starter

  • Contributor
  • Posts: 32
  • Country: us
Re: Check if a motor is running
« Reply #6 on: April 03, 2015, 04:28:14 am »
I am building a BLDC motor controller and I need an easy way to check with a pic if a the motor is running or not. I was thinking about measuring the frequency of the hall sensors but I am not sure how to program that. Please advise


So you are planning to build your own BLDC motor controller. Cool.

But you're not sure how to program a very basic bit of code to see if the motor is spinning, even though knowing the motors rotor position at all times (and hence it's velocity) is the absolute backbone of any BLDC motor control code. 

Hmm, i don't see this ending well...................

Dude I have a brushless Dc motor controller MC33035 my motor actually runs pretty smoothly, the PIC is programmed to interface between both motors(electronic differential) and also to do Cruse control, and ebrake, economy mode, read throttle values... I know what I am doing !! my question was more like if there is a better idea out there of how to detect if the motor is running with a pic . I can always measure the period with CCP port and thats is it. I was just wondering you went way too far...
« Last Edit: April 03, 2015, 04:31:56 am by backd00r »
 

Offline backd00rTopic starter

  • Contributor
  • Posts: 32
  • Country: us
Re: Check if a motor is running
« Reply #7 on: April 03, 2015, 04:31:04 am »
It might be an open-hardware design for which prebuilt 'canned' firmware is available, and the PIC may be a separate MCU that is not directly in control of the motor.   If so, he's in with a chance, otherwise I agree that the most likely outcome is that it repeatedly elects a pope till he runs out of replacement silicon/motors/cash/unburnt fingertips.

LOL you guys are very helpful none of you actually answered my question ...  :palm:  . I have separate hardware driving the motor...
 

Offline backd00rTopic starter

  • Contributor
  • Posts: 32
  • Country: us
Re: Check if a motor is running
« Reply #8 on: April 03, 2015, 04:33:16 am »
I will post the schematics and the code once I am done with the project if anybody is interested. I should be done by the end of this month. Thank you anyways
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: Check if a motor is running
« Reply #9 on: April 03, 2015, 05:26:17 am »
There are a fair number of PICs with QEI modules.  If your PIC has one it could be connected to two of the sensors (which will produce a somewhat skewed signal but near enough to quadrature to work), and that would not only tell you if it is running with minimal software intervention, but how far it has turned since you last polled it, eliminating the possibility of a motor with a jammed drivetrain or controller fault that is vibrating through a small angle being misdirected as running.

However as I said earlier, the real expertise for solutions that are internal to the PIC is over at Microchip's forums, and to give you better advice, we need to know which PIC and any peripherals you've already tied up for other purposes.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf