Controlling frequency of current from roboclaw 2x7A

General discussion of using Roboclaw motor controllers
Post Reply
jaskarangrover
Posts: 4
Joined: Sun Nov 05, 2017 6:55 pm
Controlling frequency of current from roboclaw 2x7A

Post 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.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Controlling frequency of current from roboclaw 2x7A

Post 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.
jaskarangrover
Posts: 4
Joined: Sun Nov 05, 2017 6:55 pm
Re: Controlling frequency of current from roboclaw 2x7A

Post by jaskarangrover »

Great, I am on this. Thank you.

Post Reply