Mesa 7i92 Encoder wiring

More
09 Aug 2019 13:02 #141764 by Ralfh
Hi,
Quick introduction: i'm from germany, student and i like to tinker with DIY-CNCs.
I'm in the process of switching to Linuxcnc. I bought a 7i92 and some cheap Encoders with 600ppr, A and B (no Index) and a open collector output.
Everything seems to work fine:
  • built a custom 7i92 bitfile, the pins are assigned correctly and the jumpers are on default, motors are turning nicely
  • i mapped the encoder A to IO17 and B to IO18
  • i get a signal in halshow on IO17 and IO18 pins if i apply 5V
  • i get a 5V output signal of the encoder using a pullup (10k) without connecting it to the 7i92

Here is my problem:
I can't get a signal in Linuxcnc if i connect the encoder to the 7i92.
  • if i don't use a external pullup i measure 48V on the Pin (????)
  • if i use a external pullup i measure 0V

A few questions i couldn't find in the 7i92 manual:
  • how much current does the input of the 7i92 has to get to detect a signal? my pullup may be too big..
  • do i have to activate the internal pullups to function? i guessed Jumper W1 is responsible

I hope someone can help. I will try a few different pullups, maybe i'm lucky and find a right one ( i don't have a spare potentiometer to try, this will take some time :laugh: )

Please Log in or Create an account to join the conversation.

More
09 Aug 2019 13:12 #141769 by tommylight
Replied by tommylight on topic Mesa 7i92 Encoder wiring
Since they are FPGA pins i would assume there is very little current needed to be detected.
There should also be no need for pullups as the 7i92 will have all pins high when it is powered on untill linuxcnc starts and there are hal entries commanding it to bring them low.
The main thing to check is there should be entries in hal to tell the pins what they are supposed to do, like gpio018_is_input etc.
Also check what is assigned to what pin, with mesaflash.

Please Log in or Create an account to join the conversation.

More
09 Aug 2019 13:50 #141776 by PCW
Replied by PCW on topic Mesa 7i92 Encoder wiring
7I92 inputs have 4.7K pullups and if the 7I92 is set for 5V tolerance
the inputs will have the pullup resistor common connected to +5V
So the pullup current is ~1 ma ( page 14 in the 7I92 manual )

I hope you mean you measured 4.8V, not 48V...

Pins that are inputs or disabled output functions (Stepgens etc)
should be high (5V) if unconnected so can be checked by grounding

When testing, make sure that you ground to the 7I92 ground, _NOT_
frame grounds or other system grounds as its easy to damage the
Busswitch protection diodes with inputs more negative than -0.6V
if there is no current limiting. (and its very common to have
HF AC ground differences of more than 0.6V where Step/Servo/VFD drives
are present)

Please Log in or Create an account to join the conversation.

More
09 Aug 2019 13:53 #141777 by Ralfh
Replied by Ralfh on topic Mesa 7i92 Encoder wiring
Seriously, i measured 48,3V and was very confused. I could verify that the Input is still working by applying 5V, halshow showed it correctly.

I got my .hal with pncconf (attached), readhmid should be ok:

IO Connections for P2
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 1      0   IOPort       PWM              0        PWM             (Out)
14      1   IOPort       None           
 2      2   IOPort       StepGen          0        Step/Table1     (Out)
15      3   IOPort       None           
 3      4   IOPort       StepGen          0        Dir/Table2      (Out)
16      5   IOPort       StepGen          4        Step/Table1     (Out)
 4      6   IOPort       StepGen          1        Step/Table1     (Out)
17      7   IOPort       StepGen          4        Dir/Table2      (Out)
 5      8   IOPort       StepGen          1        Dir/Table2      (Out)
 6      9   IOPort       StepGen          2        Step/Table1     (Out)
 7     10   IOPort       StepGen          2        Dir/Table2      (Out)
 8     11   IOPort       StepGen          3        Step/Table1     (Out)
 9     12   IOPort       StepGen          3        Dir/Table2      (Out)
10     13   IOPort       None           
11     14   IOPort       None           
12     15   IOPort       None           
13     16   IOPort       None           

IO Connections for P1
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 1     17   IOPort       QCount           0        Quad-A          (In)
14     18   IOPort       QCount           0        Quad-B          (In)
 2     19   IOPort       QCount           0        Quad-IDX        (In)
15     20   IOPort       QCount           1        Quad-A          (In)
 3     21   IOPort       QCount           1        Quad-B          (In)
16     22   IOPort       QCount           1        Quad-IDX        (In)
 4     23   IOPort       QCount           2        Quad-A          (In)
17     24   IOPort       QCount           2        Quad-B          (In)
 5     25   IOPort       QCount           2        Quad-IDX        (In)
 6     26   IOPort       QCount           3        Quad-A          (In)
 7     27   IOPort       QCount           3        Quad-B          (In)
 8     28   IOPort       QCount           3        Quad-IDX        (In)
 9     29   IOPort       None           
10     30   IOPort       None           
11     31   IOPort       None           
12     32   IOPort       None           
13     33   IOPort       None
Attachments:

Please Log in or Create an account to join the conversation.

More
09 Aug 2019 14:09 #141780 by PCW
Replied by PCW on topic Mesa 7i92 Encoder wiring
You should never have to apply 5V to an input for it to be detected as high.
Inputs should always be high if not driven by the FPGA or external sources

If you simply power a 7I92 (no LinuxCNC no connections)
and measure all the I/O pins, they should all be high, if not,
the card has been damaged

(which does unfortunately sound likely if you have 48V anywhere near the 7I92 card)

Please Log in or Create an account to join the conversation.

More
09 Aug 2019 15:43 #141786 by Ralfh
Replied by Ralfh on topic Mesa 7i92 Encoder wiring
Nice, the 5V are still present on 15 pins. A few are broken but I could finally test the encoder. Thanks for the help!

I might have broken these pins while I wired the encoder up but didn’t power down the encoder PSU..

If I connect everything i need I still have about 5 pins left. It’s not dramatic. I just feel dumb breaking something before even using it

Please Log in or Create an account to join the conversation.

More
09 Aug 2019 15:52 #141788 by PCW
Replied by PCW on topic Mesa 7i92 Encoder wiring
When testing hardware connected to bare FPGA pins, one really important thing is to
make sure that there is a common ground connected first. This is especially important when you have floating power supplies like cell phone chargers etc that have no earth ground. These can have a 100V or more potential voltage if you measure to earth ground (basically Leakage current but with enough capacitance to ground to damage IC inputs)

Please Log in or Create an account to join the conversation.

More
10 Aug 2019 09:09 #141858 by Ralfh
Replied by Ralfh on topic Mesa 7i92 Encoder wiring
So, i built a new .BIT with alternative pins:
IO Connections for P2
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 1      0   IOPort       PWM              0        PWM             (Out)
14      1   IOPort       None           
 2      2   IOPort       StepGen          0        Step/Table1     (Out)
15      3   IOPort       None           
 3      4   IOPort       StepGen          0        Dir/Table2      (Out)
16      5   IOPort       StepGen          4        Step/Table1     (Out)
 4      6   IOPort       StepGen          1        Step/Table1     (Out)
17      7   IOPort       StepGen          4        Dir/Table2      (Out)
 5      8   IOPort       StepGen          1        Dir/Table2      (Out)
 6      9   IOPort       StepGen          2        Step/Table1     (Out)
 7     10   IOPort       StepGen          2        Dir/Table2      (Out)
 8     11   IOPort       StepGen          3        Step/Table1     (Out)
 9     12   IOPort       StepGen          3        Dir/Table2      (Out)
10     13   IOPort       None           
11     14   IOPort       None           
12     15   IOPort       None           
13     16   IOPort       None           

IO Connections for P1
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 1     17   IOPort       None           
14     18   IOPort       None           
 2     19   IOPort       None           
15     20   IOPort       None           
 3     21   IOPort       QCount           0        Quad-A          (In)
16     22   IOPort       None           
 4     23   IOPort       QCount           0        Quad-B          (In)
17     24   IOPort       None           
 5     25   IOPort       QCount           0        Quad-IDX        (In)
 6     26   IOPort       QCount           1        Quad-A          (In)
 7     27   IOPort       QCount           1        Quad-B          (In)
 8     28   IOPort       QCount           1        Quad-IDX        (In)
 9     29   IOPort       QCount           2        Quad-A          (In)
10     30   IOPort       QCount           2        Quad-B          (In)
11     31   IOPort       QCount           2        Quad-IDX        (In)
12     32   IOPort       None           
13     33   IOPort       None

i verified and attached the .bit if someone wants to use it.

File Attachment:

File Name: 7i92ralfh.bit.tar
File Size:350 KB
You can sudo-copy the .xml to /lib/firmwares/hm2/ to create your .hal with pncconf.

File Attachment:

File Name: ralfh7i92.xml
File Size:9 KB


Also i found out how i bricked the pins. I got a Breakoutboard to connect wires to the DB25 connector via screw terminals. I connected all the GND wires on the Terminal "GND", but with the flat cable connection to the mesa board this screw terminal is NOT connected. I should have known that, since i crimped the cable. i will wire a cable to a functioning ground to never make that mistake again.
Attachments:
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Time to create page: 0.085 seconds
Powered by Kunena Forum