1 2 Previous Next 14 Replies Latest reply on May 2, 2017 2:04 AM by azzbc_2215071

# speed MOTOR BLDC (brushless)

good morning evry one

Am working on a project with psoc 4, i want to pilot a motor brushless with a drive carte "BLHD30K", and i want to calculat the speed motor!!

this drive carte give a Pulse signals (pulse width: 0.3 ms) of 30 pulses per revolution of the motor output shaft are output in synchronism with the motor drive.
Motor speed can be calculated by measuring the SPEED output frequency.

Motor speed [tr/min] =(SPEED output frequency (hz)*60)/30

SPEED output frequency =1/T

like that i can also calculat the position of the motor by using an interruption every 30pulse -----> one revolution (tour),

but i dont khnow how to calculat that? any idea !!

thank you

• ###### 1. Re: speed MOTOR BLDC (brushless)

i forget to say that am using a psoc creator 4200L

thank u

• ###### 2. Re: speed MOTOR BLDC (brushless)

You will need an actual feed back from the motor shaft position.  I would us a shaft encoder.

• ###### 3. Re: speed MOTOR BLDC (brushless)

yes the carte drive send an output speed, normally is a :

"output
Pulse signals (pulse width: 0.3 ms) of 30 pulses per revolution of the motor output
shaft are output in synchronism with the motor drive.
Motor speed can be calculated by measuring the SPEED output"

sow i should calculate the the SPEED output, for that i try with a simple counter, in my inputpin i already prepare an pwm 182hz juste for test, then i send it to this input and then i send the answer with hid usb Command, her my code u can see if u want

Intel now it doest working !!, i don't know why ^^ :/

• ###### 4. Re: speed MOTOR BLDC (brushless)

i look for all the exemple her i didnt find any soft wich make us have the frequency or the speed motor  o_o

thank u for your answear bobgoar

• ###### 5. Re: speed MOTOR BLDC (brushless)

i try this solution for count the number of pulse but it dosnt work :\

• ###### 6. Re: speed MOTOR BLDC (brushless)

Hi,

The project you attached doesn't have the counting sections [TCPWMExample02.cydsn].
From the TopDesign snapshot, I am guessing interrupt is generated for the TC. Please attach the complete project.

Jobin

• ###### 7. Re: speed MOTOR BLDC (brushless)

Hi,

There is a counter example project already available in PSoC Creator using UDB. [PFA]

Jobin

• ###### 8. Re: speed MOTOR BLDC (brushless)

i think with that example we could not read the input pulse!!

we just need a soft make us read a pwm pulse to calculate frequency and speed ^^

that why i propose to use counter but we need to connect him with an input pin ;), after ill send it to an application by using usb device

her take a look for wath i propose but it dosnt work yet !!!

• ###### 9. Re: speed MOTOR BLDC (brushless)

for testing my soft i use a pwm that i send after in my counter juste for test

• ###### 10. Re: speed MOTOR BLDC (brushless)

Can you provide your complete project .cydsn file

• ###### 11. Re: speed MOTOR BLDC (brushless)

hi thank u ANKS, i was in vacation, her my project if you are interested

thank you ^^

• ###### 12. Re: speed MOTOR BLDC (brushless)

hi ANKS, need a request plz :), wath do u think about the project ?

• ###### 13. Re: speed MOTOR BLDC (brushless)

Hi,

Still the attachment doesn't have the required project "TCPWMExample01.cyprj".
We are getting error: Could not find a part of the path 'C:\Users\JOBI\Desktop\Cases\Q217\forum\azbida\Nouveau dossier\TCPWMExample02\Backup\P_SCANCUBE_v1\code\TCPWMExample01.cydsn\TCPWMExample01.cyprj'.

And also the \P_SCANCUBE_v1\ folder is not available in the archive.

# open the project which have two TCPWM and USBFS

# Right click on Project 'TCPWM...' in workspace explorer

# Select archive

Jobin

• ###### 14. Re: speed MOTOR BLDC (brushless)

hi jobin

sorry i was in vacation, didn't see you box ^^ , her my project you can tack a look if you want, steel have a problem with my counter

thank u ;)

1 2 Previous Next