DC Current Sensing and logging question - Page 1
Forum section: electronics / projects

author: IMI4tth3w
author_rank: Contributor
timestamp: July 06, 2018, 04:31:44 pm
content: Hello everyone!I am looking to set up some DC current sensing and logging for my project.-Power Supply is a 600W 48V Meanwell-I have a large solenoid with a resistance of ~2.5ohms. (unknown large inductance)-fly back diode is a 1N4004 400V 4A for keeping back EMF in check-Driver MOSFET is a 30A N-Channel mosfet driven at 12V with a gate driver for an approximate RDs On of 0.019 OhmsI am wanting to measure the current and log it in two places:First at the 48V power supply.Second, directly at the coil.Now the max theoretical current the solenoid will draw is ~19A. Considering this is almost 50W of power, it only sees this for relatively shorter periods of time (~30ms).The power supply is limited to 12.5A, so filter capacitors are needed to keep this solenoid well fed during its pulse on period.I am thinking of using a couple shunt resistors in strategic locations, but i am not 100% sure on what value shunt resistor to use.Some basic math using a 0.002 shunt resistor gives me a voltage of 0.037V across the shunt resistor assuming max current at ~19A. Power dissipation is 0.725W.My worry about this is that the voltage across the shunt resistor is rather low, and i'd be worried of getting noise in the measurements. However, extreme high accuracy is not critical. I have a nice 2 channel scope to measure the voltage as well.Let me know if you have any suggestions for my measurements or if i would be better off sourcing a current clamp. I was even thinking about setting up an arduino to log the data if i wanted to do more than 2 locations at once.Thank you

author: D-Jack
author_rank: Contributor
timestamp: July 06, 2018, 06:00:52 pm
content: If the budget is not too tight I would suggest you use a current transformer or a hall-effect sensor like thishttps://www.digikey.pt/product-detail/en/allegro-microsystems-llc/ACS711KEXLT-31AB-T/620-1482-1-ND/3868202

author: JS
author_rank: Frequent Contributor
timestamp: July 06, 2018, 07:11:09 pm
content: Hi there!As your inductance isn't known you don't know how high the current will go, short pulse makes likely (if the inductance is high) that the inductance predominates over the resistance.1N4004 isn't 4A diode, more like 1A, you will blow the diode and later the transistor if your diode is not beefy enough. You need your diode to be over your 48V plus a safe margin with a current handling which will depend on timing, inductance and other things not specified. I all I can tell from what you said is 20A diode will be enough. 1A not so much, 4A probably not, maybe, but could burn in a failure where the inductor current went too high, as if a pulse was longer than intended for some error.If you have the scope, a signal generator and a resistor you could measure the inductance to at least have a clue.37mV is plenty to work with, you would need an opamp but amplifying 37mV to ~3V isn't a problem. Having it floating around is harder to deal with than the signal level, as common mode plays a big rol in the error.JS

author: rstofer
author_rank: Super Contributor
timestamp: July 06, 2018, 08:56:06 pm
content: The common 50 mV shunt comes to mind. Regardless of the full current rating, it is always reduced to 50 mV, full scale. Like this 50A : 50 mV shunthttps://www.amazon.com/dp/B071QYGVLY/ref=sxts_kp_tr_lp_2Now you need some kind of high side current sense amplifier.https://www.st.com/resource/en/datasheet/tsc101.pdfIt remains an exercise for the reader to keep the differential voltage within +- 60V. That kind of depends on the circuit. It may not be possible for the 50 mV signal to ever reach 60V as long as there is a flyback diode.

author: IMI4tth3w
author_rank: Contributor
timestamp: July 10, 2018, 08:28:06 pm
content: Hello everyone,Thank you very much for the replies.I have updated information:1. The diode 1N4004 is indeed a 1A diode. That was a typo on my part. I have seen other designs using these kinds of coils that have been using these 1N4004 diodes for 20+ years with (assumingly) minimal issues. However, i have no issue with upgrading the fly back diode.2. I have measured the coil's inductance at ~2.36mH in free air, and at full stroke with metal core it measures as high as 12.3mH. (and a more accurate DC resistance of 2.8ohms). But we have a couple different coils with varying resistances and inductances, with some coils at big as 156.7ohms DC resistance and an inductance of 189mH. Some of these coils will also be PWM'd at ~ 1.6kHz to adjust the power.3. the ACS711 hall effect current sensor looks like a great part. Will keep this in mind as it might be a good addition to the final product to monitor the currents in case of failures (as a backup to fusing).Thank you

author: JS
author_rank: Frequent Contributor
timestamp: July 11, 2018, 04:53:03 am
content: With that coil, 2.8Ω and 2.36mH you have a time constant of 42ms, so if you put a pulse of 30ms you will rise up to 49% of the final value, which is about 17.1A. The current on your diode will start from there, I don't know how much apart are your pulses, for sure you need a diode to handle that peak current, the average current will depend on how apart those pulses are.JS

author: IMI4tth3w
author_rank: Contributor
timestamp: July 11, 2018, 08:02:55 pm
content: Quote from: JS on July 11, 2018, 04:53:03 amHi, Thank you for the reply.Looking more at the 1N4004 diode, it appears that it can sustain up to 30A for 8.3ms of surge current. This seems to be more than enough to handle the back EMF, and makes sense as to why they are used as standard in these kinds of designs by others.If i'm pulsing the Coil, it seems that the average current would not only be a factor of how far apart the pulses are, but the duration of the initial pulse as well. If i have a long enough initial pulse to get the coil to steady state current, then start duty cycling the coil at 1.5kHz 50% duty cycle, it will be a much higher average current than if i just immediately went from off to the duty cycling.As for current sensing, i'm still looking at these 0.005 ohm current shuntshttps://www.mouser.com/ProductDetail/66-OAR3R005JLFas well as the 50mV shunthttps://www.amazon.com/gp/product/B071QYGVLY/My real question is on the 50mV shunt, how exactly do i measure the current using my scope? I'm a bit confused how its a constant voltage shunt resistor. Assuming V=IR, with V=50mV and R=?, how can you determine the current? Some examples i've seen using this are measuring current using the current measure setting on a handheld DMM. Since i'm wanting to see the current response on these inductors, i need to see the waveform on the scope so i can analyze it.Edit: What about just using one of these?https://www.amazon.com/Pico-TA018-Current-Probe-Connector/dp/B01HBHNRSG/i know its a bit more expensive, but it seems to be exactly what i'm looking for. BNC right into the scope. Any recommended better priced alternatives?

author: JS
author_rank: Frequent Contributor
timestamp: July 12, 2018, 12:49:26 am
content: 50mV at full scale, 50A 50mV current shunt would be a 1mΩ resistor, rated to work at 50A within specs, considering self geating and temp range. You can go quite a bit higher but specs are not longer warranted. Then you just measure the voltage across the resistor using some amplification stage or the pga of your adc, adjust your gain so the 50mV refers to the nominal current rating of the resistor. For your scope the same thing, choose X1000 A for my example, or the corresponding probe attenuation, make it show amps or volts directly and know what you are looking.1N4004 can handle a single pulse of 30A but average currents of 1A, it can't handle 50% duty cycle of your setup. 50% duty will always lead to the same current, no matter if if you manually tweak care of the transient or not.You could use a current probe if it's just for measuring this time, there are cheaper options, I'm after the Hantek, 40 bux for 65A 20kHz probe seems reasonable. You could get one and you will find it quite handy later if you work in power devices, also safer to probe with those and you obly need to provide a path to clamp to, not adding unnecesary components on the board. There's not much sense in leaving it inside your product, for that a current shunt is the way to go.JS

author: IMI4tth3w
author_rank: Contributor
timestamp: July 12, 2018, 08:37:03 pm
content: Quote from: JS on July 12, 2018, 12:49:26 amThank you for your explanation. The 50mV 50A shunt makes perfect sense now.Interesting info about the 1N4004. Seems that the current probe will be helpful in determining how effective this shunt is, as well as what the application truly requires.I did see the Hantek on the alibaba sites as a cheaper alternative. Just weary of the alibaba sites and would prefer something more reputable. The current probe is merely for testing and circuit analysis, not to be left connected to the circuit. Although it has crossed my mind that using a shunt resistor with a micro controller to monitor current could be beneficial for this project.