So I'm trying to construct this simple motor circuit, where the motor spins and doesn't spin in an alternating pattern. The circuit diagram is attached and the sketch is below.
So obviously the problem is that the circuit isn't working as intended. I took a multimeter and began probing around. I found that:
The motor itself is working. I attached both ends to a plain AA battery briefly and it spun.
At this point, I'm not sure what else could be wrong in the circuit. Any tips on where else I should focus my debugging efforts?
Code:
int motorPin = 9;
void setup() {
// Pin 9 is an output pin
pinMode(motorPin, OUTPUT);
}
void loop() {
digitalWrite(motorPin, HIGH);
delay(1000);
digitalWrite(motorPin, LOW);
delay(1000);
}
- The VDD line is about 5V, but alternates between ~4.7V and 5.0V every second (a little weird).
- The voltage at Pin 9 alternates between 0 and 5V (that's correct).
- The voltage across the motor alternates between 0V and 0.07 volts every second (totally wrong).
The motor itself is working. I attached both ends to a plain AA battery briefly and it spun.
At this point, I'm not sure what else could be wrong in the circuit. Any tips on where else I should focus my debugging efforts?
Attachments
-
43 KB Views: 12