Menu

Topic-icon sdc2130 input pwm frequency

More
4 months 3 weeks ago #29534506 by alan
Hi everyone:

I´m using a sdc2130 controller to drive a couple of motors. I'm using pwm inputs in RC4 (PIN11) and RC3 (PIN 12) conected to an arduino which is generating pwm outputs with 490Hz. I set the capture type for both 11 and 12 pins in pulse width and it worked fine.

Now, I want to replace the arduino with a pixhawk which generates its own pwm outputs, but it is not working.

Help please.

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago #29534509 by Gabriel_Isko
Hello Alan,

You will have to tell me more about the PWM signal generated from the pixhawk, and make sure that the roboteq controller is configured accordingly. The raw pwm input value in pulse width mode represents the pulse width of the signal in microseconds. The Pulse interface then scales that value, based on the minimum and maximum limits you set to a -1000 to 1000 input signal. Please reference section Section 3 of our User Manual .

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago #29534514 by alan
Replied by alan on topic sdc2130 input pwm frequency
Hi Gabriel_Isko, thanks for your reply.

Page 78 of user manual says: "The controller will accommodate any pulsing sensor as long as the pulsing frequency does not exceed 250Hz".

Arduino generates a 490Hz pwm, so I'm wondering why the sdc2130 controller could handle this pwm. I have read that pixhawk generates pwm pulses over 250Hz (I´m still searching info about it).

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago #29534515 by LROBBINS
Hi Alan,

re: Arduino PWM frequency. While Arduino's built-in AnalogWrite function has a fixed PWM frequency (actually 2 different ones depending on pin used) you don't have to use that function. For example, here's one that allows you to use any digital output pin, set any frequency and set any duty cycle. PwmStart . NOTE: there is an error on that page, however. It says "Hz=(periodUsec/1000000)", while it should say "Hz=(1000000/periodUsec). There is a corresponding PwmStop to turn off this signal.

By going into the Atmega registers, it's also possible to modify the "standard" PWM outputs, for example, halving the frequency. See PwmRegisters

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.109 seconds
Go to top