![]() |
Re: Encoder Wiring Help Needed
Quote:
Quote:
Quote:
|
Re: Encoder Wiring Help Needed
Are you supposed to wire the encoders to the sidecar or the Analog Breakout?
|
Re: Encoder Wiring Help Needed
Quote:
|
Re: Encoder Wiring Help Needed
I'm on the same team as gnichols.
The encoder is wired into 2 digital I/O ports on the digital sidecar, with careful attention made to plugging in gnd and signal to one port and 5v and signal to other port. The hardware connection is correct. With the encoder wired, when the code is enabled, and in teleop mode, the motors start to run, with no joystick input. With the encoder unplugged, everything works as expected, with no movement until the joystick is moved. We are using C++ and this happens even when deploying the FRC Default Program (current with imaging tool), which when loaded into workbench is titled BuiltinDefaultCode. That code does not explicitly reference digital input ports or the encoder classes at all, neither does the custom code we have created when first discovering this problem. One other problem we are having is that the signal light we have connected to the digital sidecar is not lighting, though the small led on the sidecar next to the DSL port is lighting. What voltage should we see there? |
Re: Encoder Wiring Help Needed
We are also having encoder issues. We have the E4P wired as described in the previous posts (2 digital IO ports using PWM cables - one has signal A, +5, GND and the other signal B). I've checked the output with a multimeter - the +5 and GND are good (the red light on the encoder is on) and when I slightly move the wheel I can see the A and B channels vary from 0 to 5v. When the motor is moving the voltage of the A and B channels is 2.5-2.6v. In the software, we create an Encoder - assign the ports in the constructor, but when we output distance, rate, or raw when motor is moving we get 0 for all. I triple checked the port numbers (tried 1,2 and 7,8) but no joy.
One thing I wonder about... is that the our motor shaft is slightly less than 1/4" so we had to crimp the encoder wheel slightly. I wobbles ever so slightly when the motor turns. Could this be it? |
Re: Encoder Wiring Help Needed
Quote:
Are the BAT, 5V, and 6V LEDs lit? |
Re: Encoder Wiring Help Needed
Quote:
|
Re: Encoder Wiring Help Needed
I'm going out on a limb here, but have you guys (gnichols, alb4h) checked your DB37 cable assembly as per FIRST's directions?
If the problem persists, I would suggest posting copies of your code and pictures of the relevant connections so it's easier to isolate the problem. |
Re: Encoder Wiring Help Needed
hello all,
my team (1325) is still unsure as to the wiring of our E4p encoders if anyone could supply a diagram that would be great! Thank You |
Re: Encoder Wiring Help Needed
Quote:
In short, connect encoder common, power, and output A to (-), +5, and signal of one DIO on the Digital Sidecar. Connect encoder output B to the signal of another DIO. |
Re: Encoder Wiring Help Needed
Quote:
Fixed the problem... you need to call encoder.start() before you get any readings. Also, the disk does wobble slightly but it's well within the tolerance of the optical reader. Another poster did suggest a better idea of using paper or plastic shims, but crimping the wheel (ever so slightly) was actually on the manufacturers instructions. We are reading motor turns - yeah! |
| All times are GMT -5. The time now is 05:45. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi