Skip to content

mixing analogReference(INTERNAL4V096); and analogReference(DEFAULT); with analogRead and analogDiffRead Not allowed? #27

@macron0

Description

@macron0

Hi. I am not sure this is an actual issue but I don't know where else to ask.

I tried :
analogReference(DEFAULT);output = analogDiffRead(A0, A1, GAIN_1) ; and this returned results around +- 2500. Well below the 4064 limit.
The thing is the current sensor I try to read (ACS758LCB-050b) is very sensitive to the voltage it gets supplied. When I power every thing via usb only the voltage on the board and also the ACS is 4.60 and it returns +-2330 when there is no current. When I power it from batteries it runs at's 5.06 volts and the ACS returns 2530 So I tried reading the LGT8F328P boards own voltage via A7 but this is always returns 4064 with the default reference. So I added a voltage divider (2 680k resisters) and I changed the analogReference to INTERNAL4V096. This works great. Now I can actually see the difference in my vcc when it is powered from usb or battery.

But now my results from the differential reads are 4064 instead of around 2500. I tried changing analogReference(DEFAULT); and delay(100) and than read and change it back to analogReference(INTERNAL4V096) but this has no effect.

Is what I try to do impossible?

I am trying to do an differential read because I read somewhere that this reduces noise becuase the noise cancels each other out. But this was the documentation if the ads1115 volt sensor. So I sort of asumed this would be true here too. I am using gain_1 so that means no amplification. Am I wrong and does the differential read not affect the noise?

Thank you for your work. This make those littleboards very cool and useable.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions