Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Garyhlucas on September 08, 2022, 01:47:02 PM

Title: PWM INPUT
Post by: Garyhlucas 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,
Title: Re: PWM INPUT
Post by: Bolt on September 08, 2022, 04:00:48 PM
Can you use a High Speed Edge Timer (or Counter) along with the attached Interval Scaling?
Title: Re: PWM INPUT
Post by: BobO 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.  ;)
Title: Re: PWM INPUT
Post by: Garyhlucas 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,
Title: Re: PWM INPUT
Post by: Garyhlucas on September 09, 2022, 09:19:31 PM
Single timer works!