user25784: I tried l298n before but its output voltage wasn't high
so I use relay shield but  it seems that the car can only go forward or stop
Can I control the speed and direction of dc motors?

user25643: Using a mechanical relay to control the speed is not a good idea. But you can control the directions.
I prefer you to use Solid state relays (SSR) to do this. Arrange 4 SSR as Hbridge and Use PWM to control the speed.
refer this 
or you can use the devices like this which has direction control as well. 

25784: <p>I tried l298n before but its output voltage wasn't high</p>

<p>so I use relay shield but  it seems that the car can only go forward or stop</p>

<p>Can I control the speed and direction of dc motors?</p>
 25643: <p>Using a mechanical relay to control the speed is not a good idea. But you can control the directions.</p>

<p>I prefer you to use Solid state relays (SSR) to do this. Arrange 4 SSR as Hbridge and Use PWM to control the speed.</p>

<p>refer <a href="http://www.power-io.com/library/appnotes/h-bridge.htm" rel="nofollow">this</a> </p>

<p>or you can use the devices like <a href="http://www.crydom.com/en/tech/newsletters/jan%202013%20-%20solid%20statements%20-%20dc%20motor%20reversing.pdf" rel="nofollow">this</a> which has direction control as well. </p>
