I am going to connect a motor with a rotary encoder to an ESP32 Soc on my custom pcb. In most websites the voltage rating for the encoder is given as 5V. Does the ESP input pins accept 5V? I think they do not but I am not sure. And the question is will the encoder run on 3.3 V?
Which "rotary encoder"?
Many simply quadrature encoders are simply switches, so don't care if they're operated from 5 or 3.3V
The one attached to this one
The encoder data sheet linked is linked in what your posted.
https://robu.in/wp-content/uploads/2015/10/HEDS5540-OpticalEncoder-2.pdf
It would indicate that it is a 5v device. It may relate to the electronics required for the light sources, sensors and output signal generating.
You can use a level shifter between the encoder and the ESP32.
You may want to try running the encoder with 3.3v as I don't think you can damage it with lower than specified voltage.
Thanks, I will try it after I have bought one, but a confirmation was really helpful.
The product-page of the motor with encoder says
" This is the popular DC Geared Motor featuring an additional magnetic quadrature type rotary encoder. The quadrature encoders provide two pulses which are out of phase, for sensing the direction of the shaft rotation."
Features :
- It equips 5V Quadrature Hall Effect Encoder.
If you apply 5V to an IO-pin of an ESP32 the ESP32 will be damaged.
the same online-shop has 3.3V/5V voltage-level-shifters
best regards Stefan
If the encoder is a 5volt device, then it still may have open collector/drain outputs.
An image on the link of @cattledog confirms that (encoder needs pull up resistors).
In that case you power the encoder from 5volt, and pull up the outputs to 3.3volt.
Leo..
Thanks everyone
I don't know if anyone will read this, but I just received the OE-37 encoders, and there seems to be no voltage regulator on the IC, and the datasheet states a 5V supply, So i thought 3.3 V wont work. But some how, when the input is 3.3V, the encoder gives readings successfully. So 3.3V does work.
You should do two kinds of tests
- an endurance test rotating the motor for a long time checking if encoder-pulses are cerated all the time
- a low voltage test: how far can you go down with the supply-voltage = going down even below 3.3V until encoder-pulse-creation becomes unreliable
Thanks, I already tried the long term test and signals are stable even after an hour, although the motors get warm, and about going lower that 3.3V, I will try it soon.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.