I have an Uno based circuit with Atmega 328P. Currently the board is powered by 9v through a LM2940CT-5 regulator. I have a sensor connected to A0 and the sensor is powered by the same 5V supply. Using internal 1.1V reference for A0.
I have some drift in the sensor output related to ambient temperature, and it is suggested that one way to minimize this is to use constant current supply to the sensor instead of voltage.
The sensor supply current is 11mA. i could use a LM334 inserted to the supply of the sensor only but i was thinking of replacing the board regulator with an LM317 in constant current mode. This would mean the entire board including processor, Sensor and LCD is being supplied by this constant current regulator. Is this a BAD idea? I am assuming I will measure the current that the entire setup draws right now and then configure the LM317 to output the same current?
Why not just get a Voltage Reference and use that as the supply to the sensor?
Datasheet for REF194, a 4.5V source powered from 5V supply, suggests doing that.
It is capable of 30mA output.
Lsnyman:
i could use a LM334 inserted to the supply of the sensor only but i was thinking of replacing the board regulator with an LM317 in constant current mode. This would mean the entire board including processor, Sensor and LCD is being supplied by this constant current regulator. Is this a BAD idea?
Yes. Constant current supplies are only for components that require constant current. Most circuits are designed for constant voltage. You can physically damage a circuit by regulating current instead, since the only variable that can be controlled is voltage -- meaning the voltage will vary and could vary beyond the tolerances of the components. Also, it's highly unlikely to work correctly.
Lsnyman:
I am assuming I will measure the current that the entire setup draws right now and then configure the LM317 to output the same current?
No. The current draw of anything more complicated than an LED is, for all practical purposes, continuously variable and chaotic. You can't measure this and come out with "a number". Only a range. Even if that range is minimal, providing a CC output based on an average will mean voltage fluctuates around that average level. That's called "power supply noise" and designers go to great lengths to avoid that.
Thank you. Makes sense..
Will usinga voltage reference give the same resultat a constant current source? The changing temperature causes the sensor supply to vary I guess from the changing internal resistance. It is a hall sensor..
What makes you think you need a constant current? Hall sensors generally do not need this. Any temprature related variations in readings could be due to the sensor itself not power supply voltage variations.
All parts have a temperature coefficient. This dictates how much its value changes based on temperature.
The voltage output of a regulated supply should not vary (much) by the load placed on it -- that's the point of regulation. However, the supply's ability to regulate varies, so using capacitors at the load helps to meet sudden current demands and keep those variations under control. If the supply regulation isn't good enough, you may need more local capacitance, a better supply (perhaps you're asking too much of it?), or you need to look at your current draw and see if it can be reduced, or the output of the supply can be increased (typically by using a sturdier supply).
Hall sensors are ratiometric devices, therefore you should power the sensor from a well-regulated supply AND use that supply as the analog reference, i.e. connect it to the Aref pin and call analogReference(EXTERNAL). Then any drift in the supply voltage with temperature will cancel out. If the 5V supply is not stable enough, you could try the 3.3V supply.
Grumpy_Mike:
What makes you think you need a constant current? Hall sensors generally do not need this. Any temprature related variations in readings could be due to the sensor itself not power supply voltage variations.
The Hall voltage depends on the current density and magnetic field (assuming
charge carrier density doesn't vary with temperature - generally true for doped
semiconductors).
The resistance of the hall sensor does vary with temperature.