# Convert Square wave to DC continous wave

#### NTC

Joined Mar 23, 2023
9
I know it is stupid, but I keep struggling with my problem.

I have a Square wave 24DC + 9 AC. What happens is that theres is some communication protocol on top of that. I need to power some electronics with that line, but the Ups and Downsof the wave keep charging and discharging the coupling capacitors I have in the DC to DC converters, and that creates current peaks, which cause noise in the communications.

Perhaps this is a bad design. Anyway, I m new to this project, for that reason I came here to ask for help.

I think if we rectify the square wave to a DC continous wave, then we could use this to power the DC-DC buck converters.

Can someone help me with this?
This is an aproximation of the circuit I m working on.

#### Attachments

• 93 KB Views: 48

#### Alec_t

Joined Sep 17, 2013
14,385
I think if we rectify the square wave to a DC continous wave,
The 'square' wave shown (vn001 trace?) is not bipolar so can't be rectified. Do you mean regulated? That would require active components rather than just passive ones.
Welcome to AAC!

#### crutschow

Joined Mar 14, 2008
34,715
I think if we rectify the square wave to a DC continous wave, then we could use this to power the DC-DC buck converters.
You already have a rectifier in your circuit, just increase C1 to at least 1000µF.
Use a 1A rectifier, such as the 1N40xx series.

That circuit will draw high peak currents from the source.
Is that okay?
If not you can add about a 10mH inductor in series with the diode to limit the peak current.

#### crutschow

Joined Mar 14, 2008
34,715
The 'square' wave shown (vn001 trace?) is not bipolar so can't be rectified.
Why do you say that?
Of course a unipolar square-wave can be rectified.

#### Audioguru again

Joined Oct 21, 2019
6,765
It is not rectified, instead it is peak detected.

#### ronsimpson

Joined Oct 7, 2019
3,152
It is not rectified, instead it is peak detected.
Question, A 60hz sine wave is "rectifier" or "peak detected"? I am not clear on the difference, if any.

#### ericgibbs

Joined Jan 29, 2010
19,025
hi NTC,
No knowing your complete application, is this option helpful.?
E

#### crutschow

Joined Mar 14, 2008
34,715
\
It is not rectified, instead it is peak detected.
I guess we're getting into semantics here. but if you are converting a square-wave to DC for power, not detection, to me that's rectification, whether the square-wave is unipolar or bipolar.

#### LowQCab

Joined Nov 6, 2012
4,226
Any analysis of a Circuit requires knowing about all aspects of it's operation
and the "why" of what the Circuit was designed to do.

With only a vague "conceptual-description",
by a person who does not yet understand how and why
the Circuit was designed that way in the first place,
no reliable and accurate advise can be given.

Do You have Schematics ?,
or an accurate technical description of the Circuit's operation ?
.
.
.

#### NTC

Joined Mar 23, 2023
9
Hey
Any analysis of a Circuit requires knowing about all aspects of it's operation
and the "why" of what the Circuit was designed to do.

With only a vague "conceptual-description",
by a person who does not yet understand how and why
the Circuit was designed that way in the first place,
no reliable and accurate advise can be given.

Do You have Schematics ?,
or an accurate technical description of the Circuit's operation ?
.
.
.

Hey
LowQCab

My objective is to provide power to a PCB.

My resource is exclusively this line where we have a square wave ( 24DC + 9 AC) . I cannot have current peaks drawn from the line. The current must be constant, or else we have noise in the communication.

I wonder if it is possible to feed this PCB I need to power with this line?

Thank you in advance, i ll check the rest of the answers later

#### LowQCab

Joined Nov 6, 2012
4,226
I wonder too ..........
.
.
.

#### crutschow

Joined Mar 14, 2008
34,715
. I cannot have current peaks drawn from the line. The current must be constant, or else we have noise in the communication.

I wonder if it is possible to feed this PCB I need to power with this line?
A inductor in series with the rectifier, as I suggested, would smooth the current to minimize the peak value.

What is the power (voltage and current) needed by the circuit?

#### NTC

Joined Mar 23, 2023
9
hi NTC,
No knowing your complete application, is this option helpful.?
E
View attachment 290542
That circuit seems interesting, the thing is that requires an additional voltage source, which we don't have available..
ALso, I tryied to replicate your circuit in LTSpice but can't find the "GPV0". What component is that?

#### ericgibbs

Joined Jan 29, 2010
19,025
hi NTC,
Its a general purpose 5V zener diode, just limits the swing to 0v to +5v
E

NTC

#### NTC

Joined Mar 23, 2023
9
A inductor in series with the rectifier, as I suggested, would smooth the current to minimize the peak value.

What is the power (voltage and current) needed by the circuit?
Your answer seems also interesting, that was the first one we tryied.
Here is a simulation of the circuit you describe. As you can see we have current oscilations. We cannot eexceed the 100mA.

#### Attachments

• 139.5 KB Views: 10

#### LowQCab

Joined Nov 6, 2012
4,226
"" My resource is exclusively this line where we have a square wave ( 24DC + 9 AC) .
I cannot have current peaks drawn from the line.
The current must be constant, or else we have noise in the communication. ""

Yeah, OK, Fine ........
But how much Current can it Source ????
and how much Current do You need for your add-on Circuit-Board ?

These questions need to be answered before
anyone, can do anything, other than make blind guesses.

If the Device that is supplying the Voltage plus Control-Pulse,
can supply more Current than is required by the normal Load at the Controlled-Device,
( which it "should" be able to easily do if designed conservatively ),
then all You need is a plain-ole "Linear-Voltage-Regulator".

A "Buck-Converter" will Wreak-Havoc on your Control-Signal.
So You need to run the Power-plus-Signal through a Linear-Regulator FIRST,
and have the Linear-Regulator maintaining a steady Voltage
on some Large-Bulk-Storage-Capacitors,
which can then feed a Buck-Converter if You absolutely must use a Buck-Converter.

If your add-on Circuit-Board doesn't need more than a couple of Amps of Current,
I would advise that You completely forget about using a Buck-Converter.

If You have to use a Buck-Converter,
additional Filtering may be needed.

After You determine the Current required for your add-on Circuit-Board,
You can simply attach an appropriately sized Resistor across the Line to see
if the Supplying-Circuitry can maintain an

For now just forget about "Voltage" and "Signals" .......

How much Current does the existing Device require for normal operation ?

How much Current does your new add-on Circuit-Board require ?

How much Current can the Supply-Device comfortably deliver ?
.

.
.

#### crutschow

Joined Mar 14, 2008
34,715
Here is a simulation of the circuit you describe. As you can see we have current oscilations. We cannot eexceed the 100mA.
Then that will take a much larger inductor.

You didn't answer the question about how much voltage and current your circuit requires.
We can't give good answers to your questions if you don't answer ours.

#### NTC

Joined Mar 23, 2023
9
"" My resource is exclusively this line where we have a square wave ( 24DC + 9 AC) .
I cannot have current peaks drawn from the line.
The current must be constant, or else we have noise in the communication. ""

Yeah, OK, Fine ........
But how much Current can it Source ????
and how much Current do You need for your add-on Circuit-Board ?

These questions need to be answered before
anyone, can do anything, other than make blind guesses.

If the Device that is supplying the Voltage plus Control-Pulse,
can supply more Current than is required by the normal Load at the Controlled-Device,
( which it "should" be able to easily do if designed conservatively ),
then all You need is a plain-ole "Linear-Voltage-Regulator".

A "Buck-Converter" will Wreak-Havoc on your Control-Signal.
So You need to run the Power-plus-Signal through a Linear-Regulator FIRST,
and have the Linear-Regulator maintaining a steady Voltage
on some Large-Bulk-Storage-Capacitors,
which can then feed a Buck-Converter if You absolutely must use a Buck-Converter.

If your add-on Circuit-Board doesn't need more than a couple of Amps of Current,
I would advise that You completely forget about using a Buck-Converter.

If You have to use a Buck-Converter,
additional Filtering may be needed.

After You determine the Current required for your add-on Circuit-Board,
You can simply attach an appropriately sized Resistor across the Line to see
if the Supplying-Circuitry can maintain an

For now just forget about "Voltage" and "Signals" .......

How much Current does the existing Device require for normal operation ?

How much Current does your new add-on Circuit-Board require ?

How much Current can the Supply-Device comfortably deliver ?
.

.
.
Here is a general architecture so we can understand better.

The voltage of my circuit will require 10V. But we still trying to get it down to 5V.
That PCB has 3 buck converters, 10V, 5V and 3V3.

The max current consumption will be about 100mA. Lets assume that it is the max the source(Central Hub) can provide aswell. Because, all the devices connected will requires some current and we are limiting the number or devices we can connect.

We also tryied to use the LDO aproach, but we still have current peaks in the source.

#### Attachments

• 10.4 KB Views: 6

#### NTC

Joined Mar 23, 2023
9
Then that will take a much larger inductor.

You didn't answer the question about how much voltage and current your circuit requires.
We can't give good answers to your questions if you don't answer ours.
The voltage of my circuit will require 10V. But we still trying to get it down to 5V.
That PCB has 3 buck converters, 10V, 5V and 3V3.

For the current, as said, lets assume it is around 100mA. Because it is the limitation of the source.

The requirement is that there is no oscilations in the current drawn from the line. That will make noise in the communications, which are made with current pulses.

#### MrAl

Joined Jun 17, 2014
11,590
I know it is stupid, but I keep struggling with my problem.

I have a Square wave 24DC + 9 AC. What happens is that theres is some communication protocol on top of that. I need to power some electronics with that line, but the Ups and Downsof the wave keep charging and discharging the coupling capacitors I have in the DC to DC converters, and that creates current peaks, which cause noise in the communications.

Perhaps this is a bad design. Anyway, I m new to this project, for that reason I came here to ask for help.

I think if we rectify the square wave to a DC continous wave, then we could use this to power the DC-DC buck converters.

Can someone help me with this?
This is an aproximation of the circuit I m working on.
Hi,

Without knowing more about your requirements here are some ideas.
Note you dont really need to rectify, you just need to smooth.
You may not even need the diode.

If you only need 5v then increase the series resistor values. You may only need one resistor also. You only need a filter, but for a smoother output keep at least two resistors and two capacitors as shown. You probably also want a 5v regulator on the output, unless the output is to feed your buck and that is what will bring it down to 5v.

#### Attachments

• 23.4 KB Views: 12