You are powering Vin direct from the motor battery - that's not a good idea, that's very dirty power with spikes and dropouts, all kinds of badness.
Separate power for the Arduino, common the ground with the traction battery at the voltage divider only.