low side current sense using xmega?

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I need to measure the current used by my board. Connecting a small resistor in series with ground, can I use the xmega ADC to measure that?

In other words, can the xmega ADC handle small negative voltages?

I'd rather not have to used a designated IC for that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
In other words, can the xmega ADC handle small negative voltages?

Short answer: No.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The helpful answer is yes, it can be done. Hang a potential divider between a reference voltage and your negative voltage, select the 2 resistors so that the junction never goes negative when the sense voltage is at its most negative (highest current). Connect this to the ADC input. Now use the awesome processing power of the xmega to calculate the voltage and hence the current.

Klave

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If the resistor is not connected in the negative line but in the positive this could be done in differential mode.But in practice any voltage drop across the resistor can affect the stability of the circuit and the results of measurment.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
In other words, can the xmega ADC handle small negative voltages?

I stand by my answer. You can not feed a negative voltage into the ADC input of an Xmega.

The "longer" answer is that with some front end signal processing one can shift/move/convert the negative voltage into a positive one, and scale it as desired, for the ADC input, while meeting the input impedance requirements, and level protecting the input circuitry.

The OP did not state if the Xmega doing the measurement is also the processor on the board being measured, or if he has a separate Xmega board which he is wiring up as a voltmeter to measure the current used by the first board.

If you put a sense resistor between the micro's ground and the power supply ground you must be very careful where you tie ground for all of the peripherals you attach to the micro, and note just what, specifically, one is measuring.

The other question is are you trying to measure very small currents, e.g. Pico Power AVRs in standby mode? This raises the complexity of the circuit significantly, particularly with a low side, low value, Rsense.

Lagger, what else is connected to the Xmega, and what is the current range you expect? With that info Klave, Geoelec, and others can provide you with a more specific suggestion.

JC

PS: The low end is designed to detect low level zero crossing, but this is not designed for a useful negative input range.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One of the problems here is that I don't know what I want :)

The purpose is for the Xmega to monitor the current consumption on the board it is mounted on.

The board has a GPS and a GSM module, and will control supplies to some external high power devices. So that puts the power consumption between 1mA and 10A.

I think I'm going to go with a INA138, for the non external devices and let that be that.