voltage compensation

Dear all;

I am using 7805 regulator IC to power on MUX; ATMEGA328 & 24 hall sensor on board.
I need help to decide will below points affect my analog reading calibration

I found that the Input to the microcontroller ; MUX IC and Hallsensor is 5.08v when i checked in multimeter.

When used formula of analog calibration

vout= 5.08/1023.0*AnalogRead(A0)

the vout reads in Serial monitor will be 3.25v ~4.25v varying instantly
when i check voltage acorss hall sensor out , mux out will be remain same 2.89v .

I have already done this before . But with 5v as reference i used to get exact reading w.r.t multimeter . i dont know how reference voltage being increase to 5 to 5.08v.

MY question is

  1. how it affect the output reading of hall sensor
    2)is there any additional circuit need to build compensate out
    3)How to avoid change in this voltage input.

i am using below hall sensor

http://www.rongtech-sensor.com/En_ShowPro.asp?id=155

The 7805 could output 5.08V. That is normal.
The ATmega328P will work perfectly up to 5.5V.
I think it is most likely the 7805 doesn't have capacitors and is oscillating like crazy (they do that).
When you have a steady voltage of 2.89V and you read a fluctuating voltage, then the sketch could be wrong. You could make a very simple test sketch and how it to us.
Bad contacts of a breadboard is also a common problem.

Maybe the 5.08 is a bad reading due to equipment, static or an accidental connection. I'm not sure what you are doing exactly so this is all I can say.

@ peter.

I have not assembled on the bread board. Since already working previously these many day i designed own PCB board.I have capacitor across 7805 regulator IC.

Yes i have tried sample code already. reading analog values from forum

AMPS-N:

  1. how it affect the output reading of hall sensor

Your sensor is rated 5V +-5%, thus, it should operate correctly with supply voltages in the range from 4.75V to 5.25V

AMPS-N:
2)is there any additional circuit need to build compensate out

There is no need for compensation, 5.08V is perfectly within the specified range.

Do you have an unused analog input ? Apply a battery voltage of 1.5V to that (via resistor of 1k for safety) and read that. If that is okay, perhaps the mux is oscillating or the analog input connected to the mux is broken or you did something to AREF.

If you can't find the problem, please give us a lot more information: schematics, photos, sketch, power supply, and so on.

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks ..Tom..... :slight_smile:

The sensor datasheet has a little "principle of operation" diagram showing that its an
absolute voltage output device, not ratiometric, so convert the ADC reading to voltage
using the known value of your supply, then convert that to a current using the
gain / offset of the device.

The most accurate/unbiased formula for estimating input voltage from the ADC reading is:

  float Vadc = 5.08 * (analogRead (pin) + 0.5) / 1024.0 ;
  • the ADC has 1024 values spread across the available voltage range, not 1023.
    You would use 1023 for a 10 bit resistor-ladder DAC, not a successive approximation
    ADC.

What is the 7805's input voltage.
This is an "old" regulator, and needs at least 2volts more at the input than it's regulated output.
That includes dips if the raw supply comes from a transformer/bridge rectifier/cap.
Then again, 5.08volt seems perfectly normal.

What are you sampling, and what is the switching frequency of the mux.
I think we need to see a schematic of that 24-channel mux.
Leo..