Right way to connect battary.

Hi. I have Arduino board and DC motor shield DRV8835 with 2 3-6 volts motors with encoders. What is the right way to power this system with 9.7 volt accumulator? Are any extra parts needed or I can power Arduino and DRV8835 in parallel?

I am asking because if I power it through Usb, the shield is also somehow powered and the system works slowly but properly. And if I power it with 9v accumulator (not a small battary! ) , it works improperly.

You should be able to drive them in parallel so long as the 9V goes to the barrel jack
or Vin on the Arduino.

The VM for the DRV8835 needs to be the 9V supply, the Vcc for the DRV8835 must be the
5V from the Arduino. All grounds common at one point (the DRV8835 board).