OpenMarine
vnh5019 output voltage Issue - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18)
+--- Thread: vnh5019 output voltage Issue (/showthread.php?tid=3172)

Pages: 1 2 3 4


RE: vnh5019 output voltage Issue - seandepagnier - 2021-01-10

haha.. sorry

Yes pwm_style 2 is not for h-bridge, it is for integrated drivers that accept pwm and directions

pwm_style 0 incorporates dead time which is what you should use.


RE: vnh5019 output voltage Issue - kaa39518 - 2021-01-12

latest version moto.ino 
I connected the oscilloscope to the PMW. Filling 25%, and does not depend on the settings servo.speed.max, servo.speed.min.

In the 22-APR-2020 version of moto.ino, everything is perfectly adjustable from almost 0 to 100%


RE: vnh5019 output voltage Issue - seandepagnier - 2021-01-12

since we know the commit that caused your problems, I would apply the patch line by line to find the cause..

I can try to look at this... i'm just focused on other bugs.


RE: vnh5019 output voltage Issue - kaa39518 - 2021-01-13

I experimented today.
When set #define DIV_CLOCK 4 works correctly.
Setting #define DIV_CLOCK 2 or #define DIV_CLOCK 1 does not work correctly.


RE: vnh5019 output voltage Issue - ironman - 2021-01-13

(2021-01-13, 08:00 AM)kaa39518 Wrote: I experimented today.
When set #define DIV_CLOCK 4 works correctly.
Setting #define DIV_CLOCK 2 or #define DIV_CLOCK 1 does not work correctly.

Thanks for checking this out. This would have been my first try last weekend, but I did not have an isolated arduino at my disposal. With your positive test outcome it's opportune to take my pypilot back home to the workbench to do the upgrade.

@Sean why was DIV_CLOCK changed, and what would be the impact of changing it back? Would you accept a pull request for a change that forces DIV_CLOCK to 4 when pwm_style == 2? So it won't affect the other styles and preserves your work?


RE: vnh5019 output voltage Issue - seandepagnier - 2021-01-14

div clock changed because at 8mhz I get better performance.

The best fix won't need to fix the clock but will instead look at all the cases where div_clock is used specific for pwm_style==2 and correct it. I will try to take a look tonight, i think I have enough information to probably find the problem even without using actual hardware.


RE: vnh5019 output voltage Issue - topodom - 2021-01-14

Thanks Sean,

I can test this weekend your update on my workbench, before pushing it in github if it is helpful.


RE: vnh5019 output voltage Issue - seandepagnier - 2021-01-18

I have found the problem and pushed a change to git


RE: vnh5019 output voltage Issue - kaa39518 - 2021-01-18

Thanks Sean!


RE: vnh5019 output voltage Issue - kaa39518 - 2021-01-19

Checked it on the table.
With DIV_CLOCK 2 works great and is adjustable!
Thanks again!