Go Down

### Topic: 3.3V output only giving 2.55V [solved] (Read 950 times)previous topic - next topic

#### Heimdallofasgard

##### Nov 24, 2012, 02:28 pmLast Edit: Nov 25, 2012, 09:47 am by Nick Gammon Reason: 1
Hi Guys

Thought this would be the most appropriate place to post this as I think it's a hardware, not a software/project issue.

I'm on windows 7, I have the arduino uno R3 plugged into USB only, and have a problem with the voltage from the 3.3V power output.

I noticed it while calculating temperature for a project I was doing when it was telling me 8 degrees instead of about 20. I have now traced the problem to the 3.3V power output.

It's only giving 2.55V according to the following code:

Quote
void setup() {
Serial.begin(9600);
}

void loop() {
int therm0 = analogRead(A0);                       //1. input on Analog pin 0
float volt0 = therm0 * (3.3 / 1023.0);             //2. conversion to Voltage

Serial.println(volt0);                                     //3. Send voltage to Serial software display

This should be 3.3V right? do I need an external power source to achieve the full 3.3V?

- Heim

#1
##### Nov 24, 2012, 03:24 pm
Code: [Select]
`float volt0 = therm0 * (3.3 / 1023.0);             //2. conversion to Voltage  `
I believe this would only be true if you had used Aref set to 3.3V.
As written, your code would be using the defualt setting of VCC, which would be ~5V.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### Heimdallofasgard

#2
##### Nov 24, 2012, 03:41 pm

Code: [Select]
`float volt0 = therm0 * (3.3 / 1023.0);             //2. conversion to Voltage  `
I believe this would only be true if you had used Aref set to 3.3V.
As written, your code would be using the defualt setting of VCC, which would be ~5V.

so when I have my 3.3V output plugged straight into my analogue output, it's actually putting out 5V? or am I missing something in the code?

#### pluggy

#3
##### Nov 24, 2012, 04:14 pm
The default Analog reference is to use VCC which is nominally 5V but in actuality is whatever is coming out of the USB port of the computer.  If you plugged the 3.3V output into the AREF pin of the arduino and told it to use it

Code: [Select]
`analogReference(EXTERNAL);`

It will be reading a voltage relative to whatever is going in the AREF pin (3.3 volts if you connect it to 3.3 Volts).
http://pluggy.is-a-geek.com/index.html

#4
##### Nov 24, 2012, 04:15 pm
You have choices for what is used for the ADC reference.
If you do nothing, then the default is 5V/1023 = ~4.88mV per BIT.

So if you connect the 3.3V output to an analog input and take a reading, the result will be
3.3/.00488 = ~676
then 676*(5/1023) =  3.3V
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### Heimdallofasgard

#5
##### Nov 24, 2012, 04:25 pm

You have choices for what is used for the ADC reference.
If you do nothing, then the default is 5V/1023 = ~4.88mV per BIT.

So if you connect the 3.3V output to an analog input and take a reading, the result will be
3.3/.00488 = ~676
then 676*(5/1023) =  3.3V

Brilliant, Thanks for this! turns out it was just a coding error

Go Up

Please enter a valid email to subscribe