CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Encoder Test

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
magnus



Joined: 09 May 2013
Posts: 15

View user's profile Send private message

Encoder Test
PostPosted: Mon Jun 10, 2013 5:58 am     Reply with quote

Hello Guys!!!
Does anybody know a circuit, program, equipment or example of six channels encoder test???
I need do the test of A, B, Z and A' B' and Z' and set any digital output or relay... If someone knows some reliable system and can help I thank! :D
temtronic



Joined: 01 Jul 2010
Posts: 9246
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Jun 10, 2013 6:10 am     Reply with quote

mfr/make/model of encoder ?
output signals ttl,oc,?
counts per revolution ?24,100,4000?

IF TTL output,just feed into a PIC all 6 signals,create a state machine.
There are several examples here in this forum(maybe more in the code library ?).

Start with the A,B outputs then add Z, then the completments...


hth
jay
magnus



Joined: 09 May 2013
Posts: 15

View user's profile Send private message

PostPosted: Mon Jun 10, 2013 6:40 am     Reply with quote

It's Dynapar HS 35 incremental encoder
5V - 1024 ppr
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon Jun 10, 2013 9:25 am     Reply with quote

if I intended to operate one to six of these
i would use significant CMOS logic to simplify the PIC interface.

And that is to even have a prayer of it working right at all!

by which i mean:
6 copies of an 8 bit wide / Up down counter - such that the pic could
enable a given tristate counter output to say the D port bus of a pic,
while tracking the Up/not_down state of the encoder on a 9th ,multiplexed pin.

then the pic management gets easier.

however the PIC processing of this data and what actions you take with it- constitutes a whole other matter

IMHO - an un-augmented pic is not going to have the OOMPH to do much , especially if that encoder is spinning FAST
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Mon Jun 10, 2013 9:40 am     Reply with quote

You are over complicating.....

The encoder uses just two signals. A and B. The A' and B' signals are the complements, used if you want to use differential connections to reduce noise. So you feed A, and A' into a differential receiver, to generate the 'A' signal you count. The A & B signals are standard quadrature signals. Then 'Z' is just a pulse to mark the zero position. Again this is available as a differential signal.

Ideally use one of the PIC's that has quadrature decoders built in, and the Z is then fed to the interrupt to zero the encoder count. Alternatively, given the number you want to use, Texas do a very nice quadrature counter, which you can read with the PIC.

Best Wishes
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

ENCODERS ??
PostPosted: Mon Jun 10, 2013 10:00 am     Reply with quote

You refer to the TMS320F2xxx family??

and YES- a great part admittedly -
and highly integrated too-
but an awfully complex part, as well- IMHO -

Very Happy Very Happy

then again - without further info from the O.P.
is hard to know what approach is either hard or ez in this case.

dp
magnus



Joined: 09 May 2013
Posts: 15

View user's profile Send private message

PostPosted: Mon Jun 10, 2013 10:42 am     Reply with quote

Thanks all!
Very Happy
I want just know if the signals are coming correctly, to know if there isn't a broken wire or some channel is damaged. I don't found any IC which take,at least, the channels A, B and Z and set a output or anything that show me if all signals are correct.
later I intend make the pulses count with pic.
Is there a IC which does this??
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Mon Jun 10, 2013 10:56 am     Reply with quote

Several PIC's.....
PIC 33's with QEI.

However for just one unit, just search here for quadrature. Several decoding examples done.

For a simple uC interfaced counter, the HCTL-2021, 2022, or 2032.

You can also do it with a couple of XOR gates, and the CTC units. Microchip have an application note.

Again don't get hooked of the Z. This is just a 'zero' pulse.

Best Wishes
temtronic



Joined: 01 Jul 2010
Posts: 9246
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Jun 10, 2013 11:33 am     Reply with quote

also ...
US Digital make several encoder chips....
used them for decades, GREAT encoders too !

easy enough to use a simple(8 pin) PIC for it though...

hth
jay
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon Jun 10, 2013 12:03 pm     Reply with quote

How about using a small PIC for each encoder, and one PIC "to rule them all" (sinister laugh).

Really, small PICs don't cost much. The code in each PIC will be simple and easy to debug. Run them all from the same clock and reset to save cost, space, and avoid any timing glitches.
_________________
The search for better is endless. Instead simply find very good and get the job done.
magnus



Joined: 09 May 2013
Posts: 15

View user's profile Send private message

PostPosted: Mon Jun 10, 2013 12:27 pm     Reply with quote

Thanks All, You really help!!!

I like The Lord Of The Rings Reference
SherpaDoug wrote:
one PIC "to rule them all" (sinister laugh).
Surprised
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group