Go to Post GP may not be as common as we would like out in the "real world" but Ladies and Gentlemen it is out there. - Jay H 237 [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 13-02-2012, 20:44
cooltext cooltext is offline
Registered User
FRC #0835
 
Join Date: Jan 2012
Location: Michigan
Posts: 32
cooltext is an unknown quantity at this point
Encoder wiring

So I have the AS5030 8-bit Programmable Magnetic Rotary Encoder but I don't know how to wire it. When I am coding (in java) it requires 2 channels, but the board that we got only has one 3 prong connector coming out, does anyone know how to wire this?
  #2   Spotlight this post!  
Unread 13-02-2012, 21:20
Taylor Hawkins Taylor Hawkins is offline
2386 BCHS Trojans
FRC #2386 (Trojans)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Burlington Ontario Canada
Posts: 29
Taylor Hawkins is an unknown quantity at this point
Re: Encoder wiring

Are you using the Encoders that go on the shafts of the Cimple Gearboxes that came in the kit? If so this is what we did, if Not were using different encoders.


There are 4 wires coming from the encoder. +5v, ground, and signal A and signal B.

These are all wired to the Digital I/O of the digital sidecar. The 2 signal wires will go into separate ports in the digital sidecar.

Last edited by Taylor Hawkins : 13-02-2012 at 21:22. Reason: add
  #3   Spotlight this post!  
Unread 13-02-2012, 22:21
cooltext cooltext is offline
Registered User
FRC #0835
 
Join Date: Jan 2012
Location: Michigan
Posts: 32
cooltext is an unknown quantity at this point
Re: Encoder wiring

No, we are using the demo board that comes with the AS5030 8-bit Programmable Magnetic Rotary Encoder. I am looking on how to wire the two output channels

thanks
  #4   Spotlight this post!  
Unread 13-02-2012, 22:30
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: Encoder wiring

According to this documentation http://www.usfirst.org/uploadedFiles...ual%20Rev1.pdf

there is only one signal wire used according to page four when outputting a PWM or analog value. Two wire is DIO, CLK. The encoder in the WPIlib is meant specifically for thr E4P optical encoder since that one needs two signal wires as a quadrature encoder.

Last edited by MagiChau : 13-02-2012 at 22:32.
  #5   Spotlight this post!  
Unread 13-02-2012, 22:34
cooltext cooltext is offline
Registered User
FRC #0835
 
Join Date: Jan 2012
Location: Michigan
Posts: 32
cooltext is an unknown quantity at this point
Re: Encoder wiring

So how could I use this encoder in a PID loop(we are using java, but any language should be okay). We are try to track the RPMs of a spinning axle.

thanks
  #6   Spotlight this post!  
Unread 13-02-2012, 22:42
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: Encoder wiring

Read the documentation I have linked to. This encoder relies on a magnet mounted to a rotating shaft being really close to it (0.5mm to 2.0mm) so I am not sure if you can even properly set this up depending on what is available. The code itself depends on which signal type you wish to use.
  #7   Spotlight this post!  
Unread 13-02-2012, 22:47
cooltext cooltext is offline
Registered User
FRC #0835
 
Join Date: Jan 2012
Location: Michigan
Posts: 32
cooltext is an unknown quantity at this point
Re: Encoder wiring

I read the documentation. Could you go into detail on how to program the encoder into a PID loop. Right now I have it as an AnalogChannel, but I don't know how to get the rate from that. How do I get rate, like rpms?

thanks

Last edited by cooltext : 13-02-2012 at 22:51.
  #8   Spotlight this post!  
Unread 13-02-2012, 22:56
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: Encoder wiring

I am not experienced with these encoders so I cannot help you that much. According to the documentation you would have to be able to count every time the voltage changes from 5V to 0V or vice versa (full rotation.) Rate if I am thinking correctly would be change in counts (since last count measurement) divided by time (since last count measurement) for this encoder not accounting for error. There is a thread dedicated to Speed based PID Control Loops if you search for it.
  #9   Spotlight this post!  
Unread 13-02-2012, 23:58
slijin's Avatar
slijin slijin is offline
Pockets
AKA: Samuel Lijin
FRC #0694 (StuyPulse)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York City
Posts: 537
slijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to behold
Re: Encoder wiring

Quote:
Originally Posted by MagiChau View Post
The encoder in the WPIlib is meant specifically for thr E4P optical encoder since that one needs two signal wires as a quadrature encoder.
Partially right, partially wrong. The WPIlib Encoder class is designed to handle any quadrature encoder; the E4P is just standard to use in FRC due to USDigital's sponsorship.

You might be able to use the gear tooth counter class for this encoder.
__________________

2010-12 CT Chairman's
2011 Galileo 5th seed
2010 NY Regional Winners

Last edited by slijin : 14-02-2012 at 00:01.
  #10   Spotlight this post!  
Unread 14-02-2012, 19:56
cooltext cooltext is offline
Registered User
FRC #0835
 
Join Date: Jan 2012
Location: Michigan
Posts: 32
cooltext is an unknown quantity at this point
Re: Encoder wiring

How do I wire the AS5030 encoder for high rpm uses, like 4000 rpms?
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 11:09.

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