DFRobot USB Host Shield with DFRobotShop Rover - Conflict on pin 8

I’ve got DFRobot USB Host Shield with DFRobotShop Rover. And i try to make it work with PS3 dualshock controller.
In that Rover pins 5-8 are used to control the motors.
If i try DFRobotShop Rover alone without any shield attached it works fine: i can control it via serial (W,A,S,D sample sketch). And it doesn’t matter whether i assign “pinMode(i, OUTPUT);” or not - it function the same way in both cases.

Then i plug DFRobot USB Host Shield with bluetooth dongle in it and use the latest USB Host Library ( github.com/felis/USB_Host_Shield_2.0 ).
BT works fine: all samples function properly, i can read all buttons, values.
If i then try to control the motors everything works fine until i try “digitalWrite(8,HIGH);”. There can be 2 variants:

  1. If there were “pinMode(8, OUTPUT);” in setup() then after “digitalWrite(8,HIGH);” USB shield hangs :frowning: If i then send any signal to serial - USB restarts (reinits) and works normally again till “digitalWrite(8,HIGH);”.
  2. If there were no “pinMode(8, OUTPUT);” in setup() then there is always LOW at pin 8 regardless “digitalWrite(8,HIGH);” or “digitalWrite(8,LOW);”: if i say “digitalWrite(8,HIGH);” it acts as if i said “digitalWrite(8,LOW);”. USB Shield doesn’t hang and everything else seems to work fine except that Motor B now has only one direction :frowning: - pin 8 controls the direction.

I dont understand what to do… Rover uses 5-8 pins for motors, USB shield is said to use 9-10 pins. But it seems that there is some conflict on pin 8.
Please, any help!

Thanx for the reply but unfortunately it doesn’t help. Tried 6.8Ah accu at 11V.
I’ll try to connect a keyboard.

Yes. It works now! Thank you.
But nevertheless it’s a hack - not the correct solution.

Hi,

We encountered this issue before. The USB host shield is likely drawing power from the rover main board and is also trying to charge any device connected to it. As such, in order to use the USB host shield, our suggestion is to use a more powerful battery pack capable of simultaneously :

  • powering the DFRobotShop Rover’s motors (~150mA each)
  • providing at least 500mA to the USB host
  • powering the microcontroller at ~250mA
  • power the BT module (about 50mA)

A 7.4V 2000mAh battery or 3.7V 3000mAh+ should do the trick. Disconnect the motors and see if you get enough power to the USB host (be careful with what you connect the other end to since it will be trying to draw ~500mA).

Pin 8 is indeed ins conflict but not really used by the chip (at least not used by Android devices, which i what we tested). Try bending that pin outwards so it is not connected when you insert the shield and see if it helps.

In our experience, it worked just fine once the pin was not connected.