Go to Post If the pattern holds, it's a bizarro year. - GeeTwo [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-04-2015, 18:22
TBots TBots is offline
Registered User
FRC #3350
 
Join Date: Sep 2014
Location: Texarkana
Posts: 39
TBots is an unknown quantity at this point
Connecting encoders

We are trying to make a swerve drive but have encountered difficulties with wiring and programming the encoders. We could really use some guidance in getting the encoders working if anyone has any ideas.

We have some older electronics since this is only prototyping. We are using a cRIO and talon motor controllers(not SRX), and several magnetic absolute encoder(MA3).

The encoders are meant to be able to detect the angle at which the wheels are turned, and change that angle when the joystick is triggered.

How do we connect the encoders to the cRIO? Is it analog or digital? And does anyone know the max voltage of the encoders? Is it 5? Is there a way to know?

Thank you for any help you can supply us with, this is our first time attempting something like this, and are still a bit lost on how to make it happen.

If it is relevant, we are using labVIEW.
  #2   Spotlight this post!  
Unread 07-04-2015, 18:36
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Connecting encoders

MA3's are generally analog in our FRC usage, although there are PWM output variations. Verify the model number and check the data sheet below.
They use 5v.
Check the data sheet for which wire is which. Colors may not be what you are accustomed to and the power/signal relative positions are reversed.

Read the data sheet for these types of details.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 07-04-2015 at 20:08.
  #3   Spotlight this post!  
Unread 08-04-2015, 16:10
TBots TBots is offline
Registered User
FRC #3350
 
Join Date: Sep 2014
Location: Texarkana
Posts: 39
TBots is an unknown quantity at this point
Re: Connecting encoders

I just found out they are 10-bit analog. How do we connect these to the analog breakout bored on the cRIO?
  #4   Spotlight this post!  
Unread 08-04-2015, 16:24
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Connecting encoders

Quote:
Originally Posted by TBots View Post
I just found out they are 10-bit analog. How do we connect these to the analog breakout bored on the cRIO?
The cable that plugs in to the MA3-A10 connector has three wires. #1 is "5" and goes to 5v power (the center pin) on an Analog Input channel. #2 is "A" and goes to the SIG pin. #3 is "G" and goes to the - (ground) pin.

This is according to the US Digital data sheet.
  #5   Spotlight this post!  
Unread 08-04-2015, 17:39
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Connecting encoders

10-bit just refers to the resolution you can expect on the analog input.
It doesn't have anything to do with how it gets physically connected.

0-5 voltage range of possible values (nominal on a cRIO)
10-bit = 1024 discrete possible translations of those voltage values

So 5v/1024 = .00488 volts per position, is the resolution that your code will receive from that analog input.
or 360 degrees/1024 = .35 degrees per tick is another way to look at 10-bit resolution.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-04-2015 at 17:46.
  #6   Spotlight this post!  
Unread 10-04-2015, 16:03
TBots TBots is offline
Registered User
FRC #3350
 
Join Date: Sep 2014
Location: Texarkana
Posts: 39
TBots is an unknown quantity at this point
Re: Connecting encoders

So for programming the encoder, would I still use the get voltage vi?

I heard the programming is different from a PWM encoder.
  #7   Spotlight this post!  
Unread 10-04-2015, 22:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Connecting encoders

An MA3 looks and acts like a potentiometer, so use an Analog Input Get Voltage.
Because it's a digital sensor masquerading as an analog sensor, I'd avoid using averaging or normalizing.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Closed Thread


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 21:25.

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