Welcome, Guest
Username: Password: Remember me

TOPIC: VCC Voltage reading

VCC Voltage reading 2 years 5 months ago #1630

  • Sloclone100
  • Sloclone100's Avatar
  • OFFLINE
  • New Member
  • Posts: 11
  • Thank you received: 1
  • Karma: 1
I am troubleshoot shooting the display on my MegaSheild and I found 3.5v at the VCC point of the display where it should be 5volts. I measured pin 5 on con1 on the 2560 and also found 3.5v where it should be VCC (5v). Could there be some wrong with the MEGA board?
The administrator has disabled public write access.

VCC Voltage reading 2 years 5 months ago #1631

  • Ray
  • Ray's Avatar
  • OFFLINE
  • Moderator
  • Posts: 706
  • Thank you received: 151
  • Karma: 44
The OLED screen is taking +5V from the pin of the Arduino MEGA (just left to the 2 ground pins) see the image below:
Arduino-Mega-Pinout.png


You should read +5V there, or at least close to 5V (I read 4.8V on mine).

How are you powering the board? maybe you can try to switch and use the USB power or the DC jack connector power (using a standard +12V wall adapter).

Here is the mega schematic, it may help you:
www.arduino.cc/en/uploads/Main/arduino-mega2560-schematic.pdf
The administrator has disabled public write access.

VCC Voltage reading 6 months 3 days ago #2330

  • Lewis-H
  • Lewis-H's Avatar
  • OFFLINE
  • New Member
  • Posts: 10
  • Karma: 0
The built-in A/D hardware of the ATmega328p can read the "1.1V" (1.0 to 1.2V) internal voltage standard. Once you calibrate the "1.1V" standard you can use that to calculate the VCC voltage.
Code: [Select]
long readVcc() {
long result;
// Read 1.1V reference against AVcc
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
delay(2); // Wait for Vref to settle
ADCSRA |= _BV(ADSC); // Convert
while (bit_is_set(ADCSRA,ADSC));
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate AVcc in mV
return result;
}


Note: this code assumes the "1.1V" is exactly 1.1V. You should measure Vcc with an accurate meter and then adjust the constant to get the right result.
The administrator has disabled public write access.
Time to create page: 0.193 seconds
Powered by Kunena Forum
Joomla SEF URLs by Artio