PWM on relay output

Moderators: TomKerekes, dynomotion

Post Reply
dropTarget
Posts: 5
Joined: Wed Jan 31, 2018 10:36 pm

PWM on relay output

Post by dropTarget » Thu Dec 06, 2018 9:21 pm

I have a KFLOP/KSTEP setup and would like to output one of the unused KFLOP PWMS (any one of 1-7) on the KSTEP RELAY1 output.
Alternatively, I could add an extra opto board, wire its input to a KFLOP JP6 PWM output and run more connections to my CNC router, but since the relay1 output is already wired all the way to my gantry, it would be really nice if I could simply mux a PWM output to IO1 on the KFLOP.
Is this possible?

Thanks,
RJ Wilcox

User avatar
TomKerekes
Posts: 226
Joined: Mon Dec 04, 2017 1:49 am

Re: PWM on relay output

Post by TomKerekes » Thu Dec 06, 2018 9:45 pm

Hi RJ,

There isn't any such mux option. I assume you are using PWM0 for the KStep Analog output?

You might hardwire a connection from KFLOP JP6 to JP7.

Would a software PWM be fast enough?
Regards,

Tom Kerekes
Dynomotion, Inc.

dropTarget
Posts: 5
Joined: Wed Jan 31, 2018 10:36 pm

Re: PWM on relay output

Post by dropTarget » Thu Dec 06, 2018 10:35 pm

Yes, I'm using PWM0 for analog spindle frequency control.

Both suggestions give me some better possibilities.

If I hardwire a PWM output on JP6 to IO1 on JP7, can I assume that as long as IO1 is never programmed as an output, there will never be an output conflict between the two signals? Or will I need to cut the IO1 trace on JP7?

The PWM software suggestion is intriguing but I don't think it will give me enough resolution at a 1KHz PWM frequency. With a 90us scheduling clock, there would only be 11 possible pulse widths in the 1ms period.

Thanks for the quick response,
RJ

User avatar
TomKerekes
Posts: 226
Joined: Mon Dec 04, 2017 1:49 am

Re: PWM on relay output

Post by TomKerekes » Fri Dec 07, 2018 6:29 pm

Hi RJ,
If I hardwire a PWM output on JP6 to IO1 on JP7, can I assume that as long as IO1 is never programmed as an output, there will never be an output conflict between the two signals?
Yes
The PWM software suggestion is intriguing but I don't think it will give me enough resolution at a 1KHz PWM frequency. With a 90us scheduling clock, there would only be 11 possible pulse widths in the 1ms period.
Do you need 1KHz PWM frequency? You can all use a delta-sigma approach to get better resolution and performance. You might see this article.
Regards,

Tom Kerekes
Dynomotion, Inc.

dropTarget
Posts: 5
Joined: Wed Jan 31, 2018 10:36 pm

Re: PWM on relay output

Post by dropTarget » Sat Dec 08, 2018 2:31 am

I think the hardwired solution fits best. The low frequency PWM is interesting, however. I'll give it some thought.

Thanks again for an excellent product and support,
RJ

Post Reply