Pages: [1]   Go Down
Author Topic: Weird L293D and SN754410 behaviour  (Read 1314 times)
0 Members and 1 Guest are viewing this topic.
Des Moines IA
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Are friends electric?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been playing with an L293D to make a custom motor control shield (which in the end will probably cost me more than if I just bought one from Radioshack at this rate) but using this configuration:
and this code
Code:
int switchPin = 2;    // switch input
int motor1Pin1 = 3;    // pin 2 on L293D
int motor1Pin2 = 4;    // pin 7 on L293D
int enablePin = 9;    // pin 1 on L293D

void setup() {
  // set the switch as an input:
  pinMode(switchPin, INPUT);

  // set all the other pins you're using as outputs:
  pinMode(motor1Pin1, OUTPUT);
  pinMode(motor1Pin2, OUTPUT);
  pinMode(enablePin, OUTPUT);

  // set enablePin high so that motor can turn on:
  digitalWrite(enablePin, HIGH);
}

void loop() {
  // if the switch is high, motor will turn on one direction:
  if (digitalRead(switchPin) == HIGH) {
    digitalWrite(motor1Pin1, LOW);   // set pin 2 on L293D low
    digitalWrite(motor1Pin2, HIGH);  // set pin 7 on L293D high
  }
  // if the switch is low, motor will turn in the opposite direction:
  else {
    digitalWrite(motor1Pin1, HIGH);  // set pin 2 on L293D high
    digitalWrite(motor1Pin2, LOW);   // set pin 7 on L293D low
  }
}
from

http://luckylarry.co.uk/arduino-projects/control-a-dc-motor-with-arduino-and-l293d-chip/

I can get the motor to work for a few minutes, then it quits (using the 293.  Switching out the 754410 gets me squat.)  The thing is, the motor seems to "want" to run after it quits, and it kind of jumps a little if you push the button after it quits, like it's trying to reverse, but stays locked up.  Is it a logic problem or what? Has anyone else seen this and can it be solved?
Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 200
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Chip in backwards?  Pin1 is nearest to the end with the notch.

For better response post in the motors... forum.
« Last Edit: January 22, 2012, 07:46:02 pm by justone » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


How many volts are you passing into it? The SN754410 has thermal shutdown protection, and I think I read that when its enabled it functions the same as the 'fast breaking' which if you watch will kinda make the motor fidget back and forth.

Logged

Leighton Buzzard, UK
Offline Offline
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

add the capacitor
it needs it
Logged

there are only 10 types of people
them that understands binary
and them that doesn't

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6653
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You're running the motor off of 5V?  (you have the pushbutton wired to the same power as the motor.)
What voltage is the motor rated for?  The chips you're using have a relatively significant voltage drop in each line (1+V), so you get less than 3V out of your 5V supply if the current is at all significant.
Logged

Pages: [1]   Go Up
Jump to: