Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Quadrature Encoder Wiring to Digital Sidecar (http://www.chiefdelphi.com/forums/showthread.php?t=83700)

CrashOverride 27-02-2010 23:38

Quadrature Encoder Wiring to Digital Sidecar
 
I need help understanding the correct wiring scheme for the quadrature encoder from usdigital.

There are 4 leads:
1. +5
2. channel A
3. Gnd.
4. channel B

I have tried connecting +5 and ground to the spare +5 and ground connectors next to the digital inputs on the digital sidecar and each of the channels to the signal pin on a individual digital in port on the sidecar. I have tried connecting the ground pins on digital in ports to a common ground and leaving the ground on the digital in ports unconnected.

The results are fairly consistent: things will work for a few seconds then everything connected to the sidecar stops, the victors and jaguars LED starts to blink like the would if there was no PWM cable connected.

I haven't been able to find any documentation either on the FIRST site or on the usdigital site that specifically covers how to connect this encoder.

Ignorance is definitely not bliss today! Any help would be greatly appreciated.

Vikesrock 27-02-2010 23:48

Re: Quadrature Encoder Wiring to Digital Sidecar
 
The Labview Encoder Example has a picture of the wiring on the Front Panel.

Basically you want to use 1 full row of the Digital I/O on the Sidecar + 1 signal pin on an adjacent row. Wire +5 to the middle pin of the row, GND to outside pin (on the outside of the Sidecar), and Channel A to the inside pin of that row (Signal pin). Channel B should be wired to the Signal pin (inside pin) of an adjacent row.

Ken Streeter 28-02-2010 00:53

Re: Quadrature Encoder Wiring to Digital Sidecar
 
Quote:

Originally Posted by CrashOverride (Post 929621)
I need help understanding the correct wiring scheme for the quadrature encoder from usdigital.

There are 4 leads:
1. +5
2. channel A
3. Gnd.
4. channel B

We always hook up our USDigital Encoders as follows, using two PWM connectors to the GPIO pins on the digital sidecar:

+5 (orange) to the +5 pin of PWM connector #1
A (blue) to the signal pin on PWM connectore #1
Gnd (brown) to the ground pin of PWM connector #2
B (yellow) to the signal pin on PWM connector #2

Each PWM connector will then have one unconnected pin.

Place the two PWM cables into two GPIO inputs on the digital sidecar (make sure to connect them the right way round, with the signal pins in the appropriate spots). Then configure the software to recognize the encoder as being on those two GPIO pins.

Best regards,
--ken

Jon Stratis 01-03-2010 11:29

Re: Quadrature Encoder Wiring to Digital Sidecar
 
Crash -

Does the problem go away when the PWM headers for the encoder are not plugged in? If so, then it could indeed be a problem with the encoder or wiring (although it sounds correct to me).

Could this be a code issue? Have you checked the classmate to see if the watchdog is being fed, or if it reports everything as working correctly? Can you remove or disable any code you have for the encoders - does that fix the problem (indicating that the problem isn't with the encoders themselves, but with the code reading them)?

Can you enable the robot and let it sit without anything moving - does the problem still happen after a few seconds, or does it only happen after you start moving?

What does the robot signal light do once the sidecar stops responding (you can also look at the LED next to the 2-pin output for the signal light if you don't have one installed)?

CrashOverride 01-03-2010 13:16

Re: Quadrature Encoder Wiring to Digital Sidecar
 
Thanks for the help guys!

The problem turned out to be the digital sidecar.

This didn't occur to me because without the encoder the victors, jaguars and spikes worked fine. I assumed that we had not wired the encoder correctly.

The battery LED was not lit even though all power sources were correctly wired. We replaced the sidecar with one that had all three LED lit and everything worked perfectly as built.

Daniel_LaFleur 01-03-2010 14:57

Re: Quadrature Encoder Wiring to Digital Sidecar
 
Quote:

Originally Posted by CrashOverride (Post 930032)
Thanks for the help guys!

The problem turned out to be the digital sidecar.

This didn't occur to me because without the encoder the victors, jaguars and spikes worked fine. I assumed that we had not wired the encoder correctly.

The battery LED was not lit even though all power sources were correctly wired. We replaced the sidecar with one that had all three LED lit and everything worked perfectly as built.

Happy to hear that.

See y'all at BAE

LinuxArchitect 23-06-2010 15:19

Re: Quadrature Encoder Wiring to Digital Sidecar
 
I've connected two encoders and I can't seem to get either one to work, using my own code and the example code. I wired them up as suggested, +5/blue on one, gnd/yellow on the second pwm cable for each encoder. The dashboard shows one gpio of the four lit green, the other three are dark. I've tested the wiring with a multimeter and cables look ok. Any suggestions on how to troubleshoot this problem? Thanks in advance.

apalrd 23-06-2010 15:32

Re: Quadrature Encoder Wiring to Digital Sidecar
 
Try modifying the default code to update the dashboard every cycle instead of every 25th cycle.

I found an issue where, with the default dashboard code on the robot end, it updates the dashboard REALLY REALLY slowly. This can cause the illusion that something is not working when in reality it is just not up-to-date data.


All times are GMT -5. The time now is 04:17.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi