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
Need help with current sense/over-current detection
#1
So I've been working at making a motor controller based on an arduino IBT_2 , with BTS79608 mosfets. I'm not an engineer, just a lowly "sous-chef" working from this "cookbook" recipe posted by beholder77 in this thread:

http://forum.openmarine.net/showthread.php?tid=1840

Using beholder77's modified motor.ino, I had good early success running my motor through an arduino uno and this MCU,  but I haven't yet figured out how to enable current sense,  or over-current protection.

I've gone through the modifications in beholder77's motor.ino compared to Sean's motor.ino, and found these changes. Sadly, I don't know enough to translate them into how I should wire a shunt resistor in the right place. Here's that code:


//#define HIGH_CURRENT_OLD   // high current uses 500uohm resistor and 50x amplifier
// otherwise using shunt without amplification

#define shunt_sense_pin 4 // use pin 4 to specify shunt resistance
uint8_t shunt_resistance = 1;

#define low_current_pin 5 // use pin 5 to specify low current (no amplifier)
uint8_t low_current = 1;


Also, there was this modified code in beholder77's motor.ino:

        // high curront controller has .0005 ohm with 50x gain
        // 275/64 = 100.0/1024/.0005/50*1.1
#if defined(HIGH_CURRENT_OLD)
        // high curront controller has .001 ohm with 50x gain
        // 275/128 = 100.0/1024/.001/50*1.1
        v = v * 275 / 128 / 16;
#else
        if(v > 16)
            v = v * 275 / 64 / 16; // 820mA offset
        else
            v = 0;
#endif  

I did try to PM Beholder77, but haven't reached him.

Beholder77 did report that he had current sense working, so I'm hopeful that this will be fairly easy to implement by adding the right kind of shunt in the right place. I've studied Sean's MCU schematic diagrams, but I just don't know exactly where to place the shunt resistor, or how to select the right values for the component.  The motor I'm driving is a pretty light Autohelm 3000 , which draws maybe 3 amps dc. I really need a simple diagram to understand what to put, where. I mean, really simple. Undecided  Big Grin

Help from any direction would be deeply appreciated. Thanks in advance!
Reply


Messages In This Thread
Need help with current sense/over-current detection - by skyeyedoc - 2019-08-28, 04:44 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)