![]() | ![]() | ![]() |
| | |||||||
| 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? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) | |
| Quote:
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. | ||
| |
| | (permalink) |
| 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??? | |
| |
| | (permalink) |
| 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 | |
| |