I am new to Arduino and IoT generally and right now I am trying to build a project consisting of a servo and an infrared receiver. I am also using Freaduino UNO with Mega326P, but as far as I know, there should not be big difference compared to Arduino UNO.
The whole thing works: I press a button on IR remote control, the servo moves. Problem is that the servo does not stay still, even if there is no load on it, makes irritating noises and just seems to be trying to correct its position all the time.
I’m using IRremote Arduino Library (GitHub link) version 2.1.0, Arduino IDE and included servo library.
What I found out (and how I know IRremote causes the problem) is that when I remove
//remoteCtrl is instance of IRrecv remoteCtrl.enableIRIn(); //Start receiving signal via IR receiver
the problem goes away and servo finally “shuts up”.
As IRremote documentation says, I should connect the receiver to digital PWM pin 3 or 9 (pins with timer 2), which I tried both.
I am powering the whole project with power banks, one for Arduino and one for the servo (grounding connected, of course), each outputting 5V and 1A, which should be enough.
Only thing I already found is that someone else already had this issue (GitHub link) and not only with the servo, but the solution is missing, for my case.
What else should I try? What else do you need from me to help?