2020-10-06, 10:47 AM
(2020-10-01, 10:54 AM)CapnKernel Wrote:(2020-10-01, 09:29 AM)jamos.tan@gmail.com Wrote: Advantage of VNH5019 is that it seems to have current sense, which would be great.
Your module is an IBT-2 (you can see it on the circuit board). There's no support for this in Sean's code.
The BTS7960 does support current sense (section 4.4.4).
I found a schematic for the IBT-2:
https://elecrow.com/download/IBT-2%20Schematic.pdf
I bought this one:
https://www.aliexpress.com/item/4001351651925.html
The schematic shows 8 1k pulldown resistors. However the IBT-2 I bought (see above) has 8 **10k** resistors, but none of them are connected. So you might want to check this on your module.
(2020-10-01, 09:29 AM)jamos.tan@gmail.com Wrote: determine if my board, or the VNH5019 is better suited for driving it.
If you'd like to try the VNH5019, I have bought several from here:
https://www.aliexpress.com/item/4000046778315.html
Pictures of my autopilot, using the VNH5019:
https://photos.app.goo.gl/kWuzHooS4Fmwunc19
I found a bug in the VNH5019 support in motor.ino, where voltage detection wasn't done right:
Code:@@ -115,10 +115,10 @@ PWR+ VIN
-//#define VNH2SP30 // defined if this board is used
+#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
+#define DISABLE_RUDDER_SENSE // if no rudder sense
// run at 4mhz instead of 16mhz to save power,
@@ -405,10 +405,14 @@ void setup()
#if 1
// setup adc
DIDR0 = 0x3f; // disable all digital io on analog pins
+#ifndef VNH2SP30
if(pwm_style == 2 || ratiometric_mode)
adcref = _BV(REFS0); // 5v
else
adcref = _BV(REFS0)| _BV(REFS1); // 1.1v
+#else
+ adcref = _BV(REFS0)| _BV(REFS1); // 1.1v
+#endif
ADMUX = adcref | _BV(MUX0);
ADCSRA = _BV(ADEN) | _BV(ADIE); // enable adc with interrupts
#if DIV_CLOCK==4
If you'd like to keep using the IBT-2, I suggest you read this, then contact @McNugget for help:
https://hackaday.io/project/168592-openc...-waypoints
There's a link on that page to his (now old) motor.ino which works with the IBT-2.
Me, I'd measure the current of your hydraulic system under different situations, especially at the end of travel, and with lots of weather helm. You could measure high current with something like this:
https://www.aliexpress.com/item/4000776170917.html
Then you can work out whether you need the IBT-2, or whether the VNH5019 will be ok.
(2020-10-01, 09:29 AM)jamos.tan@gmail.com Wrote: I'll dive into what I need extra so I complete the setup
I've found some schematics on Sean's website that are helpful.
If it helps, here's a schematic for an absolute bare-bones autopilot using the VNH5019:
It works, but there's no fault detection or circuit protection. It's useful just as a starting point / proof of concept.
(2020-10-01, 09:29 AM)jamos.tan@gmail.com Wrote: also rises more questions for me
Hope you don't mind.
Not at all, happy to help and answer questions!
Question, looking at chapter 4.4.4 in http://www.benshandelsonderneming.nl/dri...207960.pdf I understand that the IS pins are for current sense, looking at the datasheet: http://www.benshandelsonderneming.nl/dri...ematic.pdf I can see they are connected to pins 5 and 6
Would this "simply" be the case of hooking it up to one of the Arduino's analog pins?