0

I need a suggestion how to sum two PWM signals, PWM 1 + PWM 2 to an output that have them both included.

enter image description here

Questions:

  1. Is this possible? Other suggestions?
  2. What Op Amp do I need to use if I want the output handle heavy load of 12 volt? I'm going to control a large 12 DC motor and the small frequency PWM 2 is going to be the dither signal to make sure that the 12 DC motor is still in a vibrating movement. It reduces friction and makes the 12 DC motor more linear and proportional to the PWM 1 signal.
euraad
  • 1,025
  • 11
  • 30
  • Are the signals different magnitudes? Usually PWM is an On/Off signal at a logic level (3.3V or 5V typically), your "summed" PWM looks to have intermediate values which really isn't PWM anymore, since some of the high levels look to be less than half, and some of the upper levels not really falling to something the other side would consider "low". This may be an X-Y problem... what are you trying to solve? – Ron Beyer Sep 24 '19 at 12:02
  • I think you may have misunderstood something you've read. A sum like that would not work. You need to AND or maybe OR the two digital signals rather than adding the analog voltages. – JRE Sep 24 '19 at 12:04
  • Signals are the easiest to sum if you first convert them to a current. That sounds harder than it is, have a look at: https://www.electronics-tutorials.ws/opamp/opamp_4.html – Bimpelrekkie Sep 24 '19 at 12:04
  • Could you provide a link to whatever gave you the idea? – JRE Sep 24 '19 at 12:06
  • AC-coupling the signals and then using a standard "mixer" arrangement might work? – pjc50 Sep 24 '19 at 12:21
  • @RonBeyer Yes. Different amplitudes. I made this picture with Paint. I want to include noise into PWM signals to control motors and spools. – euraad Sep 24 '19 at 12:30
  • @JRE Practice. I have been controlling hydraulic with a PWM generator and these PWM generator have a tiny PWM genration included. – euraad Sep 24 '19 at 12:31
  • @pjc50 You mean a DAC? – euraad Sep 24 '19 at 12:32
  • @DanielMårtensson no, a mixer, which is what orange1234 has answered – pjc50 Sep 24 '19 at 12:47
  • _"I have been controlling hydraulic with a PWM generator and these PWM generator have a tiny PWM generation included."_ I suspect what you really want to do is dither a high frequency PWM to create a lower frequency variation in the PWM ratio. https://electronics.stackexchange.com/questions/424082/could-someone-explain-dither-signal/424091 – Bruce Abbott Sep 24 '19 at 13:33
  • @BruceAbbott Yes. I want to make the main spool viberating inside the self-resontant area. – euraad Sep 24 '19 at 13:38
  • How are PWM1 and PWM2 being generated, and what are their frequencies? – Bruce Abbott Sep 24 '19 at 13:41
  • @BruceAbbott I don't know exactly what frequency I'm going to use. Perhaps 100-300 Hz. I'm using STM32 with CubeMX. – euraad Sep 24 '19 at 13:59
  • _"I don't know exactly what frequency I'm going to use. Perhaps 100-300 Hz."_ so you are only generating 1 PWM? Where is the other one coming from? – Bruce Abbott Sep 24 '19 at 14:07
  • @BruceAbbott No. I'm generating two PWMs. It comes from another output from the STM32 board. – euraad Sep 24 '19 at 15:00
  • would an EXOR gate achieve what you need? – analogsystemsrf Sep 24 '19 at 15:01
  • @analogsystemsrf No. Sorry. That would not help me. I'm seeking analog output :) Thanks for the reply anyway. – euraad Sep 24 '19 at 15:04

1 Answers1

2

You could try a non inverting summing amplifier.

Non Inverting Summing Amplifier

https://masteringelectronicsdesign.com/the-transfer-function-of-the-summing-amplifier-with-n-input-signals/

You put your two input values on the (+) input. The link also provides the output equation as

enter image description here

If you make all the resistor values the same it should come out as Vout = V1+V2

orange1234
  • 175
  • 9
  • Thats a nice sugesstion. Clean and easy. Thank you. Do you think an good old ua741 will be a good tool to use here? – euraad Sep 24 '19 at 12:33
  • 5
    I think the "good old" uA741 has not been a good tool since a few decades. Use a modern opamp. – Vladimir Cravero Sep 24 '19 at 12:37
  • keep in mind your pwm frequency as well, most op amps are probably fast enough to deal with the average signal but checking the op amp timings is never a bad thing – orange1234 Sep 24 '19 at 12:39
  • Thank you all for your help. I will select another opamp. I will check the frequency. – euraad Sep 24 '19 at 12:43
  • @VladimirCravero LM358 ? – euraad Sep 24 '19 at 12:56
  • @DanielMårtensson if you have difficulties choosing a part number, I suggest opening a different question. Be aware that shopping questions are not allowed here, so you can't ask "what PN do I need for this problem" but rather "what key specs should I be checking to select an opamp for this problem". Good luck! – Vladimir Cravero Sep 24 '19 at 13:20
  • @DanielMårtensson: [Here's why you wouldn't use the "good old 741."](https://electronics.stackexchange.com/questions/304521/reasons-not-to-use-a-741-op-amp) – JRE Sep 24 '19 at 15:05
  • @JRE Thank you. I tried to use a ua741a opamp for a PT100 for servral weeks ago. It works, but it was very nonlinear. – euraad Sep 24 '19 at 15:07