I’m designing a circuit to control 4 electromagnetic coils and subsequent orientation of a sphere (pic attached below). I’m new to EE but thanks to this forum I’ve learned what and how to utilize PWM signals. I plan on using a L293D shield to send current to the coils; however, I need to be able to limit the current to the coils. The optimal current I need to send should be +/- 300 mA. Per the datasheet the L293D outputs 600 mA max.
My question: Can I simply regulate the current to the coils by the speed function in Arduino?
If not, can I set up my circuit and regulate current using resistors like in the attached pic?
I feel as though I’m underthinking the process. I’d appreciate if anyone could let me know if I’m on the right track.
*note: I’m using an H-Bridge to reverse the direction of the current and thus polarity of the magnetic field to tilt the inside sphere up/down. The servo motors in the picture attached is to simulate coils.
*I plan on powering the L293D w/ a 9v power supply.