Maker Pro
Maker Pro

How to vary the power delivered by a pwm signal

Cheers all,

This is my first post in the forum, which seems great by the way!

I'm doing a project where I need to acquire the response of a piece of equipment to signals that are pulses or combinations of pulses. The frequencies range from 1 Hz to whatever I can get... The signals are easy to produce.

So, my question is what do you advice I do in order to regulate the output power. If I were to use a buck converter(regulated via DutyCycle) the shape of the signal would be far from a pulse(wouldn't it?).

I feel like there's an easy path...

Thanks,
M
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
PWM means Pulse Width Modulation. You change the width of the pulses, keeping the frequency constant.

The longer it is ON compared to the OFF time (collectively, the duty cycle), the more power will be delivered.
 
PWM means Pulse Width Modulation. You change the width of the pulses, keeping the frequency constant.

The longer it is ON compared to the OFF time (collectively, the duty cycle), the more power will be delivered.
Thanks for your answer.
If nothing else works, that will be what I'll do...

However I'd like to be able to compare identical signals(regarding the shape) but with different power.

Do you think I maybe use an analog output somehow...?
 
PWM is an analogue signal, in the time domain. A constant ON signal is 100% power and a constant OFF is 0% power. The length of the ON pulse, relative to the period, is the amount of power between 0 and 100%.
The frequency or the 1/period will indicate how fast you can change the analogue value you can derive from filtering the output with a lowpass filter, to remove the 1/period noise.
 

KrisBlueNZ

Sadly passed away in 2015
You haven't explained your requirements very clearly.

You want to send pulses to a "piece of equipment". A pulse is a signal, but you seem to be implying that these pulses need to have significant power, and you want to use a regulator for them.

Do you mean that you want to turn the regulator ON and OFF to generate these pulses?

Usually, a regulator will produce a positive voltage which is applied across an output smoothing capacitor. If you disable the regulator, the smoothing capacitor will discharge into the load, and the voltage will taper off, instead of dropping to zero immediately. Do you need it to drop to zero immediately?

What kind of voltages and currents are you talking about? Something like 12V, 1A? You also need to give more background information, otherwise we might as well be playing pin the tail on the donkey at your birthday party :)
 
thank you KrisBlueNZ, you're right, I gave to little details...

The signals I intend to send are, as shape goes the easiest thing:
pwm_50.jpg

where I'll need to change the duty cycle, frequency.

The voltage of the signal that comes out of the pic is as you all know 5v and the current is 0.5A max, i think...

The equipment that serves as the load has the following characteristics:
voltage:[0-4]V
current:[0-3.5]A
max power around 15 watts
Usually, a regulator will produce a positive voltage which is applied across an output smoothing capacitor. If you disable the regulator, the smoothing capacitor will discharge into the load, and the voltage will taper off, instead of dropping to zero immediately. Do you need it to drop to zero immediately?
Ideally the signal would emulate the one coming out of the microcontroller, so the drop to zero would be as fast as possible...

The idea behind a buck voltage regulator was that the power could be controlled with another pwm signal with the pic(changing the duty cycle)...
however for me to maintain the shape would be easier with a simple switch...

Hopefully I have explained myself better.
thanks a lot everyone
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
The voltage of the signal that comes out of the pic is as you all know 5v and the current is 0.5A max, i think...

Probably closer to 0.05A, and even that would be pushing it.

The equipment that serves as the load has the following characteristics:
voltage:[0-4]V
current:[0-3.5]A
max power around 15 watts
Yeah, but we need to know what the load is, because it really does make a difference.

Ideally the signal would emulate the one coming out of the microcontroller, so the drop to zero would be as fast as possible...
Which "drop to zero" do you mean. Are toy referring to the fall time of the individual pulse, or the change in duty cycle?

The idea behind a buck voltage regulator was that the power could be controlled with another pwm signal with the pic(changing the duty cycle)...
however for me to maintain the shape would be easier with a simple switch...
That's not making much sense to me

Hopefully I have explained myself better.
Not really.

Start by describing what you're trying to do, not how you think you'll do it and what effects you think it will have.

Something like: "I want to vary the amount of power going to a motor"
 
Yeah, but we need to know what the load is, because it really does make a difference.
It is a methanol electrolyzer prototype. Basically it receives DC power and breaks the methanol molecule into gas bubbles(H2 and CO2).
What I mean to do is to see if I can get the efficiency("volume of gas produce"/power delivered) of the reaction to rise by testing different power supplies to the electrolyzer, changing the parameters described in my previous post.


Which "drop to zero" do you mean. Are toy referring to the fall time of the individual pulse, or the change in duty cycle?
I was speaking of the fall time.


All of you have been very patient, thank you

My message is in red
 

KrisBlueNZ

Sadly passed away in 2015
OK, you need a variable buck regulator feeding a high-current switch.

You can't really control the buck regulator by generating the control signal for its chopper transistor or MOSFET directly with the MCU. The regulator's control IC needs to do this. You CAN control its output voltage using a PWM signal from the MCU, but you need to convert it to a control voltage by smoothing it. Alternatively you can use a DAC if the MCU has one built-in, or an external one if it doesn't. The control voltage can be fed into the regulator's control IC through the feedback loop, so the regulator's output voltage can be varied over a certain range under control of the MCU.

The regulator will have significant smoothing capacitance on its output, which will always stay at the selected voltage. This voltage then needs to be passed through a switch - a high-current MOSFET is best for this. The switched voltage can have a small amount of smoothing capacitance, but not much. The heavy current drawn by the electrolyzer will cause the voltage to drop quickly when the switching MOSFET turns OFF.

For the power regulator, you can use a preassembled module such as those available cheaply on eBay. Choose one that's rated for substantially more current than you expect to need, with an output voltage that's variable over the range that you want. You will need to modify it to make the output voltage controllable by the MCU. Or you might just want to set it manually using the trimpot for each test run.

The easiest way to arrange the switching MOSFET is to use an N-channel MOSFET switching the 0V rail of the circuit onto the negative wire to the electrolyzer, with the positive electrolyzer connection permanently connected to the positive output of the regulator. You can get "logic level" or "low Vgs" MOSFETs that can be fully turned on with only 5V gate voltage, which can be provided directly from an MCU output (although a high-current buffer of some kind is a good idea to make the MOSFET switch quickly and minimise its power dissipation during switching).

Any comments, Steve? Should I make some part recommendations?
 
Last edited:
Thank you very much KrisBlue.
I was wondering where to get the current needed. I'm a bit green at this, sorry.

I´ll process the info you handed me and start some simulations ASAP.

Again, sorry for my failures communicating the problem. It's definitely something I should work on.

If any of you has something to add to what was said, I'll be glad to hear it.
thanks
 

KrisBlueNZ

Sadly passed away in 2015
The best source of low-voltage DC at high current is a mains-powered switching supply. There are tons of them available through eBay, though I can't vouch for the quality of any of them! It needs to provide at least a few volts more than the maximum voltage you want to apply to your electrolyzer. You might want to go for a standard voltage like 12V, or use a laptop power adapter which is typically 19V.

The variable buck regulator will boost the current proportionally as it reduces the voltage, so if your maximum electrolyzer voltage/current is 4V and 4A and your intermediate DC rail is 12V, the current drawn from the 12V rail will be less than 2A. (If the variable buck regulator was 100% efficient, it would only draw 1.333A from the 12V rail, but efficiencies are typically only 75~85%.)

You can also derive your MCU power from the output of the mains supply, through a simple linear regulator such as a 7805.

Re communication inadequacies... We get that a lot here. It's a combination of various factors. But you will always get the best advice if you start with full disclosure :)
 
Thanks again Kris... Lots of information for me to absorb - and I'm not saying that like it's a bad thing!
 
Top