Jump to content
43oh

Current sense layout


Recommended Posts

Hi All,

 

With the help if lgbeno I am laying out an MSP430 based BLDC controller.

 

I wish to add over current protection by taking the output from an INA199 current sense ic into a comparator input on the MSP430.

 

Due to space restraints and general layout niceness I have the MCU diagonally opposite the power input, beside which I have located the shunt resistor.

 

The board is small, 45mm x 35mm so this may be an irrelevant question.

 

My question is:

 

Is it best to locate the sense ic near the MCU, thus reducing the length of the Vout trace but increasing the length of the Vin + and - traces (they would run parallel to each other).

 

Or is it best to locate the sense ic near the shunt and have a longer Vout trace?

 

This is a 4 layer board, gnd-gnd-power-gnd planes. The top side has the high freq traces (20khz pwm and hall inputs). The current sense traces are on the bottom.

 

This is an automotive application so I am trying to make it as immune to electrical noise as possible. Would a small amount of noise even matter for over current protection? I would have safety margins built in.

 

Thanks for the input!

 

Regards, Alec

 

Sent from my GT-I9300 using Tapatalk

Link to post
Share on other sites

My instincts would be to treat it like a crystal and put a good ground pour around the tracks.

 

Keep the high frequencies away from the low frequencies.

 

Use decoupling capacitors wherever you can. Use three decades of caps i.e.: 0.1uF, 1uF, 10uF if it's suitable.

 

Use RF chokes on the power supply if it's suitable.

 

Since it's automotive, I recommend opto-isolation on the GPIO's.

 

BLDC is an engine controller, right? If so then you should know about DIY-EFI.org an diyefi.org.

Link to post
Share on other sites

Hah all good :)

 

For what its worth, I have a ground pour on all layers and have tried to space susceptible traces out enough that the ground pour surrounds them.

 

0.1uf decoupling on all power pins on all IC's, a couple of larger ones on the various LDO's. All diodes and caps on the battery or 12V power supplies are rated to 50V, all on 3.3v are rated to 16V.

 

I have put an TVS across the battery input terminals. Don't know much about them but I think I got it right :) The controller will be connected to the motor by about 5cm of cable, both inside the same sealed enclosure. The only external connection to this controller is the battery and motor, therefore the battery input is the only one I would think need protection?, hence the TVS.

 

Hope I'm taking enough precautions :)

Link to post
Share on other sites

Have you tried to prototype and test your design yet?

 

You can learn so much from that first prototype by beating it up and seeing how it reacts to the various test cases.

 

In other words, go for it! You have everything to gain.

Link to post
Share on other sites

Very weird, im having serious issues trying to reply. Whenever I reply with an embedded image, the post dissapears?...
 
Hi Zeke,
Not yet, alas the opportunity for prototyping is rare with this project. This is being retro fitted to a fertilizer truck down the other end of the country, which I don't have access to.
I have played around a bit with the layout and the traces are now only 10mm long and surrounded by nice ground pours so it shouldnt be a problem.
 
My next question is about TVS diodes :)
 
I had planned on simply putting a TVS diode across the battery input terminals, before the sense resistor. But then I found this in the current sense datasheet and im wondering if I need to change things or will my current scheme work just as well?

 

https://docs.google.com/uc?export=download&id=0B1BqLgL5jaHXWW12X1JoODVhWXM

Link to post
Share on other sites

There has to be some source resistance ahead of the TVS or it's max current will be exceeded and it will fail or be damaged. TVS are tough devices, but they have limits that must not be exceeded.

Thanks, so if I simply add a low value resistor before the TVS I should be ok? I figure this will protect the current sense IC also so I wouldn't need anything like in the current sense datasheet I linked a snippet of? 

Would this be the correct thinking?

Link to post
Share on other sites

Technically, the 10 ohm resistors are ahead of them but not in the way that oPossum is suggesting.

 

From what I can see, a series resistor with the TVS would slow down its transient response. Is that acceptable? I don't know. Normally, this would ask me to select a larger TVS to increase protection but that comes with the price of excessive capacitance added to the line that you are trying to protect.

 

The extra capacitance will negatively impact the tiny signals that this circuit is trying to measure. My conclusion would be to delete the TVS's from the design because the risks out weight the benefits. In fact, I am pretty darn certain that these TVSs will screw it up bad. Of course, I would want to do a thorough analysis of the effects of the TVSs on the signal being measured but I am going on past experiences.

 

This would beg me to try to design in transient protection in a different part of the circuit where it prevents the transients from getting in this deep. I don't know your circuit so I can't make further suggestions.

 

The point is to measure DC current supplied to a brushless DC motor.

What size of motor is it? Torque/Power specs?

What voltage is it running at? 12V right?

What amount of current is it expected to demand?

What environment is it going into? Fertilizer truck right?

What work is the motor doing? Opening/closing a liquid valve or dry gate on the truck?

 

Most of the time, measuring noisy signals is done differentially. This allows the circuit to depend on the CMMR of an op amp to reject the noise induced or conducted on both input lines to the op amp. The design should try to take advantage of this. Presently, the current sense amp is doing this so, in a sense, it will reject the induced/conducted noise that is on both sides of the resistor so that is good.

 

It would be nice to identify the risky bits that you will see on the truck. Wire in a 1 ohm resistor and graph the voltage across it as the motor is cycled. Find the current maximums and minimums that the motor will create. Also, attempt to measure the noise on the 12V supply during this test.

 

I suspect that you will see ground bounce and power supply transients. I do not think they can be eliminated but I do think the circuit can be made immune to them ie: opto isolation.

 

I see diodes of all sorts in the design in my head.

 

I have more questions and comments but I think I have to stop. I might be digging myself a hole because I am so sleepy.

Link to post
Share on other sites

Ok ill try to outline my application a bit more.

 

My customer is building a piece of machinery for a fertlizer truck which requires 4 BLDC motors to spin an attachment (one device per motor). I cant go in to too many details as i'm under NDA's and patents are pending etc etc, but from the motors point of view the attachments are effectively flywheels.

 

The role of my controller is simple. There will be 1 per motor. When power is applied (24VDC from trucks batteries), ramp the motors to 500RPM in 2 seconds and stay there. When power is removed, motors can coast to a stop. That is all.

 

The motor and controller will be housed together in a sealed stainless steel enclosure, with a gland for the power cable to enter. The power come from the battery via a relay and fuse. There are no other external connections. Nearby there will be some 0-10V operated proportional valves but these are on a separate power and control circuit.

 

I have been asked to focus on reliability, so will add over current (hence the current sense) and over temperature protection.

 

The motors are maxon EC Flat 90W which are 48V motors, 2.27A nominal current. The rest of the specs are on the referenced link.

 

At 44RPM/V I will be operating these on 24V at ~47% duty cycle @ 20kHz to give me 500RPM. I could operate them on 12V at ~97% duty but I want the option to operate at max ~1000RPM is customer changes his design and 12V wont allow me to do this.

 

I will be driving the motor using DMN4020LFDE FET's (rated to 8A continuous, 32A pulsed) which will be driven by a FAN7888 with a 12V gate output voltage.

the design is largely based off the work by lgbeno which he has open sourced but with a few alterations to suit my application.

 

Here is the schematic so far. The work in progress is the TVS in the top right. I have chosen the SMA6J24A-TPMSCT

 

Im having trouble posting replies with images embedded, so please excuse me for this link...

 

https://docs.google.com/uc?export=download&id=0B1BqLgL5jaHXZmMyUnpyM3FMZ1k

Link to post
Share on other sites

Thanks, so if I simply add a low value resistor before the TVS I should be ok? I figure this will protect the current sense IC also so I wouldn't need anything like in the current sense datasheet I linked a snippet of? 

Would this be the correct thinking?

The pic you posted has resistors (Rprotect) ahead of the TVS. That is the source resistance I was referring to. Sorry that was not clear. Use the circuit in that pic.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...