Part Number: EK-TM4C123GXL
Other Parts Discussed in Thread: TM4C123GH6PM
Hi,
I have an OMRON E6B2-CWZ1X quadrature encoder which I would like to connect to a EK-TM4C123GXL board but I don’t know which pins on the board should be used.
Thanks.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: EK-TM4C123GXL
Other Parts Discussed in Thread: TM4C123GH6PM
Hi,
I have an OMRON E6B2-CWZ1X quadrature encoder which I would like to connect to a EK-TM4C123GXL board but I don’t know which pins on the board should be used.
Thanks.
Hello William,
I don't have any expertise with that kind of external device and looking up the spec sheet doesn't show me any connections that I would assume should go to an MCU. Maybe if there is something specific you are trying to achieve and want to provide more details I might have a better idea but as it stands right now I do not have any guidance I can provide.
Also it seems the device operates at 5V, keep in mind the TM4C123x works at 3.3V (albeit with most GPIO being 5V tolerant) so interfacing these parts together would need to be done with care for the differences in voltage domains and you should be looking at how to step down that output as well.
Hi Ralph,
Thank you for your reply. I was aware of the 5V / 3.3V issue and think I need a voltage level adjuster (probably not the right terms) to avoid disaster. I am trying to read a spindle speed with the encoder and interface it to the TM4C and use the quadrature interface (it has two) to read the A and B signals. It has been done with similar TI chips, but it doesn’t seem that common and most people have had a bit of a struggle. But they have mostly succeeded in the end.
All the best
William
Hello William,
Okay the requirement to tie it to the QEI interface was the missing piece for me, sorry more of an MCU expert and didn't connect the dots on my end.
The connections you want for the QEI are listed the LaunchPad Pinout as PhA0/PhA1/PhB0/PhB1.
From what I see, these are PD6/PC5/PD7/PC6 respectively.
The Pinout for the headers can be found in Tables 2-3 through 2-6 in the User's Guide: https://www.ti.com/lit/ug/spmu296/spmu296.pdf
The QEI section of the datasheet provides further information on how the pins tie back to the peripheral: http://www.ti.com/lit/ds/symlink/tm4c123gh6pm.pdf Section 21 Quadrature Encoder Interface (QEI)
Out of the OMRON E6B2-CWZ1X you have Phase A, Phase B and Phase Z. You have two quadritrue encoder modules on the TM4C123GH6PM device. Pick 0 or 1. For module 0 you have two pin choices for each of the three inputs. See the table below. connect Phase A to PhAx, Phase B to PhBx and Phase Z to IDXx. (x = 0 or 1, depending on which module you pick).
Also from the data sheet here are the pins by port name:
As Ralph mentioned, these are 5V outputs from the encoder. I would add a current limiting resistor between the encoder signals and the TM4C123 pins.
Hi Ralph,
Wow that’s terrific. That gives me a great start. Thanks very much. I suspect there will be other questions en route as I’ve never done this before.
Thanks again
William
Greetings,
William Herschel said:I am trying to read a spindle speed with the encoder and interface it to the TM4C and use the quadrature interface
It is believed that Vendor agents have 'well answered.' Perhaps the addition of 'real world' - motor/power stage/noise management - may (additionally) guide/assist...
Depending upon the 'power level' and 'noise generated' (by both the spindle & driving/power stage) you are advised:
Via the 'forum search box' (up top) you may note the (this resolved) guidance I provided to a poster w/highly similar QEI/Motor requirement...
[edit] 10:32 CST - - beyond efficient/motivated, crack staff have quickly found that past (resolving) post - believed to provide 'key detail':
https://e2e.ti.com/support/microcontrollers/other/f/908/p/858407/3178608#3178608
Thank you for your advice and reference which I had already looked through earlier at some point.
My OMRON encoder has 6 wires. I think this means you can wire it as a differential encoder if you want to for long cable runs. I am guessing for a short cable run you only need three. I think I read the TM4c is 5V tolerant on the GPIO pins so it may connect to the OMRON and not object. Time will tell.
The OMRON E6B2-CWZ1X has six signal wires because you have the three signals (Phase A, Phase B and Phase Z-index) and the same three signals inverted. You can use either set because you can invert any of the three signals internally using bits in the QEICTL (quadrature encoder control) register.