Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 19th November 2004, 07:40 PM   (permalink)
Default

Quote:
Originally Posted by fabbie
It seems that the 16F684 is made specifically for A/D conversions and PWM functions seeing the number of I/o it has. But unfortunately, i just bought a 16F876 seeing it has most of the features i require. 8)

I dont really get Nigel tutorial on the PWM though. How isit possible that 2 PWM channels are capable to control forward and reverse of 2 motor. I better ask him this in his support forum
I'll answer it here! - there's one PWM channel per motor, one for right, and one for left. The PWM only controls the speed of the motor, the direction is controlled by either one or two logic ouputs - depending on your specific H-Bridge hardware.

In my tutorial example I give 128 different speeds (which seems more than enough), if the highest bit is '1' (that is, for numbers from 128-255) the H-Bridge is set to reverse. So you have 128 forward speeds (0-127) and 128 reverse speeds (128-255).

This seemed a simple way to do it, and only uses a single byte for both speed and direction control.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 20th November 2004, 02:39 AM   (permalink)
Default

Nigel that was clear from the PWM page but what is not clear is that are you driving two wheels with one motor or are you driving one wheel with one motor.

in a car you have four wheels right! two in the front and two in the rear. and your code will drive two motors. which configuration will be best to drive a car. i mean where will you connect the motors. will the motors be connected to the front wheels or the rear wheels.

or how about one motor driving both the wheels on the left and one motor driving both the wheels on the right.

which configuration will be better???
samcheetah is offline  
Old 20th November 2004, 05:02 AM   (permalink)
Default

Looking at this diagram. 1 input is required for forward and 1 for reverse.
This means that 2 PWM channels are required.
As Nigel mentioned earlier, that the direction is controlled by the inputs not the PWM. But looking at this, it seems the only way to control the speed AND direction is by PWM.
I've seen hbridge driver ICs offering an ENABLE option to input a PWM signal so tha 1 motor i controlled by 1 channel. But i rather build my own circuit.
I cant seem to visualise how does Nigel h bridge cct looks like
fabbie is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 11:24 AM.


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

eXTReMe Tracker