# ADC Signal conditioning. Transform 1V-4V to a 0V-5V signal, how can I do it?

Hi im doing a project for college and I got some doubts about signal conditioning. Im using a SS49E, hall sensor and, from what I have seen in the data sheets, the analog output gives values between 1v-4v. I want to read the analog output in the uC(ATMEGA88) with values between 0v-5v. How can I do that? This is a subject in the college that is supposed to teach me how to manually condition a signal, so I can't change the code. Thanks in advance.

• Why bother unless you really need the resolution? Feed it straight in and scale it in the code. Commented Mar 20, 2018 at 17:18
• can you link to the datasheet? Commented Mar 20, 2018 at 17:19
• Otherwise, use an op amp Commented Mar 20, 2018 at 17:19
• This is a subject in the college that is supposed to teach me how to manually condition a signal. I thought about your ideia, but my professor told me I couldn't do it. Commented Mar 20, 2018 at 17:19
• What supply voltages have you got available? Commented Mar 20, 2018 at 17:24

Use an inverting Op-Amp configuration with a gain of $\frac53$ to scale your (4-1)V = 3V range to a 5V range. Then, use another opamp to add that to a constant 2V source.

Implementation's up to you, Opamp circuits can easily found on the internet (wikipedia!) and easy to implement, so this is actually more help then you should have needed as a college student.

I would have answered with a link, however, this is a trap!

Let's have a look at the sensor datasheet page 3. The sensor's output is able to source up to 1mA (minimum guaranteed) however the schematic at the bottom of the page shows the output can only sink a current of 65 µA.

Thus we have to be careful not to use a circuit that would require the sensor's output to sink more current than this. For example an inverting opamp configuration would need high value resistors.

So, consider an inverting opamp with a gain of 5/3. The positive input of the inverting opamp should be at midsupply, biased by resistors, to ensure the output range is correct. I'm trying not to give you a solution that's too easy, therefore no schematic!

Output voltage would be inverted (1-4V in to 5-0V out instead of 0-5V), but you can fix that in software, there is no reason to add another opamp to invert it again.

Now, calculate the max current that the sensor's output will have to sink when its output is 1V, depending on the opamp's feedback resistor. Pick a resistor value that doesn't exceed the 65µA limit (or let's be safe and say 30µA). This will probably need a FET opamp.

Now check opamp input current and noise due to resistors, and decide if you will add another opamp before as a voltage follower to be able to use lower value feedback resistors. Your call.

Opamps will need to be rail to rail output if supplied from 5V.

Note this is fine as an exercise but in a real design you wouldn't want to use the last fraction of volt near the rails, as rail to rail opamps performance does degrade a bit close to the rails... and in this case, adding an opamp isn't worth it since the signal is large enough for your ADC.

• UM No.. THat is not how I read that diagram. It looks like it can source the currents they define in the low mA range but can only SINK current in the uA range. As long as you are driving a load that goes to ground, or virtual ground, you will be ok. Commented Mar 20, 2018 at 19:57
• @Trevor_G I agree with your reading of the diagram. The conditioning circuit would be an opamp wired as inverter with IN+ at 2.5V instead of 0V since this is single supply and 2.5V is the center of the range that has to be amplified. If the sensor's output voltage is lower than 2.5V then the sensor will have to sink current from the opamp... in this case the sensor's load is a resistor tied to 2.5V, not GND. I don't want to draw a schematic because OP should do a bit of effort... Commented Mar 20, 2018 at 20:15
• YUp I absolutely get where you are going but your wording seems to be less than clear. You say "For example an inverting opamp configuration would need high value resistors." then go on to say.. consider using one... Commented Mar 20, 2018 at 21:06

I think I would do it this way.

(Well actually I would not do it at all and let the micro handle it as is.. but hey... that wasn't the question.)

simulate this circuit – Schematic created using CircuitLab

R3 provides the load for the hall sensor to keep it sourcing current. The voltage over that resistor is then amplified by OA1 around the buffered half rail bias voltage provided by R1,R2 and OA2.

Note, nothing inverts in this circuit.

R6, D1 and D2, ensure the op-amps can never over-drive the next device.