element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Help with 3v dc motor
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 9 replies
  • Answers 2 answers
  • Subscribers 393 subscribers
  • Views 1137 views
  • Users 0 members are here
Related

Help with 3v dc motor

Former Member
Former Member over 10 years ago

Hi, I have been attempting to get a 3v DC motor to work with my ardiuno with no luck. Im pretty new to arduino so its probably something stupid simple im missing. I have tried other tutorials on the inter-webs to see if maybe the book i was using had something wrong in it.

http://exploringarduino.com/wp-content/uploads/2013/05/549360-c04f003callouts-copy-150x150.jpg

The link above is the diagram provided by the book.

http://exploringarduino.com/content/ch4/

This link is the online material of the book im using.

arduino 3v dc motor setup - Album on Imgur

This link is of what i have done.

code is below.

-----------------------------------------------------------

const int motor = 9;

void setup() {

pinMode(motor, OUTPUT);

}

 

void loop() {

  for(int i = 0; i < 256; i++){

  analogWrite(motor, i);

  delay(10);

  }

  delay(2000);

  for(int i = 255; i>=0; i--){

   analogWrite(motor, i);

  delay(10);

  }

delay (2000);

}

---------------------------------------------------

 

Alright so everything i have tried so far is switching both the transistor (pn2222a) and the diode around in case i had them the wrong way and that is not the case.

I have measured the output of the transistor thinking that maybe it a was a faulty part and i get ~7 volts which i feel seems high. the transistor also gets really hot to the touch. If i put the multimeter up to any other part(diode, capacitor. motor) I get no volts. If I hook the motor directly to the ground then the motor will run at full speed.

Im pretty lost on what else to do any help will be greatly appreciated if you need better pictures or for me to test something just ask. Thank you in advance.

  • Sign in to reply
  • Cancel

Top Replies

  • ipv1
    ipv1 over 10 years ago +3
    Hello Nathan, I think you might have damaged the 2n2222 in your case which is why there are issues. I have a few recommendations for you to try out if you could. 1. Replace the 2n2222 with a new one and…
  • jw0752
    jw0752 over 10 years ago +1 suggested
    Hi Nathan, I have made this circuit when I went through Jeremy's book so the circuit design is correct. One thing to check is to make sure that you have identified the leads of the 2N2222 correctly. Here…
  • Anonymous-237891
    Anonymous-237891 over 10 years ago in reply to Former Member +1
    Hi, I think you may have fried your transistor. Since your circuit seems right to me I would suggest to do the simple led check. You need: One 1K resistor on the gate which goes to Vcc One led and a 330R…
Parents
  • Former Member
    0 Former Member over 10 years ago

    Thank you for the quick replys I am going to try everything you guys suggested when I get home later but I have one last question. I forgot to say above in the first post that when I take the ground of the motor and ground it with the rest of the circuit it will run at full speed. Is it possible that 9v is to much for the 3v motor when it is solely "attached" to the transistor? Also is there a way I can tell if i have destroyed the transistor?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Anonymous-237891
    0 Anonymous-237891 over 10 years ago in reply to Former Member

    Hi,

    I think you may have fried your transistor. Since your circuit seems right to me I would suggest to do the simple led check.

    You need:

    One 1K resistor on the gate which goes to Vcc

    One led and a 330R resistor on the collector which goes to Vcc

    You also need to put the emitter to the ground.

     

    Then you should be able to make the led brighter by decreasing the gate resistor value (thus increasing the current) or fade the led by increasing it (less current).

     

    Hope this helps. Buy loads of transistor image It won't be the last you fry.

     

    Also I strongly suggest to switch to MOS-fet for fast switching application such as PWM for motor control. This type of transistor commute proportionally to the voltage put on the grid (not the current) which is handy when controlled by a MCU that cannot deliver much current. I strongly recommend you to invest into some BS170 mos-fet (https://www.fairchildsemi.com/datasheets/BS/BS170.pdf), which are perfect for general purpose use with Arduino (Vgs = 2.1 V ->3.3V compatible). If you don't mess up the wiring it is unlikely that you will fry them, keep in mind that the current limit is quite low with those = 1.5A at 3V Vdrain-source.

     

    I can't find what is going wrong with your setup. But I hope you won't be discouraged since electronic is so much fun, and frying stuff is ok, it almost doesn't cost anything at all image

    Good luck !!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Anonymous-237891
    0 Anonymous-237891 over 10 years ago in reply to Former Member

    Hi,

    I think you may have fried your transistor. Since your circuit seems right to me I would suggest to do the simple led check.

    You need:

    One 1K resistor on the gate which goes to Vcc

    One led and a 330R resistor on the collector which goes to Vcc

    You also need to put the emitter to the ground.

     

    Then you should be able to make the led brighter by decreasing the gate resistor value (thus increasing the current) or fade the led by increasing it (less current).

     

    Hope this helps. Buy loads of transistor image It won't be the last you fry.

     

    Also I strongly suggest to switch to MOS-fet for fast switching application such as PWM for motor control. This type of transistor commute proportionally to the voltage put on the grid (not the current) which is handy when controlled by a MCU that cannot deliver much current. I strongly recommend you to invest into some BS170 mos-fet (https://www.fairchildsemi.com/datasheets/BS/BS170.pdf), which are perfect for general purpose use with Arduino (Vgs = 2.1 V ->3.3V compatible). If you don't mess up the wiring it is unlikely that you will fry them, keep in mind that the current limit is quite low with those = 1.5A at 3V Vdrain-source.

     

    I can't find what is going wrong with your setup. But I hope you won't be discouraged since electronic is so much fun, and frying stuff is ok, it almost doesn't cost anything at all image

    Good luck !!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • Former Member
    0 Former Member over 10 years ago in reply to Anonymous-237891

    I most definitely fried it. The pn2222a is what came with my starter kit. Thank you for the part recommendat ion I'll definitely have to stock up on some.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube