Generating AC current in solenoids

Hello

This is my first time here. I recently bought a pair of RoboClaw 2x45A Motor Controllers. I want to supply an AC current riding on top of a dc, to a two paids of solenoids using these motor drivers. My intended application is to generate an oscillating magnetic field in the area between the two solenoids facing each other. It would be great if someone could guide me on how to do this.

Jaskaran.

Hi, Jaskaran.

How easy it will be depends mostly on your solenoid inductance, what kind of AC frequency you need, and if you need to have some kind of closed-loop current control. The motor controllers work at 20kHz, and when you set some speed, you should get a corresponding almost steady current in your coils if your inductance is high enough. As you set different speeds, you will get different currents.

-Claire

Hi Claire

Thank you so much for the reply. So based on your suggestions, I have measured the inductance of my coils and it turns out to be close to 15mH for all of them. I am looking for a frequency from 0.5 Hz to 50 Hz, nothing beyond that range.

It would be wonderful if you could share ideas on how to use motor drivers to generate AC currents. That would be really helpful.

Thanks,
Jackie.

That should be enough inductance for the 20kHz PWM from the controller to even out to a steady current, so if you want to create a sine wave, you can tell the driver to adjust the speed/duty cycle (which corresponds to the current level through the coil) in a sinusoidal pattern at 0.5 to 50Hz. It might be difficult to get a good sinusoidal waveform at the higher end of your range since you would need to send several speed commands per cycle (you would have to send 100 commands per second just to get a 50Hz oscillation, and yo would not have control over the resulting waveform).

-Claire

Hi Claire

Thanks a lot again, however, I am still not sure how to program the logic, what software to use or what interface is accessible to program a desired current profile in the coils. Could you please point me to some existing softwares for controlling currents in roboclaw drivers.

Best,
Jackie.

The RoboClaw does not have any way of loading a program onto it, so you will have to control it either over USB or serial from a computer or microcontroller. You can see more details about those interfaces and code examples in the RoboClaw’s user manual, which we link to on the Resources tab of its product page.

-Claire