1 / 11

Motor

Motor. TYWu. SN754410. SN754410 Motor Driver IC. L298N. L298N DUAL FULL-BRIDGE DRIVER. L298N. Pin Connections. L298N. Bidirectional DC Motor Control. L298N. Example. L298N. Note

sburt
Download Presentation

Motor

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Motor TYWu

  2. SN754410 • SN754410 Motor Driver IC

  3. L298N • L298N DUAL FULL-BRIDGE DRIVER

  4. L298N • Pin Connections

  5. L298N • Bidirectional DC Motor Control

  6. L298N • Example

  7. L298N • Note • The L298N does not have significant internal protection against spike and other electrical noise. Therefore, diodes and capacitors have been added to the motor control circuitry. These diodes and capacitors protect the motor chip and the rest of the circuit from electrical noise (inductive spikes) generated by the motors.

  8. Experiment • Schematic

  9. Experiment • Picture

  10. Experiment • Sketch int speedPin = 3; // H-bridge enable pin for speed control int motor1APin = 6; // H-bridge leg 1 int motor2APin = 7; // H-bridge leg 2 int ledPin = 13; // status LED int speed_value_motor1; // value for motor speed void setup() { // set digital i/o pins as outputs: pinMode(speedPin, OUTPUT); pinMode(motor1APin, OUTPUT); pinMode(motor2APin, OUTPUT); pinMode(ledPin, OUTPUT); }

  11. Experiment void loop() { digitalWrite(ledPin, HIGH); // status LED is always on // put motor in forward motion digitalWrite(motor1APin, LOW); // set leg 1 of the H-bridge low digitalWrite(motor2APin, HIGH); // set leg 2 of the H-bridge high // just invert the above values for reverse motion, // i.e. motor1APin = HIGH and motor2APin = LOW // control the speed 0- 255 speed_value_motor1 = 127; // half speed analogWrite(speedPin, speed_value_motor1); // output speed as // PWM value }

More Related