TMC6300 BLDC Motor Driver Current Sensing?

Hello!

I am currently using the TMC6300 BLDC Motor Driver and on that board there is a pin “SEN” where current sensing can be seen when connected to an analog pin on a microcontroller (I am using an Arduino UNO).

I need this sense pin to read the current when the motor is moving to control the torque of the motor when it spins. To do this I am using the SimpleFOC library. But the constructor for the function requires two analog pins instead of just the one (I was planning to just hook up the sense pin to one of the analog ones on the Arduino).

I tried to test the sense pin by placing an oscilloscope to the sense pin and it’s ground with the VIN being 8V with the other ground connected to the power supply ground. The oscilloscope picked up no signals from the motor when spun.

I have several questions…
1. What is the actual output of the sense pin? Will is be the current flowing through the motor or will there be other signals that are coming through that pin as well that I need to filter out.
2. What will the other analog channel be hooked up to if there is only one sense pin? Below I provided what the SimpleFOC library says about the in-line current sense through the Arduino.

SimpleFOC website for In-line Current sensing:
// InlineCurrentSensor constructor
// - shunt_resistor - shunt resistor value
// - gain - current-sense op-amp gain
// - phA - A phase adc pin
// - phB - B phase adc pin
// - phC - C phase adc pin (optional)
InlineCurrentSense current_sense = InlineCurrentSense(0.01, 20, A0, A1, A2);
Field Oriented Control algorithm can run with both 2 or 3 phase current measurements. If measuring 2 out of 3 currents, when defining your InlineCurrentSense class put the flag _NC (not connected) to the phase value you are not using.
For example if measuring the current on phases A (analog pin A0) and C (analog pin A1) and not measuring the current on the phase B, then you’ll define your current sense class as:
// InlineCurrentSensor constructor
InlineCurrentSense current_sense = InlineCurrentSense(shunt_resistor, gain, A0, _NC, A1);
Some more examples:
// InlineCurrentSensor constructor
InlineCurrentSense current_sense = InlineCurrentSense(shunt_resistor, gain, _NC, A0, A1); // when measuring B and C phase currents and not measuring A
// InlineCurrentSensor constructor
InlineCurrentSense current_sense = InlineCurrentSense(shunt_resistor, gain, A0, A1, _NC); // when measuring A and B phase currents and not measuring C
// or
InlineCurrentSense current_sense = InlineCurrentSense(shunt_resistor, gain, A0, A1); // when measuring A and B phase currents and not measuring C

I hope I am understanding this correctly and any pointers would be greatly appreciated! :smiley:

The current sense pin requires an amplifier and it is the footpoint of the U/V half-bridges (sorry, it looks like I missed the commit for that section). I can’t remember, but I think when we read the pin directly the peak value was a few mV or less.

Unfortunately, with how the board was designed the signals can’t be read seperately (without modifying the board). The motor can be driven without that feedback loop (in-line current sensing).

I would like to control BLDC 3 phase motors 0802 1800KV used on quadcoptors. The specifcations provided in the description of the SparkFun Brushless Motor Driver TMVC6300 appears to be compatible with the quad motors I intendto use. I have an Arduino Uno rev3. Will this driver work with these motors?

Next time, please create a new topic for your question as it is not related to the original post.

My guess is that it might be able to spin the motors a little. However, as the limitation of the motor driver is 2A (max) at a maximum 11V… even if it is able to get the motors spinning, it propbably won’t be useful for your purposes. This motor driver is more suitable for gimbal motors on quadcoptes (the ones used to control the pan/tilt of a small camera).