Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
lock attach
Attachments are accessible only for community members.
jepaz
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

hello, I am working on a system that is working with a capacitive encoder I having trouble with the reading speed in pps.

   

the shaft speed is a little less than 10 rev per sec, if I setup the encoder counts to 100 ppr I would have a signal of nearly 1kHz of frequency

   

if the Counter UDB on the PSOC4 works at 12MHz then I should be able to increase the resolution to 1000 ppr, but when I do that the program doesnt even read the pulses, I switched the input threshold to LVTTL and with that I managed to have a good result at 100ppr, I cant seem to find out why is this happening, I need to increase the resolution.

   

The encoder datasheet says it is able to work at speeds of 7500rpm that means 125rps

   

the program triggers a relay when the counter exceeds the compare value, the switching is fast enough, but I need to increase the counter resolution 

   

I appreciate your help

0 Likes
7 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I cannot see any quad decoder in your Topdesign, sorry.

   

 

   

Bob

0 Likes
jepaz
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked
        HI Bob, I don't really need a quadrature decoder the shaft only spins in one direction that is why I used the top left counter the reading speed shouldnt be that different right?   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You do not reload the counter, a Start() does not reload.

   

AVOID DELAYS IN INTERRUPT HANDLERS!

   

The period is set to 200 which is a period value of 199. The compare value might not get reached when reloaded at tc. So better hang the ist to terminal count (tc).

   

Are you trying to measure the speed? Then you might use a timer gating your counter with enable.

   

 

   

Bob

0 Likes
jepaz
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked
        HI Bob, well I was writing the counter values to 0on the timer interrupt, the idea is to count a number of revolutions and then stop the auger, then run the timer and when the count is overflowed then engage the auger and start counting that part is working well, the problem is that I cant increase the resolution of the encoder because Then with a signal of about 20 kHz the psoc won't read the counts   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You can easily count signals with a PSoC up in the MHz. Can you scope your signal coming in in respect to the counter clock. Will show if there is some refreshing needed. Also: remove the synchronization from the input pin, that will delay counting.

   

 

   

Bob

0 Likes
jepaz
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked
        Thank you Bob! It's the input threshold making any difference in that?   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

What is the "input treshold"? You have a TTL signal afaik.

   

 

   

Bob

0 Likes