Arduino produces different outputs based on power source

Hi,
I have this little project, where I tried to use "generic arduino uno 3.5'' touch screen" shield with Arduino Mega, to achieve PDA-ish thingy, that would do stuff (I'm not that far into this project yet). I got the display working very well with this "MCUFRIEND_kbv" library, it was only matter of changing pin numbers, because generic shield is generic. I fine tuned the calibration values for touch sensor, to be perfectly on point, whilst being powered with USB cable, after which I tried powering it with 9V battery, and found it to be up to half inch off, only to be completely on point with USB, again. This much is completely true and infinitely replicable (I tried it few times, to see if I'm going mad).

Do you know cause of this behaviour, and how I should remove it, if possible?

EDIT: One thing I forgot to mention: the shield uses analogue pins for outputing data, that could probably lead to something like this. Do you think using purely digital shield fix this issue?

did you measure the resistance across the x-plate using a multi-meter and used that value as the last argument in the constructor ? I also thought about using that sort of setup but once i calculated the power consumption i realized that i could only use it for about half an hour, in fact a 9v block hardly had enough grunt to keep it going at all.

I did, then and now.
The resistance for me is 285, which is what I used the whole time.
I'm sure the 9V won't power this for long time, it was more of a test of portability.
I think I would probably use some cell or something.

i have used a battery-pack which consists of 8 AA Li-MH batteries, to power a small DMX-controller, of course the MAX-485 chip requires about 65mA and with that i can power the thing for about 45min, i thought to plug it in just now but of course it's flat.. i have never experienced the calibration effect that you describe tbh. if there is lack of power the screen just goes white. But try an extrenal wall-socket power-supply just to rule lack of power out as an option.

Hi,
Welcome to the forum.

Have you got a DMM?

If you are using one of these 9V batteries, then it is totally inadequate.

Measure the 9V with the controller and display connected?

Were on the controller are you connecting the external power sources?

Deva_Rishi:
i have used a battery-pack which consists of 8 AA Li-MH batteries, to power a small DMX-controller, of course the MAX-485 chip requires about 65mA and with that i can power the thing for about 45min, i thought to plug it in just now but of course it's flat.. i have never experienced the calibration effect that you describe tbh. if there is lack of power the screen just goes white. But try an extrenal wall-socket power-supply just to rule lack of power out as an option.

I was thinking it was power related, but believed 9V battery is totally adequate.

TomGeorge:
Have you got a DMM?

If you are using one of these 9V batteries, then it is totally inadequate.

Measure the 9V with the controller and display connected?

Were on the controller are you connecting the external power sources?

I have DMM, and I am using this exact battery.

What should I measure? I did not use external sources.

When you have a USB connection everything on the Arduino will work at USB voltage.

When you use another power supply everything will work at the voltage determined by the Arduino's on-board voltage regulator. With the best will in the world they are unlikely to be the same.

Have you tried another source of external power such as a pack of 6 AA alkaline cells or a suitable wall-wart.

...R

Robin2:
When you have a USB connection everything on the Arduino will work at USB voltage.

When you use another power supply everything will work at the voltage determined by the Arduino's on-board voltage regulator. With the best will in the world they are unlikely to be the same.

Have you tried another source of external power such as a pack of 6 AA alkaline cells or a suitable wall-wart.

...R

I tried running from wall adapter, it works for a few seconds, then precision goes really bad, then screen goes white. Over the few seconds the back of the Arduino got really hot. Maybe the regulator can't take the power throughput? Or is it just the wall adapter is bad?

sdasda7777:
I tried running from wall adapter, it works for a few seconds, then precision goes really bad, then screen goes white. Over the few seconds the back of the Arduino got really hot. Maybe the regulator can't take the power throughput? Or is it just the wall adapter is bad?

Most likely the first ! I run mine of a 12v 150mA adapter (old style coil type) and put an external 7805 and power the 5v pin from there. That works (for me...)

sdasda7777:
I was thinking it was power related, but believed 9V battery is totally adequate.

I have DMM, and I am using this exact battery.

What should I measure? I did not use external sources.

Measure the 9V battery voltage when it is connected to your circuit.
How much current does your circuit consume?
Tom... :slight_smile:

TomGeorge:
Measure the 9V battery voltage when it is connected to your circuit.
How much current does your circuit consume?
Tom... :slight_smile:

Voltage is around 5.2V and dropping 0.01V every 5-10 seconds.

sdasda7777:
Voltage is around 5.2V and dropping 0.01V every 5-10 seconds.

a 9v Block is to small, this reading confirms that it can not provide the power to keep the voltage near 9v, the vIn on an Uno requires 7v minimum. You know a 9vBlock is actually 6x 1.5v batteries, stacked on top of each other, now if you imagine the size of those, you will understand that maybe it is to small.

Meaning two 9V blocks would be okay?

sdasda7777:
Meaning two 9V blocks would be okay?

No NO NO

Get a pack of 6 x AA alkaline cells and save yourself hours of frustration.

...R

Maybe... but still not lasting long and still wasting about 40% of the power in the regulator alone (to drop 9V to 5V you simply convert that 4V into heat, wasting it).

A set of AA batteries can produce a lot more current (a few amps vs. ~100 mA for a 9V block), and has a much higher capacity (some 2,200 mAh vs. about 500 mAh for a 9V block). 5xAA is minimal, 6xAA is better.

You can also take an old phone charger that produces 5V output and power the Arduino with that, either through the USB connector or through the 5V/Vcc pin (not the Vin, that needs >6.5V).

Hi,

Voltage is around 5.2V and dropping 0.01V every 5-10 seconds.

Is that the voltage on the 9V battery terminals?

Tom.... :o :o :o