author
3CommentsJoined September 16th, 2015

Tell us about yourself!

Complete Your Profile
  • Use Arduino with TIP120 transistor to control motors and high power devices

    My circuit drives the the motor, but does not vary the speed. I wonder if its a coding problem? Heres what I wrote;// Define which pin to be used to communicate with Base pin of TIP120 transistorint TIP121pin = 11; //for this project, I pick Arduino's PMW pin 11void setup(){pinMode(TIP121pin, OUTPUT); // Set pin for output to control TIP120 Base pinanalogWrite(TIP121pin, 255); // By changing values from 0 to 255 you can control motor speed}void loop(){ digitalWrite(TIP121pin, HIGH); analogWrite(TIP121pin, 5); delay(2000); digitalWrite(TIP121pin, HIGH); analogWrite(TIP121pin, 100); delay(2000); digitalWrite(TIP121pin, HIGH); analogWrite(TIP121pin, 255); delay(2000); digitalWrite(TIP121pin, HIGH); analogWrite(TIP121pin, 0); delay(2000); }Any ideas most welcome

    Please note I'm using a TIP121, I'm also using a switching mode power supply (set at 9v) and not batteries, my motor is DC 6-15vhttp://uk.rs-online.com/web/p/dc-geared-motors/0420596/

    View Instructable »