constant current sink - Page 1
Forum section: electronics / beginners

author: Boschi
author_rank: Regular Contributor
timestamp: July 12, 2017, 10:12:45 am
content: hi, im tring to measure the value of a high side resistor (in the order of about 100 milli-ohm), and strangely im pretty lucky, it looks like that my Uc has a differential ADC!my main concern is about power rating of the components. the circuit would be something like this:with Rx connected between the battery and the circuit above (its not very clear, once at home ill draw something better) and a current of, lets say, 250mAthe point is that im going to use 0.1W smd resistor, but with very short burst of power (lets say 0.1 sec evry minute).how much energy can tolerate a smd resistor before blowing up?PS the battery voltage would be 8.4V (worst case). and also im going to add another resistor before the transistor to handle another bit of power

author: Rerouter
author_rank: Super Contributor
timestamp: July 12, 2017, 10:42:39 am
content: Ideally you would want an ADC not only with a differential ADC, but internal gain, The other thing your going to have to content with for this method is that by loading the supply, unless your vref is referenced to that same supply will introduce an error,I would do it slightly differently, use some gain, be it an op amp, or otherwise, and use a current that your components can survive, and have a way to measure the supply voltage, so before you load it, you measure the supply, then you switch on your load, measure your load voltage and supply voltage, this allows you to remove any supply resistance from the measurement.

author: vealmike
author_rank: Regular Contributor
timestamp: July 12, 2017, 11:29:45 am
content: Well to answer your question the 0.1W rating is an average continuous maximum power dissipation. There will be limits on the ambient temperature and the size of the copper footprint=. But manufacturers never give peak pulse energy figures.To design reliably, you should aim to keep your peak power well within the maximum continuous rating of any part. The average power you dissipate should be less than half the part's rated maximum.With your figures below, 0R10 and 250mA gives a dissipation of 2.5mW. A 0.1W resistor is fine.Question:Why are you connecting a DAC to the sense resistor in a constant current sink? The voltage across the resistor should not vary very much. It will a teeny bit, but your DAC may not resolve the change.

author: Boschi
author_rank: Regular Contributor
timestamp: July 12, 2017, 07:00:57 pm
content: here we are, with something better (watch the attached image)i added the two high side transistor to avoid injecting 6+V in the atmega while the circuit its disabled (max voltage for all the pin is about 5.2V), and also to reduce the current consumption during off time.how can i do about the two mosfet discharging resistor? just use a separate mosfet to pull them low whitout feeding a voltage in the atmega?Quote from: Rerouter on July 12, 2017, 10:42:39 amthose two are not a problem, because my ADC is integrated in to an atmega 1284, which can do a single ended measurement for the supply voltage and a differential reading for the resistor drop, also i have an internal Vref of 1.1V, 2.54V and the supply voltage (5V). there is also a selectable gain of 1, 10 or 200, so with a 10X gain i should have enough accuracy to read the resistor value.Quote from: Rerouter on July 12, 2017, 10:42:39 ami have no problem with a change of the design, i just want to stay low on the components footprint (and make something that work)Quote from: vealmike on July 12, 2017, 11:29:45 amsorry, this was not very clear.the unknown resistor (Rx) its a power resistor (the wattage here is not a problem) wich the user can change.i just want to know its value, and well, i hope the internal gain of the ADC could make it sensitive enough to read its value.the problem are Rset, Rdrop and the pass element, they would be 0.1W (maybe the transistor a bit more)

author: orolo
author_rank: Frequent Contributor
timestamp: July 13, 2017, 10:34:29 am
content: Have you considered aclassic op-amp current source? It is ground referenced, so you don't need a differential ADC, and the sense voltage will be well below the atmega limit. If you use a dual op-amp, the unused one could be used as a non-inverting amplifier of the voltage across the resistor, avoiding large currents.

author: Boschi
author_rank: Regular Contributor
timestamp: July 13, 2017, 02:20:14 pm
content: No, i cant do in this way.The reason is that my unknown resistor is fixed on the high side, so i have to use a current sink.It exist a single-component differential amplifier? Maybe with enable and a settable gain?Also as a current sink, how bad is a voltage regulator (eg ams1117 ADJ)?Like thermal drift of the reference or anything like that.Inviato dal mio A0001 utilizzando Tapatalk

author: orolo
author_rank: Frequent Contributor
timestamp: July 13, 2017, 07:56:56 pm
content: Quote from: Boschi on July 13, 2017, 02:20:14 pmMaybe an instrumentation amplifier is what you need. Something like theINA332?QuoteIt's all in thedatasheet(page 6). At 25ºC the TC is negative, and the deviation is about +0.3% to -0.2%. Some time ago I foundthesearticlesabout current sources/sinks. The emphasis is on audio, but they provide a lot of information.

author: bson
author_rank: Unknown
timestamp: July 14, 2017, 12:53:59 am
content: What's wrong with the plain old BJT current mirror?

author: not1xor1
author_rank: Frequent Contributor
timestamp: July 14, 2017, 04:29:44 am
content: Quote from: vealmike on July 12, 2017, 11:29:45 amsorry but you are wrongthe typical voltage on the adjust terminal of a TL431 is 2.5V so 2.5V*.25A is .625Wthe needed resistor would be 2.5V/.25A = 10 ohmeven if it were a 0.1ohm resistor you are wrong as the power is I2*R: .252*.1=6.25mWI apologize, I had not read carefully the original post so I had not realized that the circuit is energized just .1s/60s so average power is 1/600

author: Boschi
author_rank: Regular Contributor
timestamp: July 14, 2017, 02:36:59 pm
content: Quote from: bson on July 14, 2017, 12:53:59 ami have never used them, but from what i have seen they have a very high tempco even if the transistor are matched, also very difficult to thermally couple them, and i still have to generate a IrefQuote from: not1xor1 on July 14, 2017, 04:29:44 amare you sure? is the thermal spread fast enough to allow them to survive that power peak? also, 0.1s over 60s is just a example, ill probably try to keep the on time as low as possible (just enough to allow the current source and the instrumentation amplifier to settle and read it with the ADC), and also reduce the off time, a more realistic figure would be 0.01s every 5s, but im not really sure yet.ill probably just stick with 1206 resistor (0.25W), it should be more than adequate.Quote from: orolo on July 13, 2017, 07:56:56 pmthanks for the links, ill watch them better this night.anyway, thanks for the suggestion on the instrumentation amplifier, it is exacly what i was looking forthe INA332 has just a little problem: its supply voltage.its 5V, and the segnal terminal come to Vcc + 0.5V (abs max), which is too low.i have searched a bit by myself and i found theina826, which look intresting but it hasnt a enable pinthere are few things that i dont understand, for example, how the Vos of the ina relate to the output voltage? its just Vos x Gain like a normal op amp or what?also, the minimium output voltage is 0.1V? (P 7, output section, right?)then, given the fact that is not possible to have a reversed polarity on the resistor, its possible to use a mosfet to short (or not) a resistor in order to change the gain factor? in this way the minimium Vout wouldnt be a problem

author: orolo
author_rank: Frequent Contributor
timestamp: July 14, 2017, 08:11:51 pm
content: I think a key question is, what precision do you aim at? Anyway, besides instrumentation amplifiers, you could search for current sense amplifiers.TheINA199goes up to 26V, but has fixed gain (x50, x100, x200) and no shutdown (consumes 100uA max). It is very stable vs temperature and cheap. Similar isINA181.This chip,TS94033looks interesting. Fixed gain of 50, but has enable pin, and interfaces well to a uC.There are a lot of chips to choose from.

author: daqq
author_rank: Super Contributor
timestamp: July 14, 2017, 08:33:18 pm
content: See:http://cds.linear.com/docs/en/datasheet/3080fc.pdf; page 21?

author: Boschi
author_rank: Regular Contributor
timestamp: July 16, 2017, 01:35:23 pm
content: Quote from: orolo on July 14, 2017, 08:11:51 pmafter watching a bit the INA199, i think is perfect. from what i get from the datasheet looks like that if i want to lower the current consumption i can just cut the power input whitout damaging the IC. also, im wrong or i can power it from a lower voltage than the sensing pin(IN+, IN-)?any drawback in powering it at 5V?Quote from: daqq on July 14, 2017, 08:33:18 pmi have already seen the LT3080 (Usupply rules!), but its not whort in this design, i can just use a voltage regulator, its cheaper and easier to find.@orolo: i watched your PDF and they are very intresting but i have to stay away from the discrete solutions, they are not very stable over the temperature range, and a 40 degree temperature rise wouldnt be very strange.about precision... the higher the better, 1% wouldnt be bad, but i can live with 5%.another thing, the INA specify a offset voltage of (max) 150uV referred to input, this mean that to obtain the output offset voltage i have to multiply the Vos in the datasheet by the gain?EDITas a current sink ill just use a AZ1117 ADJ, its cheap (6 cent @50) and its Vref change of few mV over 40 degree