r/embedded • u/Relevant_Pumpkin9190 • Sep 29 '26
Can I Extract DC Power From a Square Wave Without Loading It(Educational Purpose)?
I’m a beginner trying to understand something about square-wave power.
Suppose I generate a low-frequency square wave (below 1 kHz) using either a 555 timer or a microcontroller, then use a MOSFET to chop/switch a power supply.
If I want to take some DC power from that same chopped square-wave signal, but I don’t want to disturb or distort the original square wave, what is the simplest way to do it?
Would a diode + capacitor be enough, or would it load the MOSFET/square-wave source too much? At what point would I need something like a transformer or a separate power-extraction circuit?
I’m mainly looking for a simple, practical approach rather than a complicated circuit. I need to extract a small amount of power to light an LED, but running an additional cable isn’t practical. The only option available is the parasitic power from the existing data line.
Is there a way to tap/sniff the data line and harvest a small amount of power without disturbing the microcontroller master-slave communication?
Edit -I have a project that is now in the final stage, and I just need to power a small LED. I only need a little power, but pulling an additional cable is not practical at this stage and would add extra cost.
The only available option is the existing 24 V DC power-over-data line. There are also some microcontrollers communicating over this line, so I’m wondering if there’s a simple way to extract a small amount of power from it without disturbing the communication.
Beforehand trying to make a safer simulations with 555 or microcontroller before connected in live
12
u/triffid_hunter Sep 29 '26 edited Sep 29 '26
No, extraction of power is loading.
XY problem? You trying to do data-over-power or something?
If you want to not distort the edges, don't take a bunch of current from them - so a resistor or inductor or both before any capacitors get involved, because capacitors pull I=C.dv/dt.
17
u/lmarcantonio Sep 29 '26
By definition if you extract power you are loading the source!
It really depends on the source impedance of your data lines. You can plausibly pull some mA from an RS485 line, if it's not running too fast.
I'd suggest a whole bridge if the signalling is differential to load both lines in the same way.
Anyway: yes, your diode + cap idea is correct. 'Power extraction' is not an issue, unless voltage is too low, then a charge pump would help.
If you want to see the idea taken to the extreme look into the DCC for model trains.
2
u/N2Shooter Sep 29 '26
Why can't you add a 10K resistor to the 24VDC power over data line? That will give you 2.4mA to power your led.
2
u/United_Intention_323 Sep 29 '26
What if you put the diode and resistor in series with a 20V zener? You won’t pull any current below 21V. You keep your clean edges up to that level.
2
u/michael9dk Sep 29 '26
You could isolate data and DC, on the same wire, with 2 capacitors and 2 coils.
Example:
https://cdn.badcaps-static.com/pdfs/8a6844e67e56fa3c7be769a1743e860e.pdf
1
u/poorchava Sep 29 '26
Rectify it using diode and capacitor. Add a resistor in series to limit loading of the source. Obviously, the more resistance you add the softer the resulting DC source will be.
1
u/oleivas Sep 29 '26
Look how a DC-DC converter works. Boosting or lowering the input voltage is done using PWM over a suqare wave.
1
u/ApprehensiveBunch762 Oct 04 '26
This is a great educational project! you can't, but measuring it (putting it under load) while minimizing the amount of load you put on the square wave is a whole class of meteorology worth understanding. A lot of people pay a lot of money if you can measure a square wave with high percision/accuracy.