speed MOTOR BLDC (brushless)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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

0 Likes
1 Solution

Hi,

   

We had checked the project. It seems the 'isr_1' is not configured. I believe isr_1 is supposed to be used to count.

   

And the cont variable will always have 1 or 0 since you are assigning the cont to zero in isr_speed().

   

Please let us know the intended algorithm used in this project.

   

Jobin

View solution in original post

0 Likes
15 Replies
Anonymous
Not applicable

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

   

thank u

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

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

0 Likes
Anonymous
Not applicable

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 

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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 ^^ 😕

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

   

 

   

0 Likes
JobinT_31
Employee
Employee
50 solutions authored 25 solutions authored 10 solutions authored

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

0 Likes
lock attach
Attachments are accessible only for community members.
JobinT_31
Employee
Employee
50 solutions authored 25 solutions authored 10 solutions authored

Hi,

   

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

   

Jobin

0 Likes
Anonymous
Not applicable

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 !!! 

   

need some advice thank you 

   

 

   

0 Likes
Anonymous
Not applicable

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

0 Likes
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Can you provide your complete project .cydsn file

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

   

thank you ^^ 

0 Likes

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

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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 😉

0 Likes

Hi,

   

We had checked the project. It seems the 'isr_1' is not configured. I believe isr_1 is supposed to be used to count.

   

And the cont variable will always have 1 or 0 since you are assigning the cont to zero in isr_speed().

   

Please let us know the intended algorithm used in this project.

   

Jobin

0 Likes
Anonymous
Not applicable

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

0 Likes