The revised version saw an exchange in boards (Pro mini to Nano 3.1) all connected to another brand new proto-perma board. The problem still persists and I've no idea why. Just to test, I hooked up the log-scale sensor to my Uno, uploaded a simple analog read sketch and it was steady as can be with no anomalies.
All other analog channels are fine in both cases above. The voltage regulator is 5v and the capacitors are 0.1uf. External power is from a 9v battery, although it doesn't matter where the board gets its power from the same problem persists.
I've attached a diagram of how my power distribution is implemented and the code I'm using to read the values from the sensor.
Code: Select all
lightVal = map(constrain(lightVal, 0, 614), 0, 614, 0, 100);
Please note I am using a microphone as an example as I could not find a log-scale sensor from within Fritzing. Although, it does have the same connections.