This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
servo.current units
#4
(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. 
 [Image: r3fMc3q.png]

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 ?
Reply


Messages In This Thread
servo.current units - by PaddyB - 2021-08-04, 03:11 PM
RE: servo.current units - by seandepagnier - 2021-08-05, 04:50 AM
RE: servo.current units - by PaddyB - 2021-08-05, 09:54 AM
RE: servo.current units - by Andreas29 - 2021-08-05, 07:47 AM
RE: servo.current units - by Andreas29 - 2021-08-05, 11:09 AM
RE: servo.current units - by PaddyB - 2021-08-05, 11:11 AM
RE: servo.current units - by PaddyB - 2021-08-05, 01:25 PM
RE: servo.current units - by seandepagnier - 2021-08-05, 03:45 PM
RE: servo.current units - by PaddyB - 2021-08-05, 04:07 PM
RE: servo.current units - by seandepagnier - 2021-08-05, 07:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)