(2021-08-05, 04:50 AM)seandepagnier Wrote: yeah you can change that line to try to get it closer... I thought it was correct for VNH2SP30 although sometimes these parts are defective so it is hard to say. Once you get the amps right it would be good to know what value you used and if nothing else at least I can put a comment in the code.
Thnax, OK so ignoring the driver for a moment, if I put a voltage on to pin A1 there wil be a current value displayed but it seems very low?
0.1v > 0.24
0.2v>0.51
0.3v>0.74
0.4v>1.02
0.5v>1.29
0.6v>1.53
0.7v>1.8
0.8v>2.04
0.9v>2.31
1.0v>2.58
1.1v>2.7
1.2v>2.7
IIRC the analog pin is referenved to 1.1v so will only read up to 1.1v.
Then with the code changed to 'return v * 90 / 34 / 16;', 1.1v>27.07 so that calibration seems low to me, but it works! Next I'll put a simple pwm output sketch on the arduino with a dummy load and see what comes out of the R_IS & L_IS pins with a 1K resister to ground as per their datasheet. But all looks OK though, just a little tweaking needed ??
(2021-08-05, 07:47 AM)Andreas29 Wrote: Hi,
you can take a look here: https://github.com/McNugget6750/pypilot-.../Motor.pdf
You can find the code there too. In the code you´ll find the lines for the current detection.
It´s also possible to look here: https://github.com/AndreasW29 I use the code from Timo with some modifications and with the IBT_2
Best regards
Andreas
Thanks, I did spend a while looking in those & reading your guide PDF - great notes, well done!
Though think I'll stick with the pypilot sketch for now, worked straight way and any new versions should be easy to load.
Ta ?