Brother carousel encoders

20 Sep 2021 08:43 - 20 Sep 2021 08:52 #221178 by beakersBestFriend
Hi, I just finished retrofitting a Brother TC225 with LinuxCNC and QtPyVCP , still using the old servo drives .
What has been a little strange to me from the beginning , was the way the carousel encoder encodes the carousel  position.

I'm curious, if this is done the same way on all Brother Tapping centers ?!
Please have a look at the pictures attached.

The disk has five tracks, red is a "slowdown, close to target" signal for each pocket that tells the two speed carousel motor to change to
low speed not to overrun the target pocket  position.
Four lines (green) are binary encoded, representing the pocket number.
These four lines have a very small gap, so they act as "in position", too.
BTW1: I checked this out with the original control 
BTW2: They are offset by some degree, because the photo sensors are mounted this way on the pcb

I would have expected this to be the other way around.
Wide gaps for the pocket number encoding and a small gap as "in position"and "pocket number vaild".
The wide pocket gaps could easily be used to slow down, because I have a absolute position of the coming pocket in advance.
This could be handled by the "normal" LinuxCNC carousel component .

Because I wanted to be able to return to the old control just by changing the servo and I/O connectors,
I solved this with a new carousel software component.
At startup i read the absolute position from the encoder lines and increment/decrement the value (depending on the
direction of rotation) with the rising "slowdown" signal.
If the next pocket is the target pocket, slowdown is passed to the carousel motor.
When it stops in target position  the incremented value is compared to the absolute value from the four encoder lines.
A warning is thrown, if they do not match.

Wrote a test g-code that changes tools for half an hour. Unfortunately the warning is generated for approx 0.5% of the changes.

IMHO the cause is, that I do not have a information when to read the four encoder lines exactly.
I'm already doing a 3 times overscan. I could  extend this, but it would slow down the toolchange.

I'm about to change the encoder disk with a new one made of 1mm black GFK.
It's not a big deal from mechanical or software point of view.
Because I'm free in the choice of how to do the coding on a new disk (binary, gray, gray with rollover capability, ...) I would like
to do it in the way other Brother tapping centers do it.
I'm quite sure that more modern machines (my TC225 is from 1988) do the encoding in a smarter way.

So, if there is anybody out there knowing what kind of carousel encodings have been used on Brother tapping centers,
it would be nice if he shares his knowledge.

If there is someone in need for the software component that handles the kind of TC225 encoders, I would be glad to share it.

Thanks in advance.

Last edit: 20 Sep 2021 08:52 by beakersBestFriend. Reason: improved text formatting, offered my solution.

Please Log in or Create an account to join the conversation.

09 Oct 2021 20:28 #222685 by Dinuka_Shehan
Use omron encoder.

Please Log in or Create an account to join the conversation.

12 Oct 2021 21:34 #222976 by andypugh
Replied by andypugh on topic Brother carousel encoders
I agree, that's wierd. I don't know how it knows when it has seen the full set of holes and can stop. Maybe the "slowdown" track has an edge used as the "strobe"?

Please Log in or Create an account to join the conversation.

25 Nov 2021 18:54 #227579 by ihavenofish
hi, the brother carousel is really easy, but theres a few tricks.

you have 4 tracks on it that encode the tool position. and the deceleration track.

what you havent seemed to figure out is the way the decel track works.

you continuously read that track when the carousel is in motion - use it to count spaces if you like. then when you are at the tool you want, you read again for the decel, and then hit brake. HOWEVER, you need to dwell 200ms before hitting the brake after reading the decel track, or it would often stop too early (seems to be whats happened to you). every machine may brake differently due to resistor variation, so yo might need 150ms, or 250. .but if you start with 200, you should be able to get in the right zone quickly. The point is, you need to time the braking so its hitting the right spot on the geneva mechanism.

with the decel track dwell, and closest path tool seeking, my tool changer was 100% reliable - i just never got to the point where my Z would move before i had to sell off the machine.

Please Log in or Create an account to join the conversation.

25 Nov 2021 19:09 - 25 Nov 2021 19:10 #227580 by ihavenofish
i was wrong i have 100ms.

here is my tool change code - entirely in a subroutine - minus any actual z motion as mentioned.

o<toolchange> sub

m66 P11 L0 Q1
m66 P12 L0 Q1
m66 P13 L0 Q1
m66 P14 L0 Q1



#<tool> = #<selected_tool>

// #<tool> = 9


o180 if [#<currenttool> EQ 0]
o180 endif

o120 if [#<tool> GT 0]
o120 else
	(MSG, failed because no tool requested)
o120 endif


m66 P16 L0 Q1

o111 if [#<absmovepos> GT 5]
o111 endif


o106 if [#<movepos> LT 0]
	M64 p4
	o119 if [#<absmovepos> GT 5]
	M65 p4
	o119 endif
o106 else
	M65 p4
	o129 if [#<absmovepos> GT 5]
	M64 p4
	o129 endif
o106 endif

o199 if [#<goodtogo> EQ 1]
	G53 G1 Z25.34 F5
	o112 if [#<atcready> EQ 0]
		o104 if [#<currenttool> NE #<newtool>]
			m64 p3
			o101 while [#<counter> LT [#<finalmovepos>]]
				m66 P10 L1 Q1
			o101 endwhile
			g4 p.1
			m65 p3
			m65 p4
		o104 else
			(MSG, failed because you are already on that tool)
		o104 endif
	o112 else
		(MSG, failed because not at ATC HOME)
	o112 endif
	G53 G1 Z17.72 F5
o199 else
o199 endif

m66 P11 L0 Q1
m66 P12 L0 Q1
m66 P13 L0 Q1
m66 P14 L0 Q1

o150 if [#<newtool> NE #<wherewenow>]
	(MSG, failed because we are on the wrong tool or between stations)	
o150 elseif [#<wherewenow> EQ 0]
o150 else
	(MSG, GOOD!!!!)
o150 endif

o<toolchange> endsub

Last edit: 25 Nov 2021 19:10 by ihavenofish.

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.274 seconds
Powered by Kunena Forum