reading 5v ADC signal from 3.3v MCU - Page 1
Forum section: electronics / general

author: jon6123
author_rank: Contributor
timestamp: March 19, 2017, 03:22:23 pm
content: Hi there,I am designing a microfluidic flow rate controller for my university project and need to read a 5v signal using a 3.3v PIC24F ADC inputideally I'd like to scale down the 5v to 3.3v and from a bit of searching online it could just be as simple as a voltage divider HOWEVER Im worried the input impedance of the MCU could skew the results slightlyThe datasheet for the sensor is very vague and doesnt give any more info other than 8v, 100mA input and 0 - 5v output...The PIC24F datasheet has this diagram showing leakage current of the pin, I assume this is what I should be looking at?There is a microchip "tips and tricks" document for 5v to 3.3v ADC situations and that suggests a unity gain follower op amp:However I am unsure which of these two examples fits my situation?My questions main are :what size resistors do you think I should usefor the divider? ~100Ohms? ~100k's?what kind of current should I be drawing from the sensor? as little as possible?is there anything else I should be looking out for?Also since this is the last part of my PCB design what specific op amp component could I use? what specs to look out for? looking for SMD and as small as possible since the board is 25mm x 60mm and packed!I fel like im walking in the dark trying to choose a component for this situation knowing so little about the parameters for this application

author: BrianHG
author_rank: Super Contributor
timestamp: March 19, 2017, 05:13:59 pm
content: To keep things simple, use a Rail-Rail op-amp with J-fet inputs.What supply voltage will you be using for your op-amp?If it's 5v, you can use both circuit illustrations, however, with the bottom one, your source signal will be driving no current to the opamp input, while the opamp output will be divided and loaded through the 2 resistors. Basically, that voltage skew error you are currently worried about will still be there. For the resistors, I would use 1.7k and 3.3k.Now, if your source signal is already buffered, you don't need the opamp circuit if you use 1.7k & 3.3k since then end result will be identical to the PIC's AD input.Now if you want to use a 3.3v supply for the opamp, you are now forced to use the top circuit. In this case, you can now use 17k and 33k, or, 170k and 330k for the resistors. Now, you are loading your source signal, but, with 170k and 330k, it's fairly light and the j-fet input opamp will prevent data skew due to it's incredibly low input current. This solution, allowing for the 170k & 330k load of your source, will give you superior fine linearity. In this case, I would still consider powering the op-amp with 5v since it's output wont be at the rail at least on the high end, though it would still be at 0v rail when at the low end.

author: BrianHG
author_rank: Super Contributor
timestamp: March 19, 2017, 05:21:56 pm
content: Here is a cheap rail-rail, sot23 packaged op-amp, good for 3.3v & 5v operation, only 1 picoamp input current:http://www.digikey.com/product-detail/en/microchip-technology/MCP6001T-I-OT/MCP6001T-I-OTCT-ND/697158