• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

interfacing dc motor with 8051


New Member
what u wana....

hi aabbas how r u
what u actually wana do to a dc motor by interfacing with microcontroller


Well-Known Member
Most Helpful Member
hi abbas,

What type of motor do you want to interface?

Example: 12Vdc requiring say, 100mA ?

Do you want to control its speed or just stop and start it?



hey!! you have the same name as me:) where are you located?

how do you intend to control it?using pwm i guess or you just need to turn it on and off?

this is a hardware question?
Last edited:


Well-Known Member
Most Helpful Member

i want dc motor controlled through 8051.

Example: 12Vdc requiring say, 100mA ?

Do you hav a prj to control its speed or just stop and start it?:confused:
You should decide on the motor control you require .

Start/Stop is a simple medium power drive transistor, the transistor base being switched by a 8051 output, via a base resistor.

For Start/Stop and simple reversing a 'H-bridge' is normally used, controlled by ON/OFF Fwd/Rev signals from the 8051.

For the above and SPEED control a 'H-bridge' driven by the 8051 using PWM control signals..

Which is it.? :)


New Member
Hi Eric,

that is correct, I'd like just to add that if bidirectional control is not needed, a MOSFET transistor can be used. There are "logic-level" N-channel MOSFETs (for example RFP3055LE) that can be controlled directly by a logic output. Simple and better solution than a BJT.



New Member
Not to hijack this thread, however I have a question that I believe is in line with this topic so I thought I'd ask it here instead of starting a new thread.

What would you recommend for controlling the speed of a higher current DC motor? The motor is a 100W MY68 model (24V and rated for 6A, 2300 rpm) and I would like to be able to reverse the direction of rotation.

I am thinking about using the PWM module on a PIC18F4550 (or any PIC with PWM capabilities for that matter) and a few power Mosfets in an H-bridge configuration. The problem is I believe sizing components carefully so the system is reliable long term and using adequate protection so that I won't have any components die because of excessive current/heat.
hi silvarblade!

thanks 4 guiding. i m located at Karachi, Pakistan. what about u?

i need code of this prj but when u insert rpm motor will rotate at this speed? i now about its diagram but problem of its code of controlling the duty cycle which is responsible for increasing the speed of motor.

plz help me.
again thanks to all 4 guiding.:(


New Member
hi, cud u pls send the ckt u used to interface the motor with the microcontroller used, i dont know, how to connect the motor with the 8051, pls do it soon, last time i connected, something went drastically wrong, its my most urgent request, pls help...

Latest threads

EE World Online Articles