Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Robotics Chat


Robotics Chat Specific to discussions about robots and the making of.

Reply
 
Thread Tools Display Modes
Old 2nd March 2003, 11:43 AM   (permalink)
New Member
aakash is on a distinguished road
Default DC motor control with direction and speed by serial port

Hi, I want to control a dc motor with serial port.
The speed should vary according to value at serial port.
1 to 7 bits for speed control
8th bit should control the direction of the motor. 1-CW,0-CCW

Please help me
Its urgent for my UG project.
I am mechanical student and an electronic newbie
aakash is offline   Reply With Quote
Old 2nd March 2003, 12:00 PM   (permalink)
Super Moderator
 
kinjalgp is on a distinguished road
Default

Hi,
First of all you'll require a serial to parallel converter to convert your serial data from serial port to parallel, then digital PWM generator which will change the pulse width (and finally the average DC voltage across the motor) depending upon the output of serial-to-parallel converter and finally a H-bridge to drive the motor in either direction.
Or the other option is to use a microontroller which will directly generate PWM pulses to drive H-bridge. But that will require a knowledge of assembly programming and since you are a mech. student I won't suggest you to go for it.

I would like to say that you are making things more complicated out over here. If you use parallel port, it will remove the serial to parallel stage.
__________________
"There is no way to peace, peace is the way!"
kinjalgp is offline   Reply With Quote
Old 2nd March 2003, 01:12 PM   (permalink)
Experienced Member
 
bogdanfirst is on a distinguished road
Default

yes, but serial is easier to send by radio or something else.
but if your robot will be controlled with a cable, i suggest you go for paralel. the programming is easyer too.
bogdanfirst is offline   Reply With Quote
Old 3rd March 2003, 04:52 PM   (permalink)
Super Moderator
 
mechie is a jewel in the roughmechie is a jewel in the rough
Default Microcontroller ?

How about an RS232 line driver (for voltage shifting).
Serial data (now 0 -- 5v) into microcontroller.
Microcontroller decodes (simple shift register job) to parallel.
Microcontroller uses 7 bits to output an analogue (128 steps) value for speed to a power transistor as an emitter follower (allows higher current).
Microcontroller outputs 8th bit to a relay for reversing the motor.

If the microcontroller can output analogue then magic, if not then build a simple D-A with 7 binary-weighted resistors and an op-amp buffer.

The lot could be as small as 3 off 8 pin ICs and a transistor. Hey, if this is single direction RS232 then skip the line driver and use a resistor and zener ?

I was thinking of suggesting my old favourite the 6402 UART and a host of other bits but the above could be more elegant ?

##################
What's this thing about serial being harder to program than parallel ?
I reckon the opposite is true, my pocket PC serial port is easy in BASIC, I just send it a number or character. The parallel port (printer) is unreachable!
Similar thing on my Sinclair ZX81 (now in storage) and Amiga A500+; all proper computers, not like this Windoze/Intel conspiracy !!
##################
__________________
I need a memory upgrade ...
My head is full !
mechie is offline   Reply With Quote
Old 7th March 2003, 08:21 AM   (permalink)
New Member
aakash is on a distinguished road
Default

yes parallel is easy, but i am driving two steppers with it.
So i guess there is only serial port left for communicaton
aakash is offline   Reply With Quote
Old 7th March 2003, 12:17 PM   (permalink)
Experienced Member
 
bogdanfirst is on a distinguished road
Default

but why do you need 8 bits for 2 steppper motors?
you can use some simple ic to control them only with 4 bits.
do you get me?
then you will have 4 more bits for the other things.
bogdanfirst is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 01:52 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.