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:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
strange behaivour
#28
(2019-11-25, 12:20 AM)seandepagnier Wrote: It might be interesting to try to merge the changes if possible.

Can the IBT_2 be supported with an ifdef without affecting the other supported circuits?

I'll give merging a go.  

Is it worth having a preprocessor var that's the name of the driver, eg "VNH2SP30", "IBT_2".  And could the pin 6 functionality (RC vs H-bridge, which is currently done at run-time) be done with this var too?

(2019-11-25, 01:47 AM)CapnKernel Wrote: I'll give merging a go.  

FWIW here are the diffs between @beholder77's code, and the motor.ino it was apparently derived from (152f648):

  https://gist.github.com/CapnKernel/8b7d5...b7abff8fb0

The version @jim321 posted on August 30 also had these lines:

Code:
@@ -75,6 +75,14 @@
 If incoming data has the correct crc for a few frames
 the command can be recognized.
 
+IBT_2         ARDUINO
+
++5V              5v
+GND              GND
+R_EN+L_EN      D2
+R_IS+L_IS          A1 (with voltage divider)
+L_PWM              D9
+R_PWM              D10
 */
 
 /* vnh2sp30 is supported, but warning, I received 3 boards:

Regarding current sense, my understanding of the BTS7960 is that Is (pin 6) measures the current through the high side switch, so when the low side switch is off, the pin doesn't measure current.  Internally, these are done with current sources.  

The IBT_2 board has two BTS7960s, and we can assume/ensure that both high sides are not on at the same time.  Question: If I just connect the Is signals together, does Kirchoff's node law mean that the current flowing out of that connection (into the voltage divider) is equal to the sum of the two Is signals?  And since one Is signal will always be very small, that this summed signal will faithfully represent the motor current, regardless of direction?  (If so, motor.ino will only need to monitor the one analog pin).

Some of this may answer @skyeyedoc's questions about current sensing...
Reply


Messages In This Thread
strange behaivour - by beholder77 - 2019-06-13, 05:23 AM
RE: strange behaivour - by jim321 - 2019-06-13, 12:02 PM
RE: strange behaivour - by beholder77 - 2019-06-13, 01:48 PM
RE: strange behaivour - by PaddyB - 2019-06-13, 02:37 PM
RE: strange behaivour - by beholder77 - 2019-06-14, 04:18 AM
RE: strange behaivour - by PaddyB - 2019-06-14, 12:19 PM
RE: strange behaivour - by skyeyedoc - 2019-06-17, 01:41 PM
RE: strange behaivour - by beholder77 - 2019-06-17, 05:26 PM
RE: strange behaivour - by skyeyedoc - 2019-07-04, 12:27 PM
RE: strange behaivour - by CapnKernel - 2019-09-30, 05:28 AM
RE: strange behaivour - by skyeyedoc - 2019-06-18, 11:18 AM
RE: strange behaivour - by skyeyedoc - 2019-06-20, 02:41 PM
RE: strange behaivour - by seandepagnier - 2019-07-04, 01:23 PM
RE: strange behaivour - by skyeyedoc - 2019-07-04, 03:37 PM
RE: strange behaivour - by jim321 - 2019-07-04, 04:39 PM
RE: strange behaivour - by rmvdmrl - 2019-07-13, 04:14 PM
RE: strange behaivour - by skyeyedoc - 2019-07-14, 12:15 PM
RE: strange behaivour - by skyeyedoc - 2019-08-28, 07:52 PM
RE: strange behaivour - by seandepagnier - 2019-08-29, 12:16 PM
RE: strange behaivour - by rmvdmrl - 2019-08-30, 01:21 AM
RE: strange behaivour - by skyeyedoc - 2019-08-30, 01:58 PM
RE: strange behaivour - by jim321 - 2019-08-30, 02:05 PM
RE: strange behaivour - by rmvdmrl - 2019-08-30, 04:49 PM
RE: strange behaivour - by jim321 - 2019-09-30, 10:50 AM
RE: strange behaivour - by CapnKernel - 2019-11-24, 02:14 PM
RE: strange behaivour - by jim321 - 2019-11-24, 10:11 PM
RE: strange behaivour - by seandepagnier - 2019-11-25, 12:20 AM
RE: strange behaivour - by CapnKernel - 2019-11-25, 01:47 AM
RE: strange behaivour - by CapnKernel - 2019-11-25, 03:22 AM
RE: strange behaivour - by seandepagnier - 2019-11-25, 02:49 PM
RE: strange behaivour - by jamos.tan@gmail.com - 2021-02-02, 05:17 PM
RE: strange behaivour - by seandepagnier - 2021-02-04, 03:09 AM
RE: strange behaivour - by Pascal - 2021-02-04, 06:15 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)