Software > Software

DC Motor

(1/1)

robonerd137:
I am trying to control the speed of a DC motor with a micro controller. Can someone reply with some resources?

nanotechopolis_gr:
you can use PMW !
the functions are:
1)PWM1_Init(constant long frequency) initialize the frequency parameter
2)PWM1_Set_Duty(unsigned short duty_ratio) to set the cycle , the value can be 0...255
3)PWM1_Start() for starting the PMW output
4)PWM1_Stop() for stoping the PMW  output

you can also google it! check this http://www.electrosome.com/dc-motor-speed-control-pic-pwm/ for further details

robonerd137:
thanks so much! this will really help with my project

newInRobotics:

--- Quote from: robonerd137 on July 03, 2013, 10:51:47 AM ---I am trying to control the speed of a DC motor with a micro controller. Can someone reply with some resources?

--- End quote ---
You didn't tell us what microcontroller You are using.

waltr:

--- Quote from: newInRobotics on July 04, 2013, 02:25:57 AM ---
--- Quote from: robonerd137 on July 03, 2013, 10:51:47 AM ---I am trying to control the speed of a DC motor with a micro controller. Can someone reply with some resources?

--- End quote ---
You didn't tell us what microcontroller You are using.

--- End quote ---
Or what programming language.

Or which motor and its specs: Voltage, Current draw.
And if the motor draws more than a few 10's of mA then you need a driver circuit.
Do you the motor to run in both directions (CW & CCW)? or just one direction?
This will determine if a simple transistor switch or a full H-bride is required.

Navigation

[0] Message Index

Go to full version