# Driver- Temp vs Volt Vs Current Sense

Status
Not open for further replies.

#### dknguyen

##### Well-Known Member
I am designing a 3-phase BLDC motor driver right now and have limited space on my pins left.

Although I do have current limiting (ie. comparators) on each of the three phases, I have chosen to also run those readings off to 3 ADC pins to be able to get readings of the motor phase currents (ie. the ability to measure motor currents during flyback as opposed to the battery current which would not allows this but would only require on ADC pin). Because I have chosen this route, I only have two pins left with the following functions:

Now I am left with voltage and temperature. I can't decide on the importance of each- voltage limiting (ie. comparators) would provide faster response when the battery voltage gets too low to shut off everything for protection while voltage sensing (ie. ADC) would allow me to better control the motor (I already have speed measurement though so it would be used for self-calibrating control coefficients used for control system predictions).

Then I have temperature which would be nice to measure though I am not sure what I would do with the readings, but temperature limiting would be much more important though I am not sure how accurately I could measure it- I don't have enough pins for a per-phase or per-transistor temperature sensing. I just have enough pins for one. Not all the MOSFETs have their large heatsinking pins connected to ground either so I am not sure if I could effectively measure the temperature of all the FETs with just a single silicon temperature sensor connected to the ground plane.

Or should I forego measuring motor phase currents for measuring battery current and two extra pins?

What would you guys pick? I'm fairly sure temperature sensing is kind of useless, but temperature limiting could be very important. I am undecided on voltage sensing or voltage limiting, however, and am not certain that I really need to be able to measure the motor phase currents (I already have current limiting on each phase).

#### erosennin

##### New Member
How about if you used a latch and changed between each input when you wanted to read each separate one?

#### dknguyen

##### Well-Known Member
erosennin said:
How about if you used a latch and changed between each input when you wanted to read each separate one?
I would, but I don't have pins left to control a latch. It's also nice for limiting functions like temperature or voltage to have dedicated comparators (Just so they act as fast as possible). BUt I literally only have those two pins left.

I actually do have a single extra pin...the shutdown pin on the FET driver ICs. If I had those connected to comparators, then I could have auto-shutdown whenever the temp or voltage was out of bounds. The problem is the uC would have no idea what happened due to the lack of free lines. It would take the uC a while to figure out what was going on, and when it did the algorithm would interpret it as a stall. I suppose I could lump battery undervoltage, overtemperature, and stall into the same category since they are the most serious failures and stop the motor from being operational for longs periods of time.

Last edited:

#### erosennin

##### New Member
Well... in the original post you said you had implemented current control methods. So if that is working correctly and the enclosure is well ventilated I don't see why the temperature should become high and unmanagable.
So I think you should go with Voltage detection - it would have more use as you already mentioned.
If you are still worried about temperature get a couple of 12VDC low current fans and configure one to blow in air and one to suck air out creating a continuous flow.

#### dknguyen

##### Well-Known Member
Yeah, I was never going to implement tempeature monitoring of any kind at first (for either motor or FETs) because the only reason you would really need to is if the ambient temperature could get high enough that your heat dissipation via current monitoring is no longer effective without knowing ambient.

But I just recently sat down and calculated the switching losses for the FETs and they're pretty high...I was looking at some motor drivers made for RC and I do not understand how they can possibly support 100A (and sometimes 200A!) continuous. THe only way they could be rated that way is if you totally ignored the switching losses and only accounted for conduction losses. For mine the switching losses are about half the power dissipation and the conduction losses are the other half.

#### dknguyen

##### Well-Known Member
Oh pshh...I just realized that I can take the current limiting on all phases and feed them into a single 3-input OR to free up 2 pins on my uC. Originally, I had planned to use 3 separate internal comparators (each having it's own integrated DAC which was much more convenient than an external one), but it turned out the voltage levels of the internal DACs were better suited to other things so I moved the current limiting to some fault pins and added external comparators and DACs...except I moved them as a group of 3 as if they were still each using separate internal comparators. Huzzah.

I also ran into another problem that I would have either way that I Just noticed. THe current monitors have a 0A bias of 2.5V and can measure bidirecitonal current flow. That means they will only trigger the comparator (for current limiting) when the current is flowing in a particular direction (two will measure the same current flow at any one time and will have readings of opposite polarities). Is there an op-amp circuit that is able to remove the 2.5V bias and then output then rectify the signal so it is always positive so that they can trigger the comparator regardless of the direction of current flow through the sensor?

EDIT: Nvm, I just realized that if there are always two readings of opposite polarities, one will always be positive and be able to trigger the comparator if the level gets too high.

Last edited:

#### nickelflippr

You could try Dallas one-wire temp sensors like the DS18S20, for multiple sensors off one pin. At $4-5 each, it can get spendy. #### dknguyen ##### Well-Known Member Most Helpful Member nickelflippr said: You could try Dallas one-wire temp sensors like the DS18S20, for multiple sensors off one pin. At$4-5 each, it can get spendy.
Yeah. I'm wondering whether thermocouples could be used to measure the heatsinks of the FETs. The distance is so short though, but the FETs can get quite higher than ambient temperature, but then again, they are also connected to the same ground plane the cold junction ICS are...so I don't know how effective it will be. I have one for the motor though.

I dont think a lack of temperature difference would cause much problems would it since that just means IC and TC are at the same low temperature? Because I only really care when the FET temperature is much higher than ambient or the ground plane of the PCB since that means overheating.

#### ecerfoglio

##### New Member
dknguyen said:
Yeah. I'm wondering whether thermocouples could be used to measure the heatsinks of the FETs. The distance is so short though, but the FETs can get quite higher than ambient temperature, but then again, they are also connected to the same ground plane the cold junction ICS are...so I don't know how effective it will be. I have one for the motor though.

I dont think a lack of temperature difference would cause much problems would it since that just means IC and TC are at the same low temperature? Because I only really care when the FET temperature is much higher than ambient or the ground plane of the PCB since that means overheating.

Some motors have (over)-temperature protection sensors built into the windings.

They use PTC thermistors, which have a "threshold" temperature, below that temperature they have a low resistance and above it the resistance increases rather quickly.

They put 3 of these thermistors, one in each phase, between the winding wires.

The three thermistors are wired in series and the total resistance is monitored. if one (or more) gets too hot the total resistance goes up and the motor is shut down. They use only one input (comparator or ADC) to monitor it.

#### dknguyen

##### Well-Known Member
I was just going to stick a thermocouple into the brushless outrunner's middle, but I wasn't sure I culd because thermocoples are wires and motor windings conduct! I wonder if I can fit thermistors into the motor.

#### erosennin

##### New Member
Why don't you get a multimeter thermocouple? One like this:
The wires are covered, and I've used one before and they're fairly accurate... I have since upgraded to a stainless steel probe type one...

Edit: You just need to cut off the connector - which I'm sure you already have assumed...

Last edited:

#### dknguyen

##### Well-Known Member
erosennin said:
Why don't you get a multimeter thermocouple? One like this:
The wires are covered, and I've used one before and they're fairly accurate... I have since upgraded to a stainless steel probe type one...

Edit: You just need to cut off the connector - which I'm sure you already have assumed...
That was my plan, except I am now hestitante because for MOSFET junctions, the thermocouple would connect to either Vbat+ or GND, and for the motor it would connect to whatever the motor was connected to, and I'm almost positive the junction on the thermocouple is unsheathed.

#### erosennin

##### New Member
How about if you got an LM35 and touched the sensitive face to the fets and cover the pins in heatshrink?

#### dknguyen

##### Well-Known Member
I was considering doing that with a Maxim DSi except the sensitive face is supposed to be left floating or on ground which gives the same problem as the thermocouple (connecting to +V junctions). THey also have a built in comparator which is nice but I suppose I could always add 3 comparators pretty easily. I suppose i coudl always cover the junction with soldermask and make it contact that way. Do you think it would be accurate enough if I Did that?

THe heatsnks are a bit high off the the pcb though:

But the temperature of the heatsink is probably very close to the copper track connected to the FET's tab anyways so I can just place the temperature sensor there.

I still need a thermocouple though to measure motor temperature though. It'd probably be okay if I just use ont thermocouple for the motor right? Rather than 3, for each phase, even though I am measuring the FETs in each phase separately.

Last edited:

#### Hero999

##### Banned
Does your micro really need to know what's going on all the time?

For example, if the comparator closes down the MOSFET drivers it can switch on an LED or peizo buzzer to indicate there's a fault.

You can use a fulwave precision rectifer biased at 2.5V to overcome the problem of detecting the current flow in both directions.

#### dknguyen

##### Well-Known Member
It's for a robot so I don't need to know that there is a fault so much as the microcontroller has to so that it can tell the computer that is doing the navigating. I also have enough pins on the micro to interrupt on a motor overtemperature and FET overtemperature, I'm just having trouble figuring out how to measure the temperature of the motor (whether measurement of each phase is better with 3 thermocouples, and how to measure the temperature of the FETs- via copper trace or heatsink.) You can't use a thermocouple to measure the part on a PCB can you? Is the length too short for a temperature difference to be effectively formed at both ends? Not to mention it's somewhat of a waste since I'd have to cut up expensive thermocouple wire since I don't know how to butt weld them (or join them at the junction in general).

I figured out the current sensor problem already, thanks. The way the current sensors are connected, one will always be in the unpowered phase (so it's reading will never trigger the comparator), while the other two will always give readings of opposite polarity. Since they all feed into their own comparator which then all feed into a single OR gate, one of active current sensors will always be of the proper polarity to trigger the comparator and send the OR gate high.

Last edited:
Status
Not open for further replies.

Replies
13
Views
3K
Replies
9
Views
4K
Replies
12
Views
5K
Replies
7
Views
2K
Replies
2
Views
6K