0
\$\begingroup\$

I am trying to drive a motor H-bridge, but my control system can only support a 400 Hz PWM signal (black box, can't change it) which gives the motor an extremely loud 400 Hz whine as you would expect.

Is there any way to take the 400 Hz PWM signal and convert it directly to a 25 kHz PWM without passing it through a microcontroller (they are verboten for this project)? I can't put the input PWM into an RC filter because I need to preserve the system's time response.

Any ideas? I did a search on Digi-Key for any IC's that could do this, but came up empty.

\$\endgroup\$
  • 1
    \$\begingroup\$ Get one of those SOT23 MCUs and hide it in heat shrink. No one needs to be the wiser... \$\endgroup\$ – Ignacio Vazquez-Abrams Oct 22 '14 at 15:43
  • 2
    \$\begingroup\$ Drive an integrator with the input pulse width, feed it into a sample and hold, and compare a 25 KHz sawtooth against it to generate your output PWM. \$\endgroup\$ – Chris Stratton Oct 22 '14 at 15:51
  • \$\begingroup\$ I like the integrator idea, what would the sample-and-hold circuit look like? \$\endgroup\$ – Chriszuma Oct 22 '14 at 16:04
1
\$\begingroup\$

You could use a CPLD to measure the incoming duty cycle at 400 Hz and apply it to a 25 kHz PWM generator.

But a microprocessor with two timers would be easier to work with.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

I found a potential solution!

It turns out that there exist PWM-driven DAC chips like this one: LTC2645. If I combine that with this analog-driven PWM generator chip I've used previously (LTC6992), I can drive a new PWM at an arbitrary frequency based on the input duty cycle!

The downside of this approach is that there is still a 2.5 ms delay because the DAC only updates after a full period.

I'm leaving the question open for now in case someone can find a solution with less input delay.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ It's impossible to measure the incoming duty cycle in less than one period. \$\endgroup\$ – Dave Tweed Oct 22 '14 at 16:38
  • \$\begingroup\$ Sort of. If you know the period ahead of time, you could measure just the high time rather than waiting the entire period. It would only help a lot during low duty-cycle operation, but if there's a way to do that it would be better. \$\endgroup\$ – Chriszuma Oct 22 '14 at 16:40
  • \$\begingroup\$ 4-years-later update: This is the solution we ended up going with. It worked great aside from some ground-float issues from the motor driver. \$\endgroup\$ – Chriszuma Aug 9 '18 at 15:35
-3
\$\begingroup\$

You say you can use ICs, so the restriction on microcontrollers makes no sense. A microcontroller is just another IC. Since justification for this arbitrary restriction is not given, we can conclude that it is religious in nature and ignore it.

I would use a micro that has both "input capture" and PWM output. There are many that have both these, including the many of the PIC 16. Use the input capture to measure the incoming PWM duty cycle. Depending on how exactly the hardware works, you may need two input capture modules. One to capture a free running timer on the rising edge, and another on the falling edge. Another option is to use a gated timer so that the timer runs when the incoming PWM signal is high. On the falling edge, you grab the timer value and subtract it from the previous one to get a measure of the PWM high time.

No matter how you use the hardware to get the incoming duty cycle, you use that to adjust the output duty cycle to be the same. Since this is done pulse by pulse, the response should be effectively the same as with the slower PWM. The feedback loop should not be able to tell the difference between driving at 400 Hz directly, or at 24 kHz with your converter in there.

Another advantage of doing this is that the motor will probably run a little more efficiently. The motor coils look inductive to the driving circuit. With the higher switching frequency, there is less time between switching for the inductor current to change. The lower ripple current thru the motor causes less I2R loss. The ripple current at the PWM frequency does nothing to move the motor. It just heats the windings.

| improve this answer | |
\$\endgroup\$
  • 3
    \$\begingroup\$ The restriction on microcontrollers is because it's going in a safety-critical application and the necessary firmware validation procedures would destroy the budget and timing of the project. \$\endgroup\$ – Chriszuma Oct 22 '14 at 16:13
  • 1
    \$\begingroup\$ @Chriszuma That is the kind of detail you need to put in the question. \$\endgroup\$ – Matt Young Oct 22 '14 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.