Sine to square inverter

panic mode

Joined Oct 10, 2011
5,017
it should be mentioned in the documentation for your product (drive/plc/mc...) - whatever is using this feedback signal
budget product like small PLCs usually tap out at 20-100kHz, but beefy products have much higher limit.

i am not saying you need to change anything yet, just trying to make you aware....

when using high resolution encoder on something that spins fast, you get high pulse count rate. and the circuit that does signal conversion need to be able to keep up - that's all.

it is not clear if you are looking for something for specific application or just a bench test. in that case limitations can be taken into account. otherwise you may want to investigate what the limits are. or at least define what the limits of your product are. LM339 is a good old comparator. there is a new version LM339B and it will likely do the job just fine. there are of course faster comparators out there.
 

Thread Starter

Paul Savigar

Joined Feb 5, 2024
20
Yes, there are such things. Actually, two sine waves 90 degrees out of phase. They allow for much finer positioning, down to the phase noise in the signals. I've not designed one into a system, but I have repaired systems that use this.

ak
Yes, typically, Heidenhain use this sine/cos signals , I just need to convert them to 5vTTL output.
 

Thread Starter

Paul Savigar

Joined Feb 5, 2024
20
it should be mentioned in the documentation for your product (drive/plc/mc...) - whatever is using this feedback signal
budget product like small PLCs usually tap out at 20-100kHz, but beefy products have much higher limit.

i am not saying you need to change anything yet, just trying to make you aware....

when using high resolution encoder on something that spins fast, you get high pulse count rate. and the circuit that does signal conversion need to be able to keep up - that's all.

it is not clear if you are looking for something for specific application or just a bench test. in that case limitations can be taken into account. otherwise you may want to investigate what the limits are. or at least define what the limits of your product are. LM339 is a good old comparator. there is a new version LM339B and it will likely do the job just fine. there are of course faster comparators out there.
Yes it is for interfacing Heidenhain encoders to 5vdc TTL equipment
 

panic mode

Joined Oct 10, 2011
5,017
Yes it is for interfacing Heidenhain encoders to 5vdc TTL equipment
i would be putting scope to that encoder output...

as shown earlier in the thread amplitude should be 1Vpp and I am pretty sure that it is not centered on zero, that would require negative voltage which is an unnecessary complication for something that is powered by single positive supply. looking at input protection of reference designs like TIDA-00178 suggests the same. anything outside supply limits would be clamped by the diodes. it is likely centered on 2.5V so the signal is normally in 2-3V range. therefore circuits proposed above would need some bias adjustments.
 

AnalogKid

Joined Aug 1, 2013
12,158
Yes, I am aware thar Heidenhain supply the EXE units but they are very expensive, and we use a lot of these.
I need to be able to make up the circuit on veroboard.
What power sources are available for the interface circuit? What type of circuit or device does the output drive?

Output options:

Open collector pulling something to GND.

Same but with a pull-up resistor to whatever voltage is powering the circuit.

Complete totem pole output stage as with an opamp instead of a comparator.

Also, max *and min* freq of the sine waves? If the minimum frequency is not super-slow, simple AC coupling might make things much easier. I'm thinking of a midified version of Eric's post #13.

Do you know if the input sinewave is centered about GND?

ak
 
Last edited:

Irving

Joined Jan 30, 2016
5,140
It is Heidenhain 3.8vdc 11um sine A and B , 90deg phase shifted to TTL A and B 90deg phase shifted.
sine inputs are floating ( no gnd)
Won't be hard to reverse engineer that interface. Power (+5v?, 2 x GND) and 3 differential inputs come in on the 9-way connector. Differential inputs go via RC noise filter (1k2 & 1nF?) to +/- inputs of comparator + some biassing resistors. Comparator output pulled up to +rail by either a 22k or 56k. Need a better, hi-res, hi-contrast, backlit, picture of top of board to resolve some tracks to fully reverse engineer. @Paul Savigar - how much do they charge for this interface and who makes it?

1707822424945.png
 

Thread Starter

Paul Savigar

Joined Feb 5, 2024
20
it should be mentioned in the documentation for your product (drive/plc/mc...) - whatever is using this feedback signal
budget product like small PLCs usually tap out at 20-100kHz, but beefy products have much higher limit.

i am not saying you need to change anything yet, just trying to make you aware....

when using high resolution encoder on something that spins fast, you get high pulse count rate. and the circuit that does signal conversion need to be able to keep up - that's all.

it is not clear if you are looking for something for specific application or just a bench test. in that case limitations can be taken into account. otherwise you may want to investigate what the limits are. or at least define what the limits of your product are. LM339 is a good old comparator. there is a new version LM339B and it will likely do the job just fine. there are of course faster comparators out there.
Please find attached, we buy these locally but would like to make hem in house on veroboard.
Won't be hard to reverse engineer that interface. Power (+5v?, 2 x GND) and 3 differential inputs come in on the 9-way connector. Differential inputs go via RC noise filter (1k2 & 1nF?) to +/- inputs of comparator + some biassing resistors. Comparator output pulled up to +rail by either a 22k or 56k. Need a better, hi-res, hi-contrast, backlit, picture of top of board to resolve some tracks to fully reverse engineer. @Paul Savigar - how much do they charge for this interface and who makes it?

View attachment 315130
Hi Irving, I was hoping you would say that ! It works perfectly and we pay R220.00 , brought in by a local guy from China. Rgds Paul
 

Attachments

Irving

Joined Jan 30, 2016
5,140
Hi Irving, I was hoping you would say that ! It works perfectly and we pay R220.00 , brought in by a local guy from China. Rgds Paul
Just to be clear, this is a 3rd party equivalent of the basic Heidenhain EXE interface. R220 = 8.50GBP so these are quite cheap. Why would you mess around with Veroboard? You could get a batch of 20 PCB from JLCPCB for approx the same price as Veroboard (assuming its the good stuff and not some knock-off SRBP) and assemble far faster with no mistakes.
 

Thread Starter

Paul Savigar

Joined Feb 5, 2024
20
Just to be clear, this is a 3rd party equivalent of the basic Heidenhain EXE interface. R220 = 8.50GBP so these are quite cheap. Why would you mess around with Veroboard? You could get a batch of 20 PCB from JLCPCB for approx the same price as Veroboard (assuming its the good stuff and not some knock-off SRBP) and assemble far faster with no mistakes.
Hi Irving, that sounds great. I actually have all the components, But where/who is JLCPCB ? Rgds Paul
( Yes , it would be for Heirdenhain Apps. My company is ABS Measurement CC , South Africa, but I am Welsh.
 

Irving

Joined Jan 30, 2016
5,140
jlcpcb are one of many chinese pcb manufacturers - well respected and used by many on AAC for both hobby and commercial board manufacture. For $US2 they'll manufacture 5off 100mm x 100mm PCB each containing 4off 50mm x 50mm boards for you to separate. Shipping to SA is $62 (not sure why, its only $20 to UK). So you get each FR4 board for $US3.2 which is about the same, or cheaper than good quality FR4 stripboard (which you'll need more of because it won't be as densely packed). Hell, if you didn't have the parts already they'd assemble the board for free and the approx parts cost from their sister company LCSC is around a $US1.5 per board for through-hole parts. If you designed a SMD version it would be even cheaper!
 

Irving

Joined Jan 30, 2016
5,140
You got a point. But a LM339 isn't that great of an op amp to use. I would try an OPA4387 instead.
I think you missed the point. The goal here is to replicate cheaper an existing, working, product. The LM339 is $0.16 while an OPA4387 is $14.65 in sub-20 quantities Also the OPA4387 is a TSSOP-14 SMD - this is a TFT design for hand assembly.
 

Thread Starter

Paul Savigar

Joined Feb 5, 2024
20
jlcpcb are one of many chinese pcb manufacturers - well respected and used by many on AAC for both hobby and commercial board manufacture. For $US2 they'll manufacture 5off 100mm x 100mm PCB each containing 4off 50mm x 50mm boards for you to separate. Shipping to SA is $62 (not sure why, its only $20 to UK). So you get each FR4 board for $US3.2 which is about the same, or cheaper than good quality FR4 stripboard (which you'll need more of because it won't be as densely packed). Hell, if you didn't have the parts already they'd assemble the board for free and the approx parts cost from their sister company LCSC is around a $US1.5 per board for through-hole parts. If you designed a SMD version it would be even cheaper!
Hi Irving
Thanks for your speedy response. the problem is we dont have the circuit .
 

Irving

Joined Jan 30, 2016
5,140
Hi Irving
Thanks for your speedy response. the problem is we dont have the circuit .
Take a good hi-res, back-lit, photo of the top of the board so we can see all the tracks. It'll be easy to pull off the circuit then and laying out the PCB will only take an hour or 2.

Are the connectors 2mm or 2.54mm (0.1") spacing? Do you know what type they are? And do you know the purpose of the jumpers, do you use them?

Also the values of the capacitors.
 
Last edited:

Thread Starter

Paul Savigar

Joined Feb 5, 2024
20
Take a good hi-res, back-lit, photo of the top of the board so we can see all the tracks. It'll be easy to pull off the circuit then and laying out the PCB will only take an hour or 2.

Are the connectors 2mm or 2.54mm (0.1") spacing? Do you know what type they are? And do you know the purpose of the jumpers, do you use them?

Also the values of the capacitors.
Hi Irving
Please see attached. small caps are 104 , 331, big cap 100uf
Not sure what the jumpers are for
Rgds

Paul
 

Attachments

Top