## low side current sense using xmega?

6 posts / 0 new
Author
Message

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.

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

JC

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

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.

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.