I use a 3.3V microcontroller, and somehow I need to sample 5V analog sensors…
I have 5V available on the board, I guess I see several ways of handling this, since I really want to keep the 3.3V microcontroller. The microncontroller’s pins are 5V tolerant.
Use an amplifier with a gain of 3.3/5.
Use a 5V A/D converter, with an SPI or I2C interface that is 3.3V compliant
Use a resistive bridge.
Solution 1) would be fine since I have 5V on the board and won’t be saturating the amplifier. It’s just a pain though to add another component to the board…
I like 3) because it does not add real-estate to the PCB. However, I’m concerned with noise issues and impedances though.
on top of adding a component to the board, it seems like double use since my microcontroller has an on board A/D converter.
What are your thoughts? How are you guys handling this conversion on your designs?
I think you’ve answered your own question. If you can tolerate the impedance issues, then just use a resistive divider. If not, then use the amplifier.
Option 3 is a common approach, but it depends somewhat what you are measuring.
Make sure the bridge doesn’t sink so much current that the sensor can’t maintain an accurate output.
Also consider calibration, especially if using 5% tolerance resistors. Some will say precision resistors get around this issue but in general you will always need to calibrate out inaccuracies due to component tolerance, track imperfections, and of course the sensor itself.
Yes, that’s what I meant by “impedance issues”. Precision resistors should remove the need for calibration, except for the issues I mention below…
ADCs like to be driven from a low-impedance source (due to internal sampling capacitance). A high-impedance resistive divider doesn’t provide this. Adding a ceramic capacitor to the ADC input pin provides a low impedance, but limits the maximum frequency that can be measured. There’s also the leakage current into the ADC input to consider - this is highly dependent on temperature, and can become significant if a high-impedance resistive divider is used.
I was going to go for the resistive bridge, with a high impedance, but then realized this may not work with the impedance of the ADC. For now I’m thinking the amplifier may be the safest solution…
By any chance would any of you know where to find the impedance of the ADC on the LPC2129? The user manual does not provide that many insights on the electrical characteristics of the device.