How to control a servo motor using a PID control with input from current sensor. I am not so proficient in arduino and in coding so can anyone please help me. I want to create a closed loop using pid for controlling servo with current sensor acs70331

Hi,

We will help with code, it is not a case of GIVING you code, but helping you develop it, that way you learn about your project.

Have you got code that makes the servo sweep?

You have code to read the current sensor, now write code to JUST make the servo sweep.
What servo do you have?
Can you post a link to specs/data?

Can you please post a circuit diagram?
How are you going to power your project?

Thanks. Tom... :smiley: :+1: :australia: