Atmega16A PWM with different motors

Discussion in 'Embedded Systems and Microcontrollers' started by Snarglys, Jan 28, 2013.

  1. Snarglys

    Thread Starter New Member

    Jan 28, 2013
    3
    0
    Hello all,

    I`m currently doing a home project that involves Atmega16A microcontroller and a brushed DC motor. The aim is to drive the motor at different speeds using PWM.

    I did all of the PWM code on the microcontroller and tested it with a plugged in motor. Works fine (turns from slow to fast as the duty cycle increases).

    The catch is that when i change the brushed DC motor to another DC motor it doesnt turn at all.

    The datasheet of the motor which is turning is : http://www.johnsonelectric.com/en/p...e-dc-motors/datasheets/PC200DG-020-metric.pdf

    The datasheet of the motor which isnt turning is:
    http://www.pololu.com/file/download/fa_130ra.pdf?file_id=0J11 (The FA-130RA-18100 one)
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    What are you using to drive the motor? Do you have a motor driver(transistor, H-bridge, power op-amp)? Your first motor draws 250mA at stall, the second draws 2.2A at stall; can your driver handle that current?
     
  3. Snarglys

    Thread Starter New Member

    Jan 28, 2013
    3
    0
    I am using an h-bridge based on L298N chip
     
  4. Snarglys

    Thread Starter New Member

    Jan 28, 2013
    3
    0
    Just a thought: maybe I should feed the driver throught a separate source, lets say a battery connected over the voltage regulator? Because now the driver is fed from the microcontrollers vcc.
     
  5. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    That's a good idea, also, put some capacitors near your microcontroller's Vdd and Vss pins... it's possible that the voltage dip is causing a reset on the uC...
     
Loading...