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 1835 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
  • YT2095
    YT2095 over 13 years ago

    I could be wrong, but it looks like your 1K goes to Analog Ref rather than a GND pin from this angle?

    non the less, you should Hard GND the pin, and use the 1K to feed the Base of the transistor instead.

    in fact doing it that way, you should be able to turn your motor on through that 1K (now on the Base) when you take it to the + rail.

    you absolutely MUST have a resistor on the transistors Base, else you have direct paths to the rail that can pop the tranny or Worse, ruin your arduino port.

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

    I could be wrong, but it looks like your 1K goes to Analog Ref rather than a GND pin from this angle?

    non the less, you should Hard GND the pin, and use the 1K to feed the Base of the transistor instead.

    in fact doing it that way, you should be able to turn your motor on through that 1K (now on the Base) when you take it to the + rail.

    you absolutely MUST have a resistor on the transistors Base, else you have direct paths to the rail that can pop the tranny or Worse, ruin your arduino port.

    • 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