Hi all guys,
i've bought the E6B2-CWZ3E (Rotary Encoder - 1024 P/R (Quadrature) - COM-11102 - SparkFun Electronics) and i don't know how to connect the Encoder to my Arduino Mega (too much wires... 6) :o
Can you help me? I can't find examples for code and connection on Google
If you look at the Sparkfun product page which you linked, there is a picture of the label describing the wire colors and what they are. Smeld is obviously the braided shield. What part of this do you not understand?
sorry for the long time passed.
The problem is related to normal arduino connection (sorry but the cheatsheet is a little bit hard to understand)
This is the detailed connection wiring:
Brown -> 5V of Arduino Mega 2560
Blue -> ??? I don't know
Shield -> ??? I don't know
Black -> Digital 5
White -> Digital 6
Orange -> I don't know because i can't find a script that uses Z
Can you help me? I need to use resistors before the input to Digital In?
Blue and Shield go the ground. Connect orange to an unused digital pin, until you figure out it you want to do anything with it. I can't see the data sheet very well but it looks like it give one long pulse equal to the length of one quadrature cycle.
I need to use resistors before the input to Digital In?
The way I read the data sheet is that the output pulse will be determined by the input voltage (5-12V), and since you are using 5v on the brown, you can take the A/B signals direct to a digital 5/6.
Many thanks, it works! ;D