OpenMarine

Full Version: PyPilot works for me!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
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!
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.
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.
(2020-02-18, 02:14 AM)seandepagnier Wrote: [ -> ]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.

Any suggestions? If you haven't figured out yet coding isn't my thing.

Would something more like "return v * 149 / 1000;" be better?

The VNH5019 data sheet says it produces 149 mv per amp.

Thanks
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.
Thanks for the help!
(2020-02-18, 02:12 AM)Opie91 Wrote: [ -> ]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.

Thanks.  I'm currently working on a PCB for my next version, and it'll have a voltage divider for current sense, ie, fix it in hardware. I'm just going to play with resistor values when I bring up the board.  

  https://imgur.com/a/mUiD2ew
  https://www.youtube.com/watch?v=g4VxC4J-EMI

I hope to be able to run stock motor controller code with no changes except for the VNH #define.

The red "dumbbell" shaped components are cuttable/solderable links to help me debug and alter the board.  Fitting everything onto a 10x10cm PCB is a bit of a challenge!
(2020-02-21, 01:43 AM)CapnKernel Wrote: [ -> ]
(2020-02-18, 02:12 AM)Opie91 Wrote: [ -> ]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.

Thanks.  I'm currently working on a PCB for my next version, and it'll have a voltage divider for current sense, ie, fix it in hardware. I'm just going to play with resistor values when I bring up the board.  

  https://imgur.com/a/mUiD2ew
  https://www.youtube.com/watch?v=g4VxC4J-EMI

I hope to be able to run stock motor controller code with no changes except for the VNH #define.

The red "dumbbell" shaped components are cuttable/solderable links to help me debug and alter the board.  Fitting everything onto a 10x10cm PCB is a bit of a challenge!

Those look great, I've been working on a much simpler design (more in my skill set), one for the pypilot and one for the motor controller using a VNH5019


[attachment=790]


Planning on having the pi zero w mounted on the underside of the board and the display/everything else on top in one of these cases: Case
Not cheap, but has a nice door to get inside.


[attachment=791]


Same case for this one too.

Ill be real interested to see yours when it works out.
(2020-02-21, 02:49 AM)Opie91 Wrote: [ -> ]Those look great, I've been working on a much simpler design (more in my skill set), one for the pypilot and one for the motor controller using a VNH5019

That looks nice.  What is the BAS4002A for?  (I could never work it out, or get an answer here)

(2020-02-21, 02:49 AM)Opie91 Wrote: [ -> ]in one of these cases:
Not cheap, but has a nice door to get inside.

That looks nice.  I want something a bit thinner.

(2020-02-21, 02:49 AM)Opie91 Wrote: [ -> ]Ill be real interested to see yours when it works out.

I'll post pics!  Smile
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
Pages: 1 2 3