VDO Marelli Idle motor driver

Talleissa tapahtuu
Avatar
longgo
Viestit: 23
Liittynyt: 30.10.2013 13:40
Paikkakunta: Rauma
Viesti:

VDO Marelli Idle motor driver

Viesti Kirjoittaja longgo »

Hi :D
Have you ever try to clean that sh*t VDO Marelli? Yep, is much more easy if you have something to drive it at home. Taking piston out, moving both ways, check for noise and so on.
Here is my "test bench"
- 1 x test board
- 1 x arduino UNO
- 2 x push buttons
- 2 x 10k resistors
- 1 x L293D driver
- some wires

Kuva

Code for arduino is:

Koodi: Valitse kaikki


#define motor_pin_1 2 //arduino digital 2
#define motor_pin_2 3 //arduino digital 3
#define motor_pin_3 4 //arduino digital 4
#define motor_pin_4 5 //arduino digital 5

int spin[32] = {
1,0,0,0,
1,0,1,0,
0,0,1,0,
0,1,1,0,
0,1,0,0,
0,1,0,1,
0,0,0,1,
1,0,0,1
};

void setup(){
  pinMode(motor_pin_1,OUTPUT);
  pinMode(motor_pin_2,OUTPUT);
  pinMode(motor_pin_3,OUTPUT);
  pinMode(motor_pin_4,OUTPUT);
 
  pinMode(8,INPUT);
  pinMode(9,INPUT);
}

void loop(){
     if(digitalRead(8) == HIGH){
                    forward(1,3);
     }
     if(digitalRead(9) == HIGH){
                   backward(1,3);
     }
}

void forward(int rep,int dly){
  for(int x=0; x<rep;x++){
     for(int t=0; t<32; t+=4){
          digitalWrite(motor_pin_1, spin[t]);
          digitalWrite(motor_pin_2, spin[t+1]);
          digitalWrite(motor_pin_3, spin[t+2]);
          digitalWrite(motor_pin_4, spin[t+3]);
          delay(dly);
     }
  }
digitalWrite(motor_pin_1, LOW);
digitalWrite(motor_pin_2, LOW);
digitalWrite(motor_pin_3, LOW);
digitalWrite(motor_pin_4, LOW); 
}

void backward(int rep,int dly){
  for(int x=0; x<rep;x++){
     for(int t=32; t>=0; t-=4){
          digitalWrite(motor_pin_1, spin[t]);
          digitalWrite(motor_pin_2, spin[t+1]);
          digitalWrite(motor_pin_3, spin[t+2]);
          digitalWrite(motor_pin_4, spin[t+3]);
          delay(dly);
     }
  }
digitalWrite(motor_pin_1, LOW);
digitalWrite(motor_pin_2, LOW);
digitalWrite(motor_pin_3, LOW);
digitalWrite(motor_pin_4, LOW); 
}



And some video in "action"
http://www.youtube.com/watch?v=w8tOh3dsAzU
Let the LHM be with you...
Citroen C5 mk2 2.0 16v RFJ
KIA Ceed
Avatar
ds-jekkeri
Viestit: 2666
Liittynyt: 11.08.2010 12:26

Re: VDO Marelli Idle motor driver

Viesti Kirjoittaja ds-jekkeri »

nice project. well done
Miehellä on elämässään yksi suuri valinta; harrastaako huonoja naisia vai huonoja autoja.
zemial
Viestit: 182
Liittynyt: 12.01.2013 10:53

Re: VDO Marelli Idle motor driver

Viesti Kirjoittaja zemial »

Nice. This one is really helpful piece of information.

There are also plug´n´play boards for this driver:

http://www.ebay.com/itm/Mini-Motor-Driv ... SwbYZXejcN

http://www.ebay.com/itm/Motor-Drive-Shi ... SwA4dWLtGO
Avatar
longgo
Viestit: 23
Liittynyt: 30.10.2013 13:40
Paikkakunta: Rauma
Viesti:

Re: VDO Marelli Idle motor driver

Viesti Kirjoittaja longgo »

And to shrink little more the project:
- Atmel tiny 85 (@ 16Mghz / 4.8V - PLL)
- L293D
- 10k , 22k, 220k
- 2x push buttons
- 7805 , 1uF , 10F caps
att85.jpg


Koodi: Valitse kaikki

#define motor_pin_1 0 // pin 5  coil 1
#define motor_pin_2 1 // pin 6  coil 1
#define motor_pin_3 3 // pin 2  coil 2
#define motor_pin_4 4 // pin 3  coil 2

int spin[32] = {
1,0,0,0,
1,0,1,0,
0,0,1,0,
0,1,1,0,
0,1,0,0,
0,1,0,1,
0,0,0,1,
1,0,0,1
};

void setup(){
  pinMode(motor_pin_1,OUTPUT);
  pinMode(motor_pin_2,OUTPUT);
  pinMode(motor_pin_3,OUTPUT);
  pinMode(motor_pin_4,OUTPUT);
}

void loop(){
     int buttonRead = analogRead(A1);
     delay(5);
     if(buttonRead > 10 && buttonRead < 200){
                 backward();     
     }else if(buttonRead > 200 && buttonRead < 600){
                 forward();
     }else{
                 park();
     }
}

void forward(){
     for(int t=0; t<32; t+=4){
          digitalWrite(motor_pin_1, spin[t]);
          digitalWrite(motor_pin_2, spin[t+1]);
          digitalWrite(motor_pin_3, spin[t+2]);
          digitalWrite(motor_pin_4, spin[t+3]);
          delay(3);
     }
}

void backward(){
     for(int z=32; z>=0; z-=4){
          digitalWrite(motor_pin_1, spin[z]);
          digitalWrite(motor_pin_2, spin[z+1]);
          digitalWrite(motor_pin_3, spin[z+2]);
          digitalWrite(motor_pin_4, spin[z+3]);
          delay(3);
     }
}

void park(){
    digitalWrite(motor_pin_1, LOW);
    digitalWrite(motor_pin_2, LOW);
    digitalWrite(motor_pin_3, LOW);
    digitalWrite(motor_pin_4, LOW);   
}
Let the LHM be with you...
Citroen C5 mk2 2.0 16v RFJ
KIA Ceed
Vastaa Viestiin