Notifications
Clear all

stepper control

20 Posts
6 Users
4 Reactions
1,727 Views
(@banjobrad2)
Member
Joined: 2 years ago
Posts: 14
Topic starter  

@zander Ron, if I have some code that defines the x_pin for a joystick as input, what would be the equivalent pin on a rotary encoder that would accomplish the same input?

Thanks


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 8047
 

@banjobrad2 I just ordered some so have no experience, I would look at Bill's (DBWS) video/blog to see.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 8047
 

@banjobrad2 I think you mean output, a joystick has no electronic input, it translates human input to electronic output. I am unfamiliar with a joystick but can imagine it has a single terminal for X, an encoder is totally different. Maybe this article will help https://howtomechatronics.com/tutorials/arduino/rotary-encoder-works-use-arduino/

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
Inst-Tech reacted
ReplyQuote
(@davee)
Member
Joined: 4 years ago
Posts: 1947
 

Hi @banjobrad2,

  There is no 'universal' definition of the electrical interface of a joystick, but the most common is that of two potentiometers ... one in X direction and the other in the y direction. The circuit 'reading' each potentiometer position supplies a small voltage which is applied across the track of the pot, and the slider 'picks' off a fraction of the applied voltage, the voltage depending upon the position of the slider. Hence the input software will be measuring a voltage (from each pot).

The rotary converters are also provided with a small voltage, but the output consists of two possible voltage levels ... 0 and the applied voltage. Rotating the encoder knob causes the voltages levels to 'flip' and the resulting pulses can be converted into rotation signals.

These two interfaces are completely different and require differing software.

Best wishes,

Dave


   
Inst-Tech reacted
ReplyQuote
(@e-danil)
Member
Joined: 4 years ago
Posts: 18
 

To remove all these complications I would suggest you switch to a servo motor because it comes with its own feedback system. because you only need a stepper for precision like 3d printer

 

This post was modified 2 years ago by E.Danil

   
Inst-Tech reacted
ReplyQuote
Page 2 / 2