Discuss Changing square wave in the The Welcome Forum area at ElectriciansForums.net

Need more information... depending on where it originates and how things are connected, it could be as simple as connecting the ground to the +ve input and the signal to the ground, but without knowing the full details of what it is, where it comes from, what it's connecting to and how those two items are interconnected it's almost impossible to say beyond the vary obvious answer of 'a signal converter'.

The only thing that springs to mind for the later is an operational amplifier configured as an inverting amplifier, but again I'd say without knowing all the facts it's very hard to give anything nearing a definitive answer.
 
To help us help you please tell us more or draw an image of the waveforms you have and want to produce.

And tell us too what currents are to be sinked and sourced during the space and mark of the square wave (or mark and space if it is this way around).

See: Current Sinking and Sourcing Explained - https://startingelectronics.org/articles/current-sourcing-sinking/

and 'rectangular waveform' section in

Electrical Waveforms and Electrical Signals - https://www.electronics-tutorials.ws/waveforms/waveforms.html
 
Thank you for your consideration, this wave is produced by an npn incremental ncoder witch provide a square wave that amplitude range is (-24,0)v and its frequency is 100khz i need to connect it to a high speed counter witch connected to siemens 1500 cpu the problem is this high speed counter does not have the configuration that is compatible with npn ncoders i need to change the amplitude range from (-24,0) to (0,24).
 
Take a look at this:-

https://uk.rs-online.com/web/p/interface-relay-modules/5329980/

Based on 10 minutes of Googling, it appears that this should allow you to do what you want although I'm not sure about the frequency range that device will handle.

Looks like the max frequency of that device is 15kHz
upload_2018-1-27_17-32-10.png
 
The principle is there though... it's highly unlikely this is the first time anyone has had to do this and based on my Googling there are quite a few pages that have information about connecting NPN encoders to PNP inputs.
 
Isocom SFH615A-2X Optoisolator 1 Channel 63-125% CTR 5.3KV DIL-4 - https://www.rapidonline.com/isocom-sfh615a-2x-optoisolator-1-channel-63-125-ctr-5-3kv-dil-4-63-1417

https://www.rapidonline.com/pdf/58-0510e.pdf

You could consider using an opto coupler chip. Use the encoder output (0,-24V) to drive the opto-diode emitter (with a suitable current limiting series resistor) and use the opto-detector phototransistor (npn), connected common emitter, to provide (5V,0) or (24V,0) at its collector with reference to the ground/emitter.

See common emitter transistor circuit:

Transistor as a Switch - Using Transistor Switching - https://www.electronics-tutorials.ws/transistor/tran_4.html

You need to know the input impedance of the CPU input and what currents are required to be sourced to the CPU input in the high state(5V or 24V) and to sink the input in the low state (0V) in order to work out the value of the collector load resistor and check that the photo transistor can switch the emitter -collector current without overheating.

The chips I have referenced have a maximum collector-emitter voltage of 70V and a cut-off frequency of 250kHz. The switch on and switch off times are circa 2microseconds.

If the encoder's 24V power supply is galvanically isolated from the CPU's you can use it to provide the power for the photo-transistor switch. So, 0V becomes +24V and -24V becomes 0V. If there is not galvanic isolation or the risk that the galvanic isolation will be bridged you will have to provide a separate dc power supply of (5V,0) or (24V,0).

Best I think to do a test circuit before connecting to the CPU.
 
I would suggest a signal conditioner would be the suitable option here, they come in many forms and tolerances giving a wealth of options to suit ones needs.
 
Do you have actual details of encoder ,as sometimes apparent
polarity issues ,occur just due to "Maths" and pnp / npn specs !
(and an inherent fear of crossing the streams)
 

Reply to Changing square wave in the The Welcome Forum area at ElectriciansForums.net

Similar Threads

as title, am looking for square edge grid switches. I rewired a little bungalow and wired it for grid switches beside double sockets in kitchen...
Replies
5
Views
604
Hi all, I'm current doing an electrical engineering course and am currently having to use an oscilloscope in order to generate a square and sine...
Replies
10
Views
1K
hello guys i have a (3-6v dc motor), (DC Motor PWM Speed Controller 3V 6V 12V 24V 35V), (3.7v 1200mah rechargeable battery) and a (Charging /...
Replies
4
Views
563
I find myself in the position of having to fit a few back boxes in to plasterboard. In the past for the odd one I just used a hand plasterboard...
Replies
42
Views
3K
A
the situation is this: 8 x 24v rgbw flood lights for a garden, each fitting has power consumption of 45w. 3 lights into a 200w driver, another 3...
Replies
4
Views
450

OFFICIAL SPONSORS

Electrical Goods - Electrical Tools - Brand Names Electrician Courses Green Electrical Goods PCB Way Electrical Goods - Electrical Tools - Brand Names Pushfit Wire Connectors Electric Underfloor Heating Electrician Courses
These Official Forum Sponsors May Provide Discounts to Regular Forum Members - If you would like to sponsor us then CLICK HERE and post a thread with who you are, and we'll send you some stats etc

YOUR Unread Posts

This website was designed, optimised and is hosted by Untold Media. Operating under the name Untold Media since 2001.
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock