Sine to square inverter

Irving

Joined Jan 30, 2016
5,146
Thanks for the pictures which were helpful.

Which of the caps are 104 or 331?

There are three sine to TTL converters on the board. 2 (A, B) are identical with a 22k feedback resistor and one (the reference?) having a 53k feedback resistor for reduced hysteresis. Here is a simulation of one of the AB converters (NB LM2901 is identical to LM339)

1707938946429.png

And here is a nearly complete schematic... I need you to check a few things I can't resolve from the pictures but I've made a educated guess about. BTW, the jumpers swap A & B over on the output to change direction in case App can't.

1707936904597.png
 
Last edited:

Thread Starter

Paul Savigar

Joined Feb 5, 2024
20
Thanks for the pictures which were helpful.

Which of the caps are 104 or 331?

There are three sine to TTL converters on the board. 2 (A, B) are identical with a 22k feedback resistor and one (the reference?) having a 53k feedback resistor for reduced hysteresis. Here is a simulation of one of the AB converters (NB LM2901 is identical to LM339)

View attachment 315247

And here is a nearly complete schematic... I need you to check a few things I can't resolve from the pictures but I've made a educated guess about. BTW, the jumpers swap A & B over on the output to change direction in case App can't.

View attachment 315240
Wow ! Irving , thanks for all your hard work, we will start to assemble asap.. Yes, the reference signal is important when it comes to CNC machines, so thanks for that as well. rgds Paul
 

Irving

Joined Jan 30, 2016
5,146
Wow ! Irving , thanks for all your hard work, we will start to assemble asap.. Yes, the reference signal is important when it comes to CNC machines, so thanks for that as well. rgds Paul
No problem. I've laid the parts out roughly as they are on the board to help ID them, though R19/R20/C9/C10 should therefore be below the output connector.

Can you ID which caps are 104 and which are 331 and I'll update schematic. Also measure the resistance of the resistor network between the jumpers and the output connector - from pin 1 (nearest board edge) to an unused pin, eg #3 . Finally, I'm not 100% sure if the bottom of C10 goes to ground as drawn, or to the junction of R19 & R20.

I'd validate all the resistor values as my interpretation of the colours might differ from reality. Let me know if any need changing.

What speed are these encoders being spun at? ie what's max freq of sine wave. I ask because the LM339's detection of the zero crossing point is not only quite delayed, but, in simulation, it shows quite a lot of glitching, despite the inbuilt hysteresis, which could be interpreted as false pulses, which would be quite detrimental for a CNC machine. In fact, with the 5% tolerance of the resistors on that PCB, coupled with the 5mV input offset of the LM339 means the relationship between A, B and ref on pulse edges is quite a wide spread, which could also be problematic.

However, if they're working well for you then maybe I'm over-worrying lol.
 

MisterBill2

Joined Jan 23, 2018
27,679
Interesting indeed. I fought with just such a system at a previous job, they used multiple comparators to multiply the pulses from a linear encoder.
Comparators can work BUT you need to use the ZERO CROSSING to do it accurately.Triggering at a sine wave peak is a recipe for failure and triggering on the slope will bring grief and a lack of symmetrical square outputs. If the signals are positive only then you will need to supply a stable mid point. So the scheme in post #13 is what I suggest, with s stable reference to supply the switching reference voltage, IF good symmetry is required by the application.
 
Top