I followed the example for dc motors basic connection and was able to get my motor working. Then i moved the power to a power supply for the motor while still using usb to power arduino... uSING The basic sketch.. the motor turns on but will not turn off with any number i input... I drew up the connections.. what am i doing wrong here?
6V Motor
270 ohm resistor
pn2222 transistor
n4001 diode
Fritzing diagrams are usually worthless as well as misleading, but yours shows only one wire to the motor. There are probably two wires, and both need to be connected properly.
Next time, please post a hand drawn sketch of the wiring or a very clear photo. We can't see your code, either.
A. Powering via Arduino 5v and ground .. motor works
B. Powering from power supply 5v and ground to motor power on the motor
C. Powering from power supply 5v and ground to motor and integrating with circuit/arduino no bueno.
D. Tried C but also applied ground from digital pwm and still does not work.
pwm 3 and pwm 9 are used in the circuit, the resistor is hot to the touch when everything is powered on. motor does not power. Everything works until i use external power supply output of 5v 10amp.. attaching Schematics to this post code below
Firstly never power a motor from the Arduino 5V rail - you risk frying the entire
Arduino board.
Never power motors and logic chips from the same supply rail and things
should be reliable.
Your circuit is quite wrong (its also hard to follow because you don't arrange things
the conventional way with voltage rails at top and bottom).
This diagram shows how to use an NPN transistor to switch a motor:
Only use 220 ohms, not 1k on the base, and what is labelled 10V is your motor
supply rail (not Arduino 5V). Grounds are commoned at the transistor emitter.
Hi,
Do you have a DMM so you can measure some voltages for us.
Have you got the transistor connected the correct way.
Is your transistor faulty due to the problems you have had.
If the resistor to the base is getting hot, I would say your transistor is faulty.
Can you post a picture of your project so we can see your connections please?
The circuit you have attached make no sense, for a start you have the transistor connected the wrong way round.
Two breadboards. Very confusing.
I assume the transistor is on the transparent board, but I don't see the emitter/ground wire returning to the Arduino.
Leo..
I did connect the arduino ground via the green cable unless you are referring to the additional ground on the analog input side which i will try to add today. If this does not work... than I thoroughly hate Adafruit I thoroughly hate pn2222a transistors and I will go buy a multi-meter (definitely not a FLUKE because they look really hot but I can't afford it) and start pulling some readings to share so that we can determined where my retardation has occurred. Thanks everyone though for your insights.. enjoying the process of learning and smashing my head
Maybe try it old school just temp remove the arduino and put 5 volts to the input resister to the base of transister and gnd to common gnd. This will tell you if your circuit is wired correcly and working without the arduino.