0

I am a noob playing around with nodemcu and esp8266. I am trying to control a motor in an automated air freshener. I had been trying to power the motor with board supply but I gave that idea up when I was unable to manipulate the voltage and current. so now I am trying to just use an npn transistor to close the circuit already in place. There's only the battery and the motor in the circuit. How do I use the npn, considering I am using a nodemcu breakout board?

Also if someone has any idea how to power the motor directly, I am all ears;

Link to motor specs: http://szlh-motor.manufacturer.globalsources.com/si/6008851876220/pdtl/Micro-motor/1146386525/500TB-metal-brush-micro-motor.htm

Battery seems to be 2 AA 1.5v in series.

Apologies and regards in advance for the stupid question.

EDIT: Picture of the motor and battery assembly: https://ibb.co/fnMpic

I would rather not change the soldering of the assembly as I might want to put it back

  • Please add the image in-line in your post rather than a link. This will improve your post and it will still be relevant when the link dies. – Transistor Apr 29 '18 at 15:20
  • Please see [this answer](https://electronics.stackexchange.com/a/103232/38335) for related information. – bitsmack Apr 29 '18 at 15:45

1 Answers1

1

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. NPN motor control.

  • When the microcontroller output goes high a current will flow through R1 into the base of Q1.
  • The transistor will turn fully on and, effectively, connect the bottom of the motor to GND. (You could expect to see about 0.2 V drop across the transistor. The rest of the 3 V will be across the motor.)
  • When the micro output goes low the transistor will turn off.
  • D1 protects the transistor from any high-voltages generated by the inductance of the motor at the instant of turn off. It might not be essential with your low powered circuit but it is recommended.
Transistor
  • 168,990
  • 12
  • 186
  • 385
  • I have updated the question. I tried to make the circuit you have given but the current that passed was too low, something like 1/5th of the needed. might be because of how the battery and motor are connected – Antariksha Yelkawar Apr 29 '18 at 15:13
  • Please explain how you know what current is needed and what current you got. The datasheet shows that the motor is rated for 1.5 V to 12 V. At 3 V you can expect 1/4 of rated speed at no load. That's 4000 / 4 = 1000 RPM. – Transistor Apr 29 '18 at 15:23
  • I measured the current while directly connected and when connected through the npn. they differ significantly – Antariksha Yelkawar Apr 30 '18 at 16:10
  • Use numbers rather than adjectives. – Transistor Apr 30 '18 at 18:06