Hello everyone, could help me, I have 4 Encoder ALPS EC18A with a resolution of 16 steps, follow Datasheet http://www.alps.com/prod/info/E/PDF/Switch/Encoder/EC18A/EC18A.PDF, and they will be used on a project where two encoders will be installed in a Radio (using nRF24L01) and the other 2 encoders are coupled to two stepper motors.
The system works as follows, reads the position of the encoder on the radio and then the data is transmitted and received, then the stepper motors will be moved to the same radio positioning equals the positioning of coupled encoders to stepper motors .
The encoders on the radio were to make reading independently!
I could develop a code with incremental encoders, more to use these, you would have to put a limit switch key which would make the project ...
Controle Motor de Passo usando Encoder e Motor DC com Potenciômetro no Arduíno Uno - YouTube
Did you a question?
I need to read the encoder on the Arduino and have no reference for absolute encoders !
OK, so those are Gray Code encoders (as they should be). You require four inputs each. I would recommend using 8-bit parallel-in-serial-out shift registers - specifically the 74HC165 - to read two of them each, using only 3 port pins of the Arduino (for as many inputs as you need).
The common of the encoder should be grounded; each of the A,B,C,D outputs needs a pull-up resistor to 5V and connects to an input of the shift register. You read the shift register by first briefly strobing the latch input low then high again, then clocking it eight times for each register and reading the bits as they are shifted out.
Your use of a servo consisting of a stepper motor and another encoder to drive your output selectors is - interesting! ![]()
Basically you read the values on the encoders outputs to make a four bit number. You then use that number as the index into an array. The array contents are the position of the shaft as a number 0 to 15 or 0 to 360 as you want. This is known as a look up table.
Paul is only describing the way you can get these readings into the Arduino.
Good evening everyone ... this is the code I'm using in the project using absolute encoder , then I will use this code in the rest of the code where the stepper motor is controlled, tramsissão via radio and more control of two DC motors ! !!
Could someone help me in conditions where the reading of the bits will be converted into degrees to position the stepper motor !!!
Read the rules.
Post the code correctly.