I’m currently working through this issue as well on my robot. I have discovered that if I add an adjustment value to one of the motors, I can almost get the 2 motors to run at the same speed off 6v battery power. One of the problems you’ll have to deal with is that as the motors go faster or slower, the adjustment value could change.
For example, my motors at 50% cycle have one adjustment number and my motors at minimum power have a different adjustment number.
You are powering your motors from your USB. As mogul pointed out, you likely aren’t giving your motors enough current to run properly.
What mogul was trying to get across was that you may not be feeding your motors enough current to allow them to run properly.
I could be wrong, but, ohms law, E/I*R, would suggest that you may infact not be feeding your motors enough current. You said you were sending 5v into the h-bridge, and you are only seeing about 2.3v at your motors. USB can only supply about 500mA, based on the spec. If my thinking is correct with R being approximately constant, 5v in should see about 5v out of the h-bridge, if the motors are getting the current they require. In your case you are only seeing half the input voltage. Power in has to equal power out, Power = I * E. 5v @ 500mA is going in and you are seeing 2.3v to 2.5v coming out. You have 2.5W going in, so, you must have about that much coming out, I am ignoring losses that are there due to the chip. Really rough calculation says that your motors are trying to draw about 1A of current. Because your USB port is unable to supply both the required voltage and current, the voltage is given up so that the motors can get the current they require.
Oke, so this is what I’m going to try in the next weeks. (Don’t have lots of time, need to learn for my math exams)
Need to get some rechargable AA’s = 1,2v 2700mAh each, to power up the motors. Also am going to try out PWM, seems that will fix my problem and is also fun to experiment with new methods.
BTW, I use the sn754410ne not the L293, I read in a tutorial that it’s not so good etc.etc…