PWM centered to 0V

Hello everybody,
I am trying to feed a PWM signal into a welding machine to control its power and I do have a major problem: the PWM should swing between +V and -V and not from 0V to +V as in the arduino output.
Is there a (possibly simple) way to shift the output voltage so I can have it going from (say) -12V to +12V?

PWM input has only two wires so the voltage must truly reverse (i.e. a voltage divider would not work as I do not have any place where to connect the virtual ground)

thank you for your responses, as always this place is a source of many good answers

Are you sure the machine needs it? Otherwise, it sounds like a job for a H-bridge :slight_smile:

quite sure yes… attached is the output from the original control box… I tried with a 0-20 V PWM and it is not working…

That’s not PWM, but RS-232 ? serial data.

RS 232 at 30V pp??? plus the duty cycle increase and decrease as you expect from a PWM??

just got a crazy idea... what about using a stepper driver? surely it can generate positive and negative output as a square wave if properly driven?

PWM is constant. HIGHs and LOWs stay the same (until value/frequency is changed).
This seems to be some form of data.
RS-232 can be anything from 3-15volt bipolar.

A MAX232 chip could be used to generate that signal.

That indeed looks a lot like RS232 indeed. And yes, RS232 uses quite high voltages (up to +-25V aka 50Vpp open circuit, +-15V / 30Vpp connected)

RS 232 at 30V pp???

Yes you can have it at any voltage you like. The old TTY machines used +/- 75V.

plus the duty cycle increase and decrease as you expect from a PWM??

That waveform you posted did not show the duty cycle of a PWM signal. It looks like you are confusing the data signal, which will be sending an increasingly large number with increasing power, with PWM which will have a constant on / off ratio signal for any specific value.

I am trying to feed a PWM signal into a welding machine

We have had many welding projects on the forum over the years and they all suffer from EM interference to the Arduino causing it to miss-behave. I am not sure if the people making the projects ever solved that in a satisfactory manor.

well, what to say... this is a very interesting idea of that being not a PWM signal, but the screenshot in the picture was taken while the regulation was in action, so I would expect that thw square wave would open and close like that... so the question now is: how can i check if that is an RS232 signal? any way to do that?

Why would you expect that? Isn't the regulation IN the machine?

To check for RS232, just post a clear picture of only the screen. Most likely with a tiny bit longer time base.

no the controller is NOT in the machine… it is a separate external box that reads the temperature and supposedly feed in the commands to lower and rise the power… attached another screenshot of the signal out of this extarnal controller

Okay, then the commands are probably changing. But how does that controller receive that temperature info?

On that screenshot it does look more like PWM. Every period seem to be nearly 1 time division.

And like I said, if it is indeed PWM it needs a H-bridge will probably do the job just fine (as long as you don't need a common GND).

the setup is like this:

there is a welding machine (induction heater) the heat up the part. this machine has an input to control the power applied

an external device reads the temperature with a pyrometer and apply the correct settings to the heating machine to keep temperature constant

this second device is what i am trying to replicate, as they are 30 years old and no longer available to be replaced or repaired

so far i managed to have a good reading of the temperature and i do have a PID controller that supposedly would keep the temperature constant on the part. from the second picture I posted I was convinced that was a PWM so I made an output accordingly, but applied on the machine it is NOT working. Needless to say I did not notice at first sight that it was using negative voltage as well (the machine is located in italy and i am in england) so I do not have any way to directly access the machine and measure)

being that i sent the box and it is not working i asked them to call again the guy with the oscilloscope and measure again, and the first picture i posted was the result of that

Is there a (possibly simple) way to shift the output voltage so I can have it going from (say) -12V to +12V?

Yes, it's called a MAX232.

I do hope you did not set the scope to AC input ...

thank you Paul... i will look into that.
I have no way to tell how they set the oscilloscope, but can you please elaborate on that? what would be the difference in reading? I am more a programming guy than an electronic wizard lol

thank you?

what would be the difference in reading?

There would be no D.C. level and it would look like a voltage that went from -ve to +ve when that was not what was happening.

so you are saying that actually the wave form shown could actually be going from 0 to +V?

RS 232 at 30V pp??? plus the duty cycle increase and decrease as you expect from a PWM??

Timing’s all wrong for serial data. I’d say that’s PWM for an inverter bridge. Designed to go
into pulse transformer perhaps, hence the AC nature.

@MarkT, from the second image I do as well.

@cloxart @Paul__B, screenshot shows ~ next to the (unused) channel 2 and - next to channel 1. So I think it's in DC-coupling for the shown channel.