Created by
Created March 08, 2012
Last modified March 09, 2012
Tags No tags.

Summary

Not provided.


Description

Not provided.


Comments

This circuit is available on Arduino playground. If you have doughts you can consult the link: http://itp.nyu.edu/physcomp/Labs/DCMotorControl

by pmd.martins
March 09, 2012

Here is the code to program the arduino to test this circuit:

//DC Motor With H-Bridge L293NE or SN754410 //----------------------------------------- // //Author: Pedro Martins // pin 3: Motor Logical pin 2 // pin 4: Motor Logical pin 1 // pin 9: Enable H-bridge //-----------------------------------------

const int motor1Pin = 3; const int motor2Pin = 4; const int enablePin = 9; //----------------------------------------

void setup() { // set all the other pins you're using as outputs: pinMode(motor1Pin, OUTPUT); pinMode(motor2Pin, OUTPUT); pinMode(enablePin, OUTPUT);

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

}

void loop() { //move motor foward digitalWrite(motor1Pin, LOW); digitalWrite(motor2Pin, HIGH); delay(3600); //move motor backward digitalWrite(motor2Pin, LOW); digitalWrite(motor1Pin, HIGH); delay(3600); }

You can also use H-bridge by Toshiba SN754410.

by pmd.martins
March 09, 2012

Leave a Comment

Please sign in or create an account to comment.

Revision History

Only the circuit's creator can access stored revision history.