News:

  • October 14, 2025, 12:30:29 PM

Login with username, password and session length

Author Topic: PWM INPUT  (Read 1743 times)

Garyhlucas

  • Hero Member
  • *****
  • Posts: 412
PWM INPUT
« on: September 08, 2022, 01:47:02 PM »
I see we have PWM OUT on the BRX but not in.  We have some ClearPath servos that can output torque via PWM which I suspect they did that way because they made it bidirectional.  We need this for a project.  Suggestion on how to read this?  I am thinking two high speed inputs used as timers and then compared to get percentage range.

Thanks,

Bolt

  • Hero Member
  • *****
  • Posts: 591
Re: PWM INPUT
« Reply #1 on: September 08, 2022, 04:00:48 PM »
Can you use a High Speed Edge Timer (or Counter) along with the attached Interval Scaling?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: PWM INPUT
« Reply #2 on: September 08, 2022, 06:38:20 PM »
If the PWM period is known and fixed, you can do it with a single HS timer and a small bit of math. It If isn't, you can do it with two timers, one rising to falling and one rising to rising, and then use some math to convert to percentage.

That's actually how I tested the PWM function.  ;)
« Last Edit: September 08, 2022, 09:55:52 PM by BobO »
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Garyhlucas

  • Hero Member
  • *****
  • Posts: 412
Re: PWM INPUT
« Reply #3 on: September 08, 2022, 09:05:26 PM »
Yes the period is known and fixed so I?ll try the single timer because I need them for other stuff too.

Thanks,

Garyhlucas

  • Hero Member
  • *****
  • Posts: 412
Re: PWM INPUT
« Reply #4 on: September 09, 2022, 09:19:31 PM »
Single timer works!