Page 1 of 1

Controlling frequency of current from roboclaw 2x7A

Posted: Mon Jan 28, 2019 8:25 am
by jaskarangrover
Hi

I am using the roboclaw 2x7A motor controller to supply a sinusoidal current to two Helmholtz coils. I have been able to command a sinusoid but now I want to control its frequency to measure the frequency response of a system. Currently, I have the following parameters in my code

1) time = np.arrange(0,1,0.01)
2) wave = A*sin(2*pi*f*time)
3) time.sleep(0.05) which is run after every time instant after commanding the current to the two coils.

I use rc.Forward and rc.Backward to command positive and negative currents like in the simplePWM example. I would really appreciate your help on this topic.

Jaskaran.

Re: Controlling frequency of current from roboclaw 2x7A

Posted: Mon Jan 28, 2019 11:03 am
by Basicmicro Support
I talked with you on the phone about this. What you want is a function outside of the roboclaw(eg you calculate the next duty cycle and send it to the Roboclaw). It's the calculating of the next value that is the trick(eg its not really a property of the Roboclaw you are looking for support on) so we dont really offer any support publicly for this kind of thing, though I did try to provide you some useful information when you called.

Re: Controlling frequency of current from roboclaw 2x7A

Posted: Tue Jan 29, 2019 7:18 pm
by jaskarangrover
Great, I am on this. Thank you.