Connect a 9v powered optical encoder to a teensy 3.2 ?

Status
Not open for further replies.
The linked datasheet does not say what the output voltage is. At any rate you must not exceed the voltage tolerance of the specific pins you are using on your Teensy 3.2.

"All digital pins are 5 volt tolerant on Teensy 3.2 & 3.1. However, the analog-only pins (A10-A14), AREF, Program and Reset are 3.3V only."
-from https://www.pjrc.com/teensy/teensy31.html

If your device has any chance of delivering anything above 5.0 V (or 3.3V if you use those pins) then you need to add circuitry to reduce the voltage. A resistive divider might be the easiest.
 
The datasheet clearly states that the outputs are open collector and will not output any voltage without a pull-up resistor.
You can safely power your encoder with 9V, connect the each output to it's teensy pin and for each output add a pull-up resistor to 3.3V.
 
Yeah! Many thanks to both of you.
I didn't saw that info about 3.3v max on analog pin and I realise I had my potentiometers wired with 5v to analog. However, this didn't fried my board but it explains why I reached the max value before going all the way on my potentiometers. One problem solved :)

About the encoder, would the internal pull-ups do the job or do I need to add some?
 
About the encoder, would the internal pull-ups do the job or do I need to add some?
The internal pull-ups are probably too weak for the job, so add external pull-ups. I usually use 10k resistors for mechanical encoders which are meant to be turned by hand. In your case something between 1k and 4k7 should do the job. The lower the resistance or the stronger the pull-up, the cleaner the signal will be.
 
Yeah! It worked like a charm. I just had to connect the 9V Gnd and the 5v Gnd for this to work.

Thanks again, I can now go further in my project! :)
 
Status
Not open for further replies.
Back
Top