I'm having trouble regarding motor control in a project I'm working on.

It uses an ATMega328 DIP package on a PCB. The motors I'm using are small coreless motors and I'm trying to control them using Si2302ds N-MOS FETs. For the power supply I'm using a 3.7V(4.2V on full charge) Lipo. I've tested this setup with a promini before and the motors turned on and off just fine.

This time I'm having problems with controlling 1 motor out of the 4. I've attached 0.1uF caps across each motor terminal (see schematic). Them control pins used for the motors are pins 3,5,6,9. The problem occurs at pin 3. I tried running the blink program on pin 3 to pulse the motor on and off through the FET but all I get is a bit of clicking from the motor.

Things I've already checked relating to the circuit :

  1. FETs are soldered on correctly and made sure they aren't defective.
  2. Motor works fine prior to connecting it to the circuit.
  3. Disconnected the FET and motor from pin 3 and checked the output. It works fine on its own.

The puzzling thing is that only 1 motor (at pin 3) seems to struggle to come on. The rest work just fine. Also if I try and turn all 4 motors ON, it doesn't work. But if I turn only the 3 working ones on and keep the non-working one off they turn on perfectly.

Is the problem occuring due to noise generated by the motor? What could be the problem? I've attached the schematic to this post below.

enter image description here

  • 1
    Can you interchange any pins / FETs / motors? Eg, exchange the pin 3 and 5 connections to see if another pin drives 3's FET ok, or if 3 can drive another FET ok, and similarly for motors. Oct 26, 2016 at 21:35
  • 1
    Indeed, mix and match would be a good idea. If you mean "pager" type moters they can fail in interesting ways resulting in very high current drain. Also use a scope, or failing that a speaker with DC blocking cap to make sure the pin in question is constantly on - perhaps try a simpler program that does nothing but drive that pin and enter an infinite loop. Oct 26, 2016 at 21:59
  • 1
    What's your clock speed?
    – Dat Ha
    Oct 26, 2016 at 22:01
  • 1
    jwpat7 I have tried driving that motor with Pin 7 but without any luck. Though that is only a digital pin and without PWM capability.
    – SidharthM
    Oct 27, 2016 at 3:48
  • 1
    canadiancyborg I'm using a 16MHz crystal
    – SidharthM
    Oct 27, 2016 at 3:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.