Posts: 1
Threads: 0
Joined: Mar 2019
Reputation:
0
I received an VNH5019 the other day and trying to wire it up.
It has ENA and ENB but no EN, or is another pin for that?
At the moment pypilot gives voltage error and a few more.
Thanks!
Posts: 177
Threads: 15
Joined: Jun 2017
Reputation:
6
CapnKernel,
If you haven't already figured this out, you can get current sense out of the VNC5019 into the nano with a small code change.
Change this line (around line 790):
return v * 9 / 34 / 16;
to:
return v * .149;
Connect cs on VHH5019 to pin A1 on nano.
The data sheet says it is more accurate at higher currents and I have found that to be true.
Posts: 2,364
Threads: 21
Joined: Jun 2016
Reputation:
75
you might want to be careful using floating point math, it's very slow and can affect timing of other operations but in this case possibly does not matter.
Posts: 2,364
Threads: 21
Joined: Jun 2016
Reputation:
75
There are also results shifted by 4 bits so need to divide 16 also.
So yes, *149 / 1000 / 16, or * 15/1000/16 for no floating point.
Posts: 2
Threads: 0
Joined: Feb 2020
Reputation:
0
Hi All,
I'm currently building a prototype with the setup in this topic as example. I got tinypilot installed on an RPI zero with the MPU 9250 and that is working fine, I can connect to the wifi and can use the web client to control this.
I setup the motorcontroller with a nano and the VNH5019. loaded it with the motor.ino software and made sure these four command line where out of comment.
#define VNH2SP30 // defined if this board is used
#define DISABLE_TEMP_SENSE // if no temp sensors avoid errors
#define DISABLE_VOLTAGE_SENSE // if no voltage sense
#define DISABLE_RUDDER_SENSE // if no rudder sense
connection betweet RPi and arduino is currently via USB cable but the tinypilot shows: "no motor controller" under autopilot errors. Switched out the Arduino allready but same issue.
What am i missing? Side note, I'm not a programmer but do understand the principles zo with a bit off guidance should be able to figure this out?
thanks in advance