# Difference between a constant DC and PWM

I was wondering what would you get on subtracting a 12V (From 0 to 12V) PWM (50% duty cycle), from a 12V constant DC source?

I am sorry, english is not my first language. I mean that if from an arduino or a comparator, we connect the output pwm to a motor, and other side of the motor to a 12V source, then what kind of voltage drop can we expect across the resistor.

• What exactly do you mean by 12 PWM (50% duty cycle)? If the peak-to-peak voltage 12 V or is the effective voltage 12 V? Either way, you'll get a square wave, but how exactly it will look like depends on the waveform of that 12 PWM (50% duty cycle). Commented Sep 14, 2013 at 20:16
• I am sorry. I meant 0-12V PWM. Commented Sep 14, 2013 at 20:24
• What does subtracting have to do with PWM? What you're asking doesn't make any sense. Commented Sep 14, 2013 at 20:34
• I am sorry, english is not my first language. I mean that if from an arduino or a comparator, we connect the output pwm to a motor, and other side of the motor to a 12V source, then what kind of voltage drop can we expect across the resistor. Commented Sep 14, 2013 at 20:38
• Perhaps you could clarify this with a schematic :) (Ctrl-M in the editor)
– user17592
Commented Sep 14, 2013 at 21:40

I was wondering what would you get on subtracting a 12V (From 0 to 12V) PWM (50% duty cycle), from a 12V constant DC source?

Well half the time you'd get 0V (12V - 12V = 0V) and the rest of the time you'd get 12V (12V - 0V = 12V).

In fact what the subtraction does is invert the squarewave about a mean level of 6V but, because it has a 50% duty cycle it looks exactly the same.

If instead you had a 30% duty cycle (12V 30% of the time) you'd end up with a waveform that has 12V 70% of the time.

• Wonderful! Is it possible, to do a subtraction with hardware? Can an Op Amp Do it? Commented Sep 14, 2013 at 23:44
• @Sherby yes an op-amp can do this but choose a fast op-amp (to preserve good fast edges of the waveform) and remember you can't drive a motor directly from 99.9% of op-amps - it needs a power amp to do this or power transistors. Commented Sep 14, 2013 at 23:53

First, if you're going to drive a 12V motor with an Arduino PWM pin, you need to do something like this.

simulate this circuit – Schematic created using CircuitLab

The voltage across the motor will be 0V at 0% duty cyle, 12V at 100%, and 6V at 50%. That relationship is about as close to linear as the real world gets.
The text passage contains a series of questions and comments related to electrical engineering, specifically about the difference between a constant DC and PWM (Pulse Width Modulation) signals and their interaction. The main question is about the result of subtracting a 12V PWM signal (50% duty cycle) from a 12V constant DC source, and there are additional questions and clarifications provided in the comments.
single_question_with_answer

the main question is clearly stated and an answer is provided in the text, explaining that the result would be a square wave that is inverted about a mean level of 6v.
Given a text passage, determine:
    1. If it contains a mathematical question (including word problems or calculations)
    2. If an answer to that mathematical question is provided in the text

First, describe the content structure you found in 1-2 sentences.

Then provide your analysis in the following format:
TYPE: <one of the following values>
- NO_QUESTION
- SINGLE_QUESTION
- SINGLE_QUESTION_WITH_ANSWER
- MULTIPLE_QUESTIONS
- MULTIPLE_QUESTIONS_WITH_ANSWERS
system
# Difference between a constant DC and PWM

I was wondering what would you get on subtracting a 12V (From 0 to 12V) PWM (50% duty cycle), from a 12V constant DC source?

I am sorry, english is not my first language. I mean that if from an arduino or a comparator, we connect the output pwm to a motor, and other side of the motor to a 12V source, then what kind of voltage drop can we expect across the resistor.

• What exactly do you mean by 12 PWM (50% duty cycle)? If the peak-to-peak voltage 12 V or is the effective voltage 12 V? Either way, you'll get a square wave, but how exactly it will look like depends on the waveform of that 12 PWM (50% duty cycle). Commented Sep 14, 2013 at 20:16
• I am sorry. I meant 0-12V PWM. Commented Sep 14, 2013 at 20:24
• What does subtracting have to do with PWM? What you're asking doesn't make any sense. Commented Sep 14, 2013 at 20:34
• I am sorry, english is not my first language. I mean that if from an arduino or a comparator, we connect the output pwm to a motor, and other side of the motor to a 12V source, then what kind of voltage drop can we expect across the resistor. Commented Sep 14, 2013 at 20:38
• Perhaps you could clarify this with a schematic :) (Ctrl-M in the editor)
– user17592
Commented Sep 14, 2013 at 21:40

I was wondering what would you get on subtracting a 12V (From 0 to 12V) PWM (50% duty cycle), from a 12V constant DC source?

Well half the time you'd get 0V (12V - 12V = 0V) and the rest of the time you'd get 12V (12V - 0V = 12V).

In fact what the subtraction does is invert the squarewave about a mean level of 6V but, because it has a 50% duty cycle it looks exactly the same.

If instead you had a 30% duty cycle (12V 30% of the time) you'd end up with a waveform that has 12V 70% of the time.

• Wonderful! Is it possible, to do a subtraction with hardware? Can an Op Amp Do it? Commented Sep 14, 2013 at 23:44
• @Sherby yes an op-amp can do this but choose a fast op-amp (to preserve good fast edges of the waveform) and remember you can't drive a motor directly from 99.9% of op-amps - it needs a power amp to do this or power transistors. Commented Sep 14, 2013 at 23:53

First, if you're going to drive a 12V motor with an Arduino PWM pin, you need to do something like this.

simulate this circuit – Schematic created using CircuitLab

The voltage across the motor will be 0V at 0% duty cyle, 12V at 100%, and 6V at 50%. That relationship is about as close to linear as the real world gets.
user
The text passage contains a series of questions and comments related to electrical engineering, specifically about the difference between a constant DC and PWM (Pulse Width Modulation) signals and their interaction. The main question is about the result of subtracting a 12V PWM signal (50% duty cycle) from a 12V constant DC source, and there are additional questions and clarifications provided in the comments.

TYPE: SINGLE_QUESTION_WITH_ANSWER

The main question is clearly stated and an answer is provided in the text, explaining that the result would be a square wave that is inverted about a mean level of 6V.