element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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 Toy car trouble
  • 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
  • Replies 14 replies
  • Subscribers 403 subscribers
  • Views 1833 views
  • Users 0 members are here
Related

Toy car trouble

Former Member
Former Member over 13 years ago
Hi guys. I am trying to make a car that drives on its own and avoids dark areas. As of right now, all I am trying to do is make it so that my car can be controlled by the Arduino. I am having trouble doing this with a transistor. Let me walk you through the picture, it is hard to follow otherwise. (Heres a link to the picture, I could not get it to upload to this post.   https://docs.google.com/document/d/1-2Lmc2NAMGC351_IcKcm4nRqQ-cmjmCi68UnDPqj6K4/edit

Ok, first off, the red cord running from the 9V battery gives the entire rail running parallel to the red line power. From there, a small green wire connects power to the left side of the transistor. The middle prong of the transistor runs to the arduino pin 13 (though from the bad camera angle it looks like it runs to ground). A cord connects the right side of the transistor to underneath the car and to all the motors (which can be seen in the second picture below the first one) and then resurfaces on the left side where it connects to the ground rail. The ground rail runs to the ground of the battery and a 1k resistor connects the ground rail to the ground of the arduino. (I think this might be where I am going wrong)

Then, the arduino is running this code

void setup() {               

  // initialize the digital pin as an output.

  // Pin 13 has an LED connected on most Arduino boards:

  pinMode(13, OUTPUT);    

}

 

void loop() {

  digitalWrite(13, HIGH);  

  delay(1000);         

  digitalWrite(13, LOW);  

  delay(1000);            

}

 

So in theroy, the arduino should turn the motors on for 1 second and then off for 1 second continually. But I am getting nothing. If I connect the middle prong of the transistor straight to the power rail, the motors turn on. So I figured maybe the arduino wasnt giving it power, but I hooked up my multimeter inbetween pin13 and the middle prong of the transistor and it does give off 5 volts. I thought maybe 5 volts was not enough, so I hooked up 3 1.5v batteries to test it, and with only 4.5v provided from the batteries, it was enough to make it work.

 

I have no idea what else to test. If you guys have any ideas, please let me know!

  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 13 years ago in reply to dirtdiver +1
    Finally! I managed to get it to work. I switched transistors out (which I had already done one before) and it worked. I think the reason it did not work last time is because I had the wires hooked up backwards…
Parents
  • Former Member
    Former Member over 13 years ago

    When I connect the base of the transistor to a power supply with just a regular wire, the motors turn. But when I connect the base of the transistor to a power supply with a resistor above 10 Ohms, the motors do nothing. Now, when I try to power an LED by connecting the base of the transistor to a power supply with a resistor, it does power the LED. Even if I use very high Ohm resistors. Am I correct in thinking that the motors can not get enough Amperage to run because of the resistors?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • YT2095
    YT2095 over 13 years ago in reply to Former Member

    where is your motor intercept with relation to the transistors emitter or collector, and what sex is your transistor?

    you may have it set up as an emitter follower, if it`s NPN the motor intercept should be between Collector and the + rail, a PNP would be the reverse (but a Low pin would be ON then).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to YT2095

    I am using an NPN and I tried the motor between the collector and the power rail and the other way around. Neither worked image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • YT2095
    YT2095 over 13 years ago in reply to Former Member

    it sounds like your transistor`s defective, and that the only way you get power from a direct feed is exploiting the fact a tranny is just 2 diodes (in effect).

    with your emitter directly down to deck, you should be able to fire up the motor from the base to rail+ with wet fingers even, so the fact you`re getting nothing above 10 Ohms reads like you need a new transistor.

     

    I have to ask (non related) how do you plan on employing a reverse direction for the motor? or do you have something entirely different in mind?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to YT2095

    I put a brand new one in and still had the same problem. My friend suggested using MOSFETs. Do you think that would help? As for reversing the motors, I will just run wire on the to the motors on the right side, set up another transistor to them and have just those motors go backwards. Thus the car will go backwards and turn right.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 13 years ago in reply to YT2095

    I put a brand new one in and still had the same problem. My friend suggested using MOSFETs. Do you think that would help? As for reversing the motors, I will just run wire on the to the motors on the right side, set up another transistor to them and have just those motors go backwards. Thus the car will go backwards and turn right.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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