Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

KY-040 encoder only works counterclockwise.

2 posters

Go down  Message [Page 1 of 1]

feri



KY-040 encoder only works counterclockwise.
Clockwise does not increment the counter.
It works fine in version 1.0.1.
Greetings
Attachments
KY-040 encoder only works counterclockwise. AttachmentEncoder.zip
You don't have permission to download attachments.
(2 Kb) Downloaded 0 times



Last edited by arcachofo on Thu Apr 14, 2022 7:47 pm; edited 1 time in total (Reason for editing : Mark as unsolved (red color))

arcachofo

arcachofo

Hi.
As I understand it works ok in 1.0.1, but in which version it does not work?

feri



SimulIDE 0.4.15 (November 3: Updated to SR9-Stable) Linux

arcachofo

arcachofo

Ok thanks.

feri



Making further tests based on youtube video (I don't have the encoder available), I noticed that even in version 1.0.1 the encoder counts 40-50 while from video it should count 20 every turn.
Turning one turn clockwise and then one turn counterclockwise does not return to 0 especially if you do it several times.
I attach scketch, schematic and movie link.
Greetings

https://www.youtube.com/watch?v=NLrdUmwyGJE

Attachments
KY-040 encoder only works counterclockwise. AttachmentEncoder.zip
You don't have permission to download attachments.
(2 Kb) Downloaded 0 times

arcachofo

arcachofo

Making further tests based on youtube video (I don't have the encoder available), I noticed that even in version 1.0.1 the encoder counts 40-50 while from video it should count 20 every turn.
You can configure the number of steps per rotation in the properties dialog.

Turning one turn clockwise and then one turn counterclockwise does not return to 0 especially if you do it several times.
Turning it too fast can cause lost steps.
How is too fast depends on how fast is doing the simulation.

Do you have the same problem is you turn it slowly?

feri



I did some tests with both black flies 0.15 and 1.01 and reeds with an encoder modified by me.
From the internet I downloaded the features of the KY-040:
The scheme

KY-040 encoder only works counterclockwise. Ky-04010

The signal, however, that according to the scheme the impulse should be towards the ground.

KY-040 encoder only works counterclockwise. Ky-04011


I created a sketch that counts the pulses.
With the KY-040 made by me and my sketch the count is correct 20.
With the KY-040 of black flies and my sketch counts about 38.
If I use a library for KY-040 with my KY-040 and my sketch counts 80 (4 per pulse) with the black fly KY-040 counts 128.
I can't understand how this module works.
If anyone has it or knows it, they could explain it to me.
Thanks
Greetings

arcachofo

arcachofo

I missunderstood your previous post.
Indeed there is an error in Rotary encoder simulide 1.0.1, it generates double the number of pulses.
Solved at Rev 1101.


Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum