Welcome, Guest
Username: Password: Secret Key Remember me

TOPIC: Current Sensing - Best Approach Advice Needed

Current Sensing - Best Approach Advice Needed 4 years 1 month ago #17378

  • Baldor
  • Baldor's Avatar
  • Offline
  • Expert Boarder
  • Posts: 135
  • Thanks received: 91
Then we are back at the start of the topic. :-)

-INA219:
Pros: I2C. A 0.1Ohm shunt and a pair of pull ups, and you are done.
Cons: Small surface mount chip.
-Shunt and OP-Amps:
Pros: You learn something new, and all the parts are easy to source.
Cons: Its a more complex circuit, but doable. Use one Opamp to amplify the voltage drop acros the shunt, another as a compartor, and you are done.
Aprendiz de mucho, maestro de casi nada.

Current Sensing - Best Approach Advice Needed 4 years 1 month ago #17379

  • be80be
  • be80be's Avatar
  • Offline
  • Senior Boarder
  • Posts: 79
  • Thanks received: 90
I don't think you have to worry to much on the esp 2866 the pins disconnect if voltage is over 5.8 volts.. Problem with the esp is there data sheet is in Chinese and uC may or may not have 5 volt tolerant pins. I no this the tx and rx pins don't work if your serial is lower then 3 volts it can send but not
receive. And Jon idea about the led is a good one use a blue led and you get 3 volts and blue light to see it working. I seen that used to on the tx pin.

Current Sensing - Best Approach Advice Needed 4 years 1 month ago #17380

  • Jon Chandler
  • Jon Chandler's Avatar
  • Offline
  • Moderator
  • Posts: 365
  • Thanks received: 352
The TI TMP512/513 are almost the same as the INA219. I've used them for several different applications: the current shunt ADC is the perfect range to measure a thermocouple, the voltage measurement side was a good choice where I wanted to measure automotive voltage with a micro that wouldn't always be powered, and of course as a power meter.

The two chips use a different register arrangement so software between the two is somewhat different, but more similar than not. There are a couple articles here by yours truly on using the TMP512 as a power meter and a t/c reader. Have a look for them, they may be useful to see how the buggers work.
The following user(s) said Thank You: hop

Current Sensing - Best Approach Advice Needed 4 years 4 weeks ago #17381

  • hop
  • hop's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 526
  • Thanks received: 46
Jon Chandler wrote:
The TI TMP512/513 are almost the same as the INA219. I've used them for several different applications: the current shunt ADC is the perfect range to measure a thermocouple, the voltage measurement side was a good choice where I wanted to measure automotive voltage with a micro that wouldn't always be powered, and of course as a power meter.

The two chips use a different register arrangement so software between the two is somewhat different, but more similar than not. There are a couple articles here by yours truly on using the TMP512 as a power meter and a t/c reader. Have a look for them, they may be useful to see how the buggers work.

I will. I am fascinated by these devices! The breakout for the INA219 on Amazon is pretty expensive, $14 USD, but if a board could be made that would hold a few of these, say like 10, it could be the heart of a serious PC repair diagnostic tool I have been wanting to build for a long long time. Too many times when working on a machine with a marginal PSU, I have had a bad motherboard, dvd burner, even a hard drive or video card draw too much current that brings the 12v1 or 12v2 rails down too far. Something like this between all the power connections would give me a snapshot of the system's power distribution when running. And with database support for all the various devices and manufactures as profiles, a diagnostic system could identify issues automatically!

A quick look online at digikey showed the TMP512 to be 4.41 per each (1 minimum) and INA219 to be 2.30 per each (1 minimum). I will need to prototype each to determine which is best to work with. Thank you guys!!!

Current Sensing - Best Approach Advice Needed 4 years 4 weeks ago #17382

  • Baldor
  • Baldor's Avatar
  • Offline
  • Expert Boarder
  • Posts: 135
  • Thanks received: 91


You can use something like this. We can discuse the values of the components and some refinements later. (We can add histeresys to the comparator)

Amplify the voltage drop across R1 with the first Op-amp. Set a x10 gain so 1A across R1, 1V at the output of IC1B, or a bigger gain if you wish, dont realy matter.

Second op-amp is a comparator. Set the voltage at the inverting input at the desired trigger point. Lets say the pump uses 0.7A when runing... Set the voltage to 0.5V, or what is needed with the gain you previously selected. When voltage at the non-inverting input is biger than at the inverting input, you have +12V at the output, 0V when smaller.

Then drive an optoisolator with the output of the second op-amp, and you are done.
Aprendiz de mucho, maestro de casi nada.
The following user(s) said Thank You: hop

Current Sensing - Best Approach Advice Needed 4 years 4 weeks ago #17383

  • Jon Chandler
  • Jon Chandler's Avatar
  • Offline
  • Moderator
  • Posts: 365
  • Thanks received: 352
I believe those two chips are functionally the same, and aside from moving around a few registers (and maybe the pin out) just about the same for programming.
Time to create page: 0.275 seconds