Hello Guest it is April 26, 2024, 03:42:57 PM

Author Topic: Manual pulse encoder & mach3  (Read 9262 times)

0 Members and 1 Guest are viewing this topic.

Re: Manual pulse encoder & mach3
« Reply #30 on: January 19, 2022, 01:16:23 AM »
Hi,
I think you will need a 12V supply, but it need only be very low current.

If you need to amplify/buffer the AB MPG outputs something very simple like attached pic.
The transistors need only be small signal types, say BC547's or similar...I have hundreds of them lying around, and as
most of my parts are now surface mount I very rarely use these through-hole types any more.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Manual pulse encoder & mach3
« Reply #31 on: January 19, 2022, 01:21:16 AM »
Okay, I can follow that.

What are the R1 and R2? Resistors?

T1 and T2 are the transistors?

Also, why is the A and B emitter pins grounded together...?
Re: Manual pulse encoder & mach3
« Reply #32 on: January 19, 2022, 01:46:18 AM »
Hi,
R1 nd R2 just provide some base resistance, say 1kOhm would be fine. T1 and T2 are indeed NPN transistors.
When the base of T1 is energised then T1 will saturate and pull the collector down to 0V , or very close to,
say 0.2V.

Thus the two transistors are just current controlled switches. The current in the base circuit is likely to be 100uA, while
the collector-emitter current will be several mA, ie the transistors provide amplification of a low current, either A or B outputs
and can switch several mAs.

Craig

'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Manual pulse encoder & mach3
« Reply #33 on: January 19, 2022, 10:37:30 AM »
Okay,

So my next question then is where does the input signal go for the BoB to know how much to move the motors?

The diagram shows active low outputs, which outputs a signal to the NPNs and then it cycles around to a ground terminal?

My brains not connecting the how to of getting the mpg to signal the board to move the motors 😬

Currently my MPGs are connected to 2/3 pins set as inputs.
Re: Manual pulse encoder & mach3
« Reply #34 on: January 19, 2022, 11:15:03 AM »
I guess by your diagram you are grounding out your outputs and when the output grounds out your board sends the signal to the motors to move 1 step?

I guess if I used inputs I would have 5V going to both Collectors of the NPN and the emitter would be wired to my input pins on the board.

So when A or B applies a small amount to the base, the transistor opens up and amplifies (or allows) 5V to flow to the board input pin, signaling the motors to move?

Then I'd need A signal to move CW and B signal to move CCW motion of the motor?

Is one way better to wire then the other?
Re: Manual pulse encoder & mach3
« Reply #35 on: January 19, 2022, 02:17:53 PM »
Hi,
Quote
I guess by your diagram you are grounding out your outputs and when the output grounds out your board sends the signal to the motors to move 1 step?
Yes, that is correct and its called 'active low', and what it means is the circuit 'sinks current' when the signal is active. If you were to use this you would have the resistor in the
C10 set as a pull-up. Thus in its natural state it would be at 5V. When the transistor conducts, ie signal active, it will be pulled low, to 0V or close to.

Quote
Then I'd need A signal to move CW and B signal to move CCW motion of the motor?

In Machs Input tab you can select or alternately deselect 'active low'. You will alter that setting until and possibly swap the AB wires until Machs logical direction matches
the MPGs physical direction.

You are trying to overthink it. You may NOT even require the extra transistors yet,  just a resistor and diode to limit the 12V swing of AB to 5V. It will all become clear once you've got the MPGs.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Manual pulse encoder & mach3
« Reply #36 on: January 19, 2022, 02:28:39 PM »
Thanks Craig.

I'll wait out on purchasing anything else other then the 12V power supply.

Once I test and post some numbers here I'll look into getting what ever else needed to make them run reliably and accurately.
Re: Manual pulse encoder & mach3
« Reply #37 on: January 24, 2022, 10:14:42 PM »
In Machs Input tab you can select or alternately deselect 'active low'. You will alter that setting until and possibly swap the AB wires until Machs logical direction matches
the MPGs physical direction.

You are trying to overthink it. You may NOT even require the extra transistors yet,  just a resistor and diode to limit the 12V swing of AB to 5V. It will all become clear once you've got the MPGs.

Craig

Craig,

Setting up mach3 to work with these MPGs through the diagram you posted, in the input tab what do I set to active low?

OEM triggers?

 Input 1/2/3?

Jog ++/jog--?

I have the mpg tab set for pins 2 and 3, everything is wired in as per the diagram.

Thanks,

Kyle
Re: Manual pulse encoder & mach3
« Reply #38 on: January 25, 2022, 02:30:57 AM »
Craig,

Testing the wheels. Looks like when turned CW the A pin gives 3.9-4.1V and B pin is 0.5V.

Then vise versa. If I turn quick it will jump up to 7-8V briefly.

Will I need to worry about that? Or can I direct wire to the BoB with the 4V and 0.5V changes?

Thanks,
Kyle
Re: Manual pulse encoder & mach3
« Reply #39 on: January 25, 2022, 02:40:22 AM »
Hi,
have you supplied the encoder with 12V?

If so the outputs A & B will also be 12V or close to. Its probably a good idea to use a 4.7V Zener diode on each output to ensure that no damaging
voltage (that is over 5V) gets into your BoB. Having said that the outputs are both fairly high impedance and are not likely to damage the BoB,
so the Zeners are precautionary.

Then hook the MPG outputs (Zener limited) to the BoB and then to Mach. You may need to reverse one or even both outputs (by changing active high/active low)
to ensure that Mach correctly determines which way you are spinning the MPG.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'