Problem with IR and PWM running simlutaneously

Greetings everyone,
I'm new to this, my question maybe be silly. I'm making a very basic kiddish plotter using salvaged components from an old inkjet printer. I uploaded a simple code to plot a square using equal delays for the x and the y motor, which worked perfectly fine. After adding a couple of things to code including PWM the IR receiver starts receiving trash values.
Everything works perfectly fine when I remove the analogWrite() that controls the motor driver's speed. I've been struggling with this for a week, any help is appreciated.

Here's my code-

#include <Servo.h>
#include <IRremote.h>

int IRpow=A3;
int RECV_PIN = A5;
int IRgnd=A4;
const int motxa=3;
const int motxb=4;
const int motya=5;
const int motyb=6;
int speedpin=11;
Servo myservo; 
int speedo;
IRrecv irrecv(RECV_PIN);

decode_results results;
void setup() {
  speedo=400;
  // put your setup code here, to run once:
    myservo.attach(9);
pinMode(motxa, OUTPUT);
pinMode(motxb, OUTPUT);
pinMode(motya, OUTPUT);
pinMode(motyb, OUTPUT);
pinMode(speedpin, OUTPUT);

 pinMode(A3, OUTPUT);
digitalWrite(A3, HIGH);
pinMode(A4, OUTPUT);
digitalWrite(A4, LOW);
 irrecv.enableIRIn();
Serial.begin(9600);
}


void loop() {
 analogWrite(speedpin, speedo); //using PWM to control motor driver's speed
  // put your main code here, to run repeatedly:
  if (irrecv.decode(&results)) { Serial.println(results.value, HEX);

if(results.value==0xE0E040BF){//move paper down

  down();
}
if(results.value==0xE0E040BF){//move paper up

  up();
}
if(results.value==0xE0E0A659){//move chassis left

  left();
}
if(results.value==0xE0E046B9){//move chassis right

  right();
}
if(results.value==0xE0E008F7){engage plotter pen

  pendown();
}
if(results.value==0xE0E048B7){// lift up the plotter pen

  penup();
}
if(results.value==0xE0E048B7){

  stoppa();
}if(results.value==0xE0E0D02F){//reduce speed
if(speedo>300)
speedo=speedo-100;
    
}if(results.value==0xE0E0E01F){//increase speed
if(speedo<300)

speedo=speedo+100;

 
}
    irrecv.resume(); // Receive the next value
  }
 
}

void left(){
digitalWrite(motxa, HIGH);
  digitalWrite(motxb, LOW);
}

void right(){
digitalWrite(motxb, HIGH);
  digitalWrite(motxa, LOW);
}
 void stoppa(){
digitalWrite(motxb, LOW);
  digitalWrite(motxa, LOW);
    digitalWrite(motya, LOW);
  digitalWrite(motyb, LOW);

 }

void up(){
  digitalWrite(motya, HIGH);
  digitalWrite(motyb, LOW);
}

void down(){
  digitalWrite(motyb, HIGH);
  digitalWrite(motya, LOW);
  }
 void pendown(){
    myservo.write(30);
  }
  
 void penup(){
  myservo.write(90);
  }

Components used-
A Servo, motor driver, Arduino, motors, TSOP 1738 IR receiver.

Here's a pic of the project so far-

Capture.JPG

(deleted)

(deleted)