Go to Post STEM blushes, and asks if Art would like to go out for a date. - Cothron Theiss [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 01-11-2013, 11:55
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Encoders Programming

You haven't yet posted how you wired it or taken any pictures, per Ether's request.
Reply With Quote
  #17   Spotlight this post!  
Unread 01-11-2013, 14:00
TenaciousDrones's Avatar
TenaciousDrones TenaciousDrones is offline
FRC Team 4780
FRC #4780 (The Tenacious Drones)
 
Join Date: Sep 2013
Rookie Year: 2012
Location: Parma, Ohio
Posts: 57
TenaciousDrones is an unknown quantity at this point
Re: Encoders Programming

So I have the two bare red wires to one of the grounds and the other to csn and soldered to the black which is connected to the other ground. I also have the blues connected to channel a and the yellow to channel b and red to 5v. the red and blue are in dio 1 and yellow and black are connected to dio 2.
Attached Files
File Type: zip attachments.zip (4.24 MB, 12 views)
Reply With Quote
  #18   Spotlight this post!  
Unread 04-11-2013, 13:45
Domenic Rodriguez's Avatar
Domenic Rodriguez Domenic Rodriguez is offline
Registered User
FRC #0316 (LuNaTeCs)
Team Role: College Student
 
Join Date: Sep 2010
Rookie Year: 2011
Location: Grove City, PA
Posts: 213
Domenic Rodriguez has a spectacular aura aboutDomenic Rodriguez has a spectacular aura aboutDomenic Rodriguez has a spectacular aura about
Re: Encoders Programming

I found another thread related to the magnetic encoders. You might want to look through it if you haven't already: http://www.chiefdelphi.com/forums/sh...d.php?t=111202

Also, here's the non FIRST-specific data sheet for the sensor: http://www.ams.com/eng/content/downl...heet_v1-15.pdf

Unfortunately I can't see the wiring very well from the pictures provided, so I won't be of much help there. It seems the sensor has two modes of output: absolute position, and quadrature output. For you usage, you need to make sure you wire it for quadrature output. Here's the wiring:

Quote:
Originally Posted by Screen Steps Live
To wire the sensor to the FRC Control System, the following connections must be made:
  1. The pin labeled 5V on the sensor should be connected to a 5V (labeled "PWR") pin of the Digital Sidecar Digital I/O bank
  2. The 2 pins labeled GND should be connected to a ground pin (labeled "(-)") on the Digital Sidecar.
  3. The pins A and B should be connected to separate signal pins (labeled "SIG") on the Digital Sidecar.
  4. The pin CSn should be connected to a ground pin on the Digital Sidecar (for a description of the purpose of this pin, see "Incremental Power-up Lock Option" on Page 15 of the datasheet
Source. Attached is a sketch of what (I believe) the wiring should look like.
Attached Thumbnails
Click image for larger version

Name:	Wiring.png
Views:	21
Size:	46.0 KB
ID:	15395  
__________________

LuNaTeCs - Learning Under Nurturing Adults Teaching Engineering Concepts and Skills - Small and Mighty!

FRC 316 LuNaTeCs - Student (2011-2014), Lead Programmer (2011-2014), Team Captain (2013-2014), Operator (2013), Drive Coach (2014), Mentor (2015-????)
'11 Philly Regional Finalists, '13 Chestnut Hill Finalists, '13 Lenape Champions, '13 Archimedes Division, '14 Chestnut Hill Champions, '14 Lenape Champions
FTC 7071 EngiNerds - Founding Advisor (2013-2014) | FRC 5420 Velocity - Founding Advisor (2015)
Grove City College Class of '18, Electrical/Computer Engineering (B.S.E.E)

Reply With Quote
  #19   Spotlight this post!  
Unread 04-11-2013, 13:59
TenaciousDrones's Avatar
TenaciousDrones TenaciousDrones is offline
FRC Team 4780
FRC #4780 (The Tenacious Drones)
 
Join Date: Sep 2013
Rookie Year: 2012
Location: Parma, Ohio
Posts: 57
TenaciousDrones is an unknown quantity at this point
Re: Encoders Programming

yep thats exactly how it is wired
Reply With Quote
  #20   Spotlight this post!  
Unread 04-11-2013, 14:39
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Encoders Programming

Quote:
Originally Posted by DomenicR View Post
Unfortunately I can't see the wiring very well from the pictures provided
^ditto that.

What part number magnet are you using?


Reply With Quote
  #21   Spotlight this post!  
Unread 04-11-2013, 14:56
Domenic Rodriguez's Avatar
Domenic Rodriguez Domenic Rodriguez is offline
Registered User
FRC #0316 (LuNaTeCs)
Team Role: College Student
 
Join Date: Sep 2010
Rookie Year: 2011
Location: Grove City, PA
Posts: 213
Domenic Rodriguez has a spectacular aura aboutDomenic Rodriguez has a spectacular aura aboutDomenic Rodriguez has a spectacular aura about
Re: Encoders Programming

Here are some other things to consider:

Are both encoders giving you identical output? It might be easier to look at the output using System.out.println() rather than SmartDashboard. The output goes to the console in NetBeans, and from my experience is more useful for debugging.

Are you calling Encoder#start() more than once for the encoders? You should only need to call it once at the beginning of the program, unless you stop counting with Encoder#stop(). I don't know if this would cause the encoder count to reset though.

Have you checked for hardware defects? Ensure that there is nothing wrong with your digital sidecar and cables. As Joe Ross mentioned earlier, the problem you described is often because only one channel of the encoder is being read.

Does your team have any other encoders, such as the US Digital E4P? You could try swapping one out temporarily to see if it behaves any differently. This would help identify it as a hardware or a software issue.
__________________

LuNaTeCs - Learning Under Nurturing Adults Teaching Engineering Concepts and Skills - Small and Mighty!

FRC 316 LuNaTeCs - Student (2011-2014), Lead Programmer (2011-2014), Team Captain (2013-2014), Operator (2013), Drive Coach (2014), Mentor (2015-????)
'11 Philly Regional Finalists, '13 Chestnut Hill Finalists, '13 Lenape Champions, '13 Archimedes Division, '14 Chestnut Hill Champions, '14 Lenape Champions
FTC 7071 EngiNerds - Founding Advisor (2013-2014) | FRC 5420 Velocity - Founding Advisor (2015)
Grove City College Class of '18, Electrical/Computer Engineering (B.S.E.E)

Reply With Quote
  #22   Spotlight this post!  
Unread 04-11-2013, 16:55
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: Encoders Programming

You may want to consider setting up a couple of DigitalInputs in code and read/println the two encoder inputs while slowly spinning the shaft by hand: you should be able to see the inputs toggle. That would tell you if it's wiring (or wrong/bad input) or problems setting up the Counter class....
Reply With Quote
  #23   Spotlight this post!  
Unread 14-11-2013, 17:18
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Encoders Programming

Quote:
Originally Posted by TenaciousDrones View Post
Hello my name is David and I'm tge lead programmer for FRC Team 4780 and I was wondering if anyone could tell me how to programm the 2013 KOP quadrature encoders.
Hi David. You haven't posted in 10 days. Did you ever get your problem solved? Please tell us about it.



Last edited by Ether : 14-11-2013 at 18:30.
Reply With Quote
  #24   Spotlight this post!  
Unread 16-12-2013, 13:57
TenaciousDrones's Avatar
TenaciousDrones TenaciousDrones is offline
FRC Team 4780
FRC #4780 (The Tenacious Drones)
 
Join Date: Sep 2013
Rookie Year: 2012
Location: Parma, Ohio
Posts: 57
TenaciousDrones is an unknown quantity at this point
Re: Encoders Programming

I still haven't figured out the encoder resetting problem sadly. I had about 2 months of just thinking about it while I worked on the Safety Animation but the program I came up with inevitably failed. I might just end up going through and yanking everything because the only thing I can think of is it's a wiring problem.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 13:03.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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