Pages: [1] 2   Go Down
Author Topic: Voltage fluctuating too much. How to fix?  (Read 2706 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I have put together a project to monitor the temperature of our fridge and freezer. The fritzing schematics (sorry) are attached to this message.
It will calculate average temp, trends and a whole lot of other things. If the temperature is out of acceptable limits then it will sound an alarm and repeatedly blink the LCD backlight. One button is for silencing the alarm via an interrupt and the other one is to manually turn on the LCD backlight should one want to see the screen in the dark.
In other words, it is an over-engineered thermometer.

The problem I am having is that my temperature sensors are analog. Thus they need a constant voltage to return accurate and calibrated values.
This is not the case however. Voltage varies a lot:

When I power the whole thing up with a 5V 2A AC adapter, voltage on the 5V pin and the Vin pin is 4.55ish.
When the screen is blinking/the backlight is on, it drops to around 4.30V
If I plug in both the AC and the USB, the 5V and Vin pins are around 4.67V
It drops to around 4.40V when there is backlight activity.
I checked the output of the AC at the plug and it's 5.39V

Where does my problem stem from? Is my whole “system” using more that 2A? It seems like a rather hugh value doesn't it?
How can I make the 5V deliver 5V so that I don't have to tweak the code every time I change the way it's powered?

I plan on moving everything to a PCB once these problems are ironed out powered by a standalone atmega328 without a USB serial interface. I was thinking I could power it with AA batteries. Is it feasible or is it using too much juice?

I'm not very experienced to all things electric/electronic so please be patient and detailed in your answers.
Thanks for your help!


--edit: A more readable image size than what the forum offers





* thermometre-v3_bb.jpg (1506.2 KB, 1983x1791 - viewed 22 times.)
« Last Edit: November 18, 2012, 01:11:37 am by hfp777 » Logged

I am a total amateur at electronics and all things related. I have no education in the matter other than self taught.

Please factor this in

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
When I power the whole thing up with a 5V 2A AC adapter, voltage on the 5V pin and the Vin pin is 4.55ish.

Whoa! Don't do that. You are supposed to power it from a DC adapter of between 7 to 12 V.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3540
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sometimes I call 'em AC adapters too, but I really mean AC-to-DC adapter, sounds like that's what he has.

But yeah, 2A is way more than a circuit like that ought to need. Anything getting hot? Could the adapter (wall wart) be bad?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3540
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh wait. Are you plugging the 5V adapter into the Arduino's power jack?  Or to the Vin pin? (Same thing really.)  If so that's the trouble.  Like Nick says, 7-12 volts are needed there.

If it's a decent, regulated 5V adapter, it can be connected to the Arduino's 5V pin.  I've got some 5V wall warts around here, usually they run a little closer to 5V even open circuit, usually within 0.1V.  So 5.39 sounds a bit high, but it could be ok.

And you probably want the Arduino's 5V pin hooked to the breadboard power rail, not Vin as shown in the picture.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
How can I make the 5V deliver 5V so that I don't have to tweak the code every time I change the way it's powered?

As Jack says, run the peripherals from the Arduino 5V pin, not the Vin pin. I don't think Vin is even valid when the USB is active.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Plus, the ADC can reference an internal 1.1V reference. That would be more reliable probably than the fluctuation you might get on the 5V line. You might need a voltage divider so that you don't input more than 1.1V on the analog pin, if you choose to use that.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I changed the wire so the power rail is fed from the 5V.

I checked the power rail once fed from the 5V pin and it does output the same as Vin, that is to say around 4.55/4.65 depending on the USB/DC jack combinations stated in the first post.

Nothing gets hot and the wallwart is the one I got from Adafruit with the thermal printer. It works fine with the printer + ethernet shield.
Logged

I am a total amateur at electronics and all things related. I have no education in the matter other than self taught.

Please factor this in

Offline Offline
Full Member
***
Karma: 0
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Plus, the ADC can reference an internal 1.1V reference. That would be more reliable probably than the fluctuation you might get on the 5V line. You might need a voltage divider so that you don't input more than 1.1V on the analog pin, if you choose to use that.

Could you elaborate on that please?
Logged

I am a total amateur at electronics and all things related. I have no education in the matter other than self taught.

Please factor this in

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here: http://arduino.cc/en/Reference/AnalogReference

You can configure the ADC to have a different voltage reference. If you set it to 1.1V then you would need to ensure that you don't input more than 1.1V. However since that is an internal reference it shouldn't fluctuate.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I checked the power rail once fed from the 5V pin and it does output the same as Vin, that is to say around 4.55/4.65 depending on the USB/DC jack combinations stated in the first post.

If you are supplying 7+V to the power input jack you should have 5V on the 5V pin and not some other voltage.

Quote
When I power the whole thing up with a 5V 2A AC adapter ...

That doesn't sound like 7V to me.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I checked the output of the AC at the plug and it's 5.39V

It sounds like a poor regulation.

I would try to use a higher voltage adapter and allow the onboard regulator to regulator power to the chip / peripherals.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok so I bought a 9V 650mA adapter, I will update when I receive it
Logged

I am a total amateur at electronics and all things related. I have no education in the matter other than self taught.

Please factor this in

Offline Offline
Full Member
***
Karma: 0
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I received this 9V adapter, 650 mA. It outputs 9.21V without load.

The voltage is better (5.07V on 5V pin) but when I turn the LCD backlight on it still drops to 4.67V.

Is there a way at all to keep a constant 5V on the 5V pin?
Logged

I am a total amateur at electronics and all things related. I have no education in the matter other than self taught.

Please factor this in

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 515
Posts: 31573
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but when I turn the LCD backlight on it still drops to 4.67V.
Have you got a resistor in series with the backlight? On most displays you have to fit one.

Quote
Is there a way at all to keep a constant 5V on the 5V pin?
Yes do not draw more current than the regulator can cope with. Also get a good quality supply.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My LCD has a resistor built in the backlight so I don't have to put one.

However, the Arduino is a cheap Chinese knock off. How can I know the regulator's specs? Is there a way to see just looking at it?
It says AMS 1117 on the regulator and outputs 5.15V without any load.

On my genuine Arduino it outputs 5.00V without load.
Logged

I am a total amateur at electronics and all things related. I have no education in the matter other than self taught.

Please factor this in

Pages: [1] 2   Go Up
Jump to: