Shop OBEX P1 Docs P2 Docs Learn Events
Propeller as a precision volt meter / amp-meter — Parallax Forums

Propeller as a precision volt meter / amp-meter

ReachReach Posts: 107
edited 2014-03-10 18:03 in Propeller 1
I would like some suggestions here. :)

I have decided to place a few shunts on a couple of battery banks to monitor current consumption.

Battery voltage range needs to be 0 - 16 V perhaps higher 0 - 48 V.

Im thinking about using delta sigma but am not sure of its ability to measure a wide range of voltage and remain precise -down to mVolts for the shunt to read current.

Keep in mind this will be installed on my boat so marine environment. How would you go about this? Please no HALL sensors I want to stick to shunts.

Thanks in advance.
«1

Comments

  • jmgjmg Posts: 15,173
    edited 2014-03-06 10:54
    MIcrochip have a PAC1720/PAC1710 series (that came over from SMSC)

    http://www.microchip.com/wwwproducts/Devices.aspx?product=PAC1720


    These are pretty ideal as volt meter / amp-meter, as they have
    * Dividers for Battery voltage included
    * Skewed gains on the I and V channels, designed for mV shunts on I
    * easy to talk to.

    Only the small package is a slight drawback.
  • ReachReach Posts: 107
    edited 2014-03-06 10:58
    jmg
    That is outstanding thanks. Ill read over this data sheet it looks promising. :)
  • ReachReach Posts: 107
    edited 2014-03-06 11:01
    On second look its a high side configured IC I need a low side as my shunt will be connected to the (-) on the battery bank. Im not sure if this IC can run low side.
  • jmgjmg Posts: 15,173
    edited 2014-03-06 11:25
    Reach wrote: »
    On second look its a high side configured IC I need a low side as my shunt will be connected to the (-) on the battery bank. Im not sure if this IC can run low side.

    The data is a little vague, but the main issue seems to be pins more than electrical

    SENSE+ is the Vsource pin, but common mode range is 0-40V

    So normal use is High side connection (just move the shunt ?), where both I and V on one channel are read.

    That said, the 1720 does have two channels, so you could use one for V+ and one at GND for Current.

    Some series resistors on battery read-off pins would be a good idea, as you want some oops/slip protection to avoid literal melt-downs...
  • cavelambcavelamb Posts: 720
    edited 2014-03-06 11:26
    Why low side only? (other than that is the homework assignment?)

    Does this involve a Blue Seas battery fuse system?
    That's the only valid reason I can think of.
    But even then, a jumper from the fuse to a distribution bar will
    allow you to pick up everything but the starter motor.
    And I doubt you would want to include that.
  • ReachReach Posts: 107
    edited 2014-03-06 11:29
    I cant move the shunt. I wonder if a V/F converter would work. I cant believe there is no IC out there that can read voltage and convert it to binary. Yea ADCs do this but they all seem to want 5V max even the dual power variety.

    Looks like im going to have to design a circuit to do this - I swore there was an IC out there :/
  • jmgjmg Posts: 15,173
    edited 2014-03-06 11:34
    Reach wrote: »
    Looks like im going to have to design a circuit to do this - I swore there was an IC out there :/

    Read #5, you can use a PAC1720, one channel for each task.

    There are other current/voltage monitor devices out there, just check their common mode ranges.
  • davejamesdavejames Posts: 4,047
    edited 2014-03-06 12:04
    Reach - what current range is involved?

    I've a datasheet on an in-circuit device that can handle up to 50A.

    If this is of interest, I'll wade into my pile of paper after work.
  • ReachReach Posts: 107
    edited 2014-03-06 12:08
    I keep reading the PAC1720 DS and just dont see how it can work for my application. Is there another IC that can basically read a voltage and send it via i2c?
  • ReachReach Posts: 107
    edited 2014-03-06 12:10
    davejames wrote: »
    Reach - what current range is involved?

    I've a datasheet on an in-circuit device that can handle up to 50A.

    If this is of interest, I'll wade into my pile of paper after work.

    Current up to 100 Amps for now. But Voltage is more important to me. If I can read a voltage range of 0 - 16 V in uVolt increments id be happy. This might not be possible for one IC.
  • jmgjmg Posts: 15,173
    edited 2014-03-06 12:16
    Reach wrote: »
    I keep reading the PAC1720 DS and just dont see how it can work for my application. Is there another IC that can basically read a voltage and send it via i2c?

    Sure, pick any of these with i2c showing

    http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=11022&mid=10&lang=en&pageId=79
  • davejamesdavejames Posts: 4,047
    edited 2014-03-06 12:19
    Reach wrote: »
    Current up to 100 Amps for now. But Voltage is more important to me. If I can read a voltage range of 0 - 16 V in uVolt increments id be happy. This might not be possible for one IC.

    I'm confused. :confused:

    If you're attempting to measure the current, why are you concerned about a voltage range of 0 -16V?

    For a current of 100A, 16V across the shunt would indicate a 160 milli-Ohm value. Is that the value of shunt you intend to use?
  • ReachReach Posts: 107
    edited 2014-03-06 12:19
    jmg sorry but none of them have a supply VOLTAGE over 5 volts. I need to measure at minimum 16 V. :) sorry to be a pain
  • jmgjmg Posts: 15,173
    edited 2014-03-06 12:23
    Reach wrote: »
    jmg sorry but none of them have a supply VOLTAGE over 5 volts. I need to measure at minimum 16 V. :) sorry to be a pain

    You need to add a simple resistive divider.

    Another choice is
    http://www.ti.com/product/lmp92064
    SPI, Low side, but voltage channel is 2.048V, so again you use a divider of a couple of precision resistors.
  • ReachReach Posts: 107
    edited 2014-03-06 12:36
    Im thinking this would work for many applications on my boat http://ICL7106 (small) problem is the interface to the propeller. I would have to replace the LED output into another IC to convert it to serial. Some other IC that does what this one does but i2c would be perfect.
  • jmgjmg Posts: 15,173
    edited 2014-03-06 13:12
    Reach wrote: »
    Im thinking this would work for many applications on my boat http://ICL7106 (small) problem is the interface to the propeller. I would have to replace the LED output into another IC to convert it to serial. Some other IC that does what this one does but i2c would be perfect.

    ? the ICL7106 has only a 2V signal range, so still needs external voltage divider.
  • ReachReach Posts: 107
    edited 2014-03-06 13:21
    But it can read voltages up to 40 so I can manage the rest.
  • jmgjmg Posts: 15,173
    edited 2014-03-06 13:29
    Reach wrote: »
    But it can read voltages up to 40 so I can manage the rest.

    but it can only do 40v with external ranging resistors, which is the same as all the parts linked above.
    - so the ICL7106 is nothing special - others are easier to talk to and better precision.
  • pjvpjv Posts: 1,903
    edited 2014-03-06 18:14
    Reach,

    I can't understand why you don't go with your original suggestion of a sigma delta A/D circuit right onto the propeller. All it takes is 2 properly calculated resistors and a 0.1 cap. You could put two such circuits on the propeller, one ranged for volts, and another ranged for current. Or add more yet to get several ranges for current.

    Not sure why you might want to measure microvolts though. That requirement might put you too deep into the noise for a simple approach.

    Really not that complicated.

    Cheers,

    Peter (pjv)
  • kwinnkwinn Posts: 8,697
    edited 2014-03-06 19:19
    As Peter said, not so hard to do. You can use a sigma/delta adc as he suggested or an MCP3208 and a quad rail to rail op amp to measure 4 voltages and and currents. The op amps are used in differential mode across the shunts to amplify the signal to the desired range (0-100A to 0-3.3 or 5V) and resistor dividers to drop the battery voltage to the desired range.

    The parts are also available in thru hole, so simple to prototype, and a 12 bit adc provides a full scale accuracy slightly better than 0.025%. Don't need better precision than that for this application.
  • ReachReach Posts: 107
    edited 2014-03-06 19:36
    I would love to use sigma/delta but I am torn (probably a little confused). I suppose I could simply create two separate circuits one for measuring my shunt resistor (mV range) and one to measure the battery bank (8 - 16 Volt range). I think that the voltage divider needed for propeller to interface with the 16V would cause error when applying it to something that reads 50mv. I have yet to analyse it fully so forgive me if I sound foolish.

    I really wanted to implement this circuit to measure many voltages on my ship --> my engine RPMs, engine temperature, and engine oil pressure, and later if I take the engine out I could use the same circuits to measure solar and wind, etc. Basically as this develops it seems that I want to make a multi-port Volt meter that revolves around the propeller.
  • kwinnkwinn Posts: 8,697
    edited 2014-03-06 20:04
    You can do that with a sigma/delta adc or any other type of adc. All that is needed for that is some circuitry to convert the voltage/current/temperature/pressure signal to a voltage range the adc can handle and have a prop do the math to convert that to the reading you want.

    - Op amps can be used to amplify low level signals such as those from current shunts and pressure or temperature sensors.
    - Voltage dividers can reduce high voltages to levels the adc can measure.
    - RPM is already a digital signal so all that is needed is to count the pulses for a fixed period of time and do a simple calculation.

    The prop can easily do everything you have listed and more. All it needs are some op amps for the low voltages and resistor voltage dividers for the high voltages.
  • ReachReach Posts: 107
    edited 2014-03-06 21:12
    kwinn wrote: »
    You can do that with a sigma/delta adc or any other type of adc.

    Kwinn

    I disagree with you completely. I spent some time today looking for ADCs that will swallow 16 Volts of analog DC and happily send that on an i2c bus running on 3.3V. Is there a IC that does this? Sure but I could not find one, yet. Most ADCs are happy reading something like ~9V to 5V and under.
    All that is needed for that is some circuitry to convert the voltage/current/temperature/pressure signal to a voltage range the adc can handle and have a prop do the math to convert that to the reading you want.

    This is true, as all the gauges on my boat shoot out a voltage to reflect there respected values. RPMs (linear voltage), Oil pressure (linear voltage). These voltages range 0 - 16 V.

    Im leaning towards sigma/delta now but an off the shelf IC would be nice.
  • jmgjmg Posts: 15,173
    edited 2014-03-06 21:43
    Reach wrote: »
    I disagree with you completely. I spent some time today looking for ADCs that will swallow 16 Volts of analog DC and happily send that on an i2c bus running on 3.3V. Is there a IC that does this? Sure but I could not find one, yet.

    ? You seem to be meaning, with no added components, but the PAC1720 give in #2 can do exactly that, over 2 channels.

    It is less common for ADC's to include the resistive dividers, but some in the battery monitor area do, and those also have tens of mV scale choices, for Current Shunt reading.

    Mostly, the Generic ADCs give designers a high input impedance, and expect then to choose the two divider resistors to scale.
    If you want to work with current shunts, then expect to use low offset/drift opamps, if you want to keep the origin errors to low levels.
  • RaymanRayman Posts: 14,659
    edited 2014-03-07 07:30
    Here's another high-side ADC with current sense. Looks pretty nice:
    http://cds.linear.com/docs/en/datasheet/4151fe.pdf
  • tonyp12tonyp12 Posts: 1,951
    edited 2014-03-07 08:55
    Here is a new one, just came out yesterday:
    http://www.ti.com/lit/ds/symlink/ina300.pdf
  • jmgjmg Posts: 15,173
    edited 2014-03-07 21:13
    tonyp12 wrote: »
    Here is a new one, just came out yesterday:
    http://www.ti.com/lit/ds/symlink/ina300.pdf

    Interesting device, but it looks to be only a Current-Sense Comparator
    - no Analog output pin ?
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2014-03-07 21:55
    I'm working on something similar - turn on pumps when the sun is shining so need to measure volts and amps and multiply to get watts, plus measure levels in tanks with pressure transducers. I once had some problems with sigma delta - it seemed very sensitive to the board layout and external interference. I prefer I2C for analog inputs.
    There needs to be some input signal conditioning whatever chip is used. Time for some old-school op-amp circuits?
    CA3140 and dual/quad friends can do rail to rail. For volts, use two 1% resistors in a voltage divider as mentioned previously. Maybe a divide by 6 if it is 16V into a 3.3V device?
    For current, use an op amp as a differential amplifier - four resistors and then you can set the gain, as well as not having to worry if it is high side or low side as it is looking at the difference, not the absolute voltages. 50mV input, so set gain at maybe 60.
    So for volts, it is two resistors. For current, it is one 8-pin op amp and 4 resistors. Board is flexible because different resistor values can be used to set the gain and the divide value.
    I'm drawing up a board at the moment - should have something in the next 48h.
  • kwinnkwinn Posts: 8,697
    edited 2014-03-07 22:59
    Reach wrote: »

    Kwinn

    I disagree with you completely. I spent some time today looking for ADCs that will swallow 16 Volts of analog DC and happily send that on an i2c bus running on 3.3V. Is there a IC that does this? Sure but I could not find one, yet. Most ADCs are happy reading something like ~9V to 5V and under.

    Several of the IC's suggested by others will swallow 16VDC and more, and send that on an I2C bus along with the mV measurement across the current sensing resistor, but those are intended for DC power monitoring and not very useful for what you describe in post 22.

    Most of the adc on the market are intended to be powered from a stable supply in the 3V to 5V range, and handle inputs in the 0V to 3.3 or 5V range. They require additional components such as resistor voltage dividers for higher voltages and op amps for lower voltages.
    I really wanted to implement this circuit to measure many voltages on my ship --> my engine RPMs, engine temperature, and engine oil pressure, and later if I take the engine out I could use the same circuits to measure solar and wind, etc. Basically as this develops it seems that I want to make a multi-port Volt meter that revolves around the propeller.

    A propeller could do this using a sigma/delta or multi channel I2C adc with resistor dividers to reduce the higher voltages, and op amps to amplify very low voltages.

    Lets say you use an external 12 bit adc and the 3.3V supply as the reference voltage.

    A 0 – 16V input signal would go to a voltage divider consisting of a 15K and 3.3K resistor.
    That would scale the input voltage to the adc to 0-2.88V, which the adc can handle.
    Multiply the adc output by the calibration factor, place the decimal point, and output the reading. While the adc inputs would be limited to a single voltage range the resistor values and calibration factors could be varied to suit the individual input ranges.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2014-03-08 03:51
    Excellent points there kwinn.
    A 0 – 16V input signal would go to a voltage divider consisting of a 15K and 3.3K resistor.
    That would scale the input voltage to the adc to 0-2.88V, which the adc can handle.

    good choice of values as that also limits the current into the propeller pin should you put more than 16V on the input. (Consider a hypothetical where you chose 150R and 33R - same ratio but would feed too much current and zap the chip, plus draw too much wasteful current from the battery). And at the other extreme, 1.5M and 330K would not match the imput impedence of a sigma delta, unless maybe you used an op amp voltage follower. 15K and 3K3 is a good choice.
Sign In or Register to comment.