L293D TOGETHER SOLVED

hello,i have 2 aircores and 2 L293D half bridge an i wonder if i can connect the L293 together

i wonder if i can connect the L293 together

No you don’t connect them together you connect the output of each to each end of the coil, assuming that is what you mean by aircores.

well actually i have 2 aircores from 4 wires each,

and i want to save pins fron arduino

Yes but what is an aircore?

http://www.google.gr/imgres?imgurl=http://www.mikesflightdeck.com/images/commercial_aircore1.jpg&imgrefurl=http://www.mikesflightdeck.com/instruments/diy_aircore_instruments.html&h=336&w=446&sz=84&tbnid=03BvWaN0AC4ecM:&tbnh=90&tbnw=119&zoom=1&usg=__9lKs2e22vQqVs5b1l0arfjHOBRw=&docid=N4I5SqtbKiGOsM&sa=X&ei=UDeBUZXfKcGQtAamjoGQAw&ved=0CFUQ9QEwBQ&dur=987

this one is aircore and used for instrument cluster

Thanks for the link. No you can't drive this with a half bridge. That indicator needs analogue voltages and a H-bridge only gives you connecter to full voltage or its reverse.

thanks for reply

well someone with this this code it make it work

int rpm;
int Speed;

char kind_of_data;

//******************** calibrate neddles here ********************

int speed_LOW = 17;
int speed_HIGH = 165;
int rpm_LOW = 0;
int rpm_HIGH = 230;

//******************** calibrate neddles here ********************

void setup(){

Serial.begin(115200);

pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(14, OUTPUT);
pinMode(15, OUTPUT);

//calibration();
}

void loop()
{
//****************************** READ DATA FROM SERIAL ******************************
while(Serial.available() > 0)
{

kind_of_data = Serial.read();
if (kind_of_data == ‘R’ ) Read_Rpm();
if (kind_of_data == ‘S’ ) Read_Speed();

}
//****************************** READ DATA FROM SERIAL END ******************************

}

void Read_Rpm(){

delay(2);
int Rpm100 = Serial.read()- ‘0’;
delay(2);
int Rpm10 = Serial.read()- ‘0’;
delay(2);
int Rpm1 = Serial.read()- ‘0’;

int rpm = 100Rpm100 + 10Rpm10 + Rpm1;

setAircore(map(rpm,127,255,rpm_LOW,rpm_HIGH));

}

void Read_Speed(){

delay(2);
int Speed100 = Serial.read()- ‘0’;
delay(2);
int Speed10 = Serial.read()- ‘0’;
delay(2);
int Speed1 = Serial.read()- ‘0’;

Speed = 100Speed100 + 10Speed10 + Speed1;
analogWrite(9,map(Speed,127,255,speed_LOW,speed_HIGH));
}

void setAircore(float pos){

float sinCoilValue = 255sin(pos/40.58);
float cosCoilValue = 255
cos(pos/40.58);

if (sinCoilValue<=0) {
digitalWrite(14, LOW);
digitalWrite(15, HIGH);
}
else {
digitalWrite(14, HIGH);
digitalWrite(15, LOW);
}
if (cosCoilValue<=0) {
digitalWrite(8, LOW);
digitalWrite(4, HIGH);
}
else {
digitalWrite(8, HIGH);
digitalWrite(4, LOW);
}

sinCoilValue = abs(sinCoilValue);
cosCoilValue = abs(cosCoilValue);

analogWrite(6, sinCoilValue);
analogWrite(5, cosCoilValue);
}