Go Down

Topic: unstable voltage with arduino micro? (Read 271 times) previous topic - next topic

mangiari

I have an arduino micro. When running powered with USB from my notebook, I can input all distinct values between 0 to 1023 using a 10K potentiometer with the middle leg on an analog input and the outer ones at ground and 5V from the arduino board.

Somehow, when I use the VI pin for extern power without USB and I plug it to 9,6V (8xAA) the values from the analog input jump around like mad. The voltage seems to be quite unstable. I output the value on an LCD and it's impossible to read them, when running on the 8xAA pack.

Can this be a damage of my board, or did anybody else have similar problems?
Might it help to use a L7805VC to power the arduino micro, or maybe use a capacity on the analog input?

Normaly I never had problems with unstable voltage from batteries and I double checked them and also there is not much load on those batteries, actually only the arduino reading the potentiometer and the LCD, nothing to impress a fully charged 9,6V 2500mAh battery pack.

I hope I picked the right forum for this question, any help is welcome!

Peter_n

The Arduino Micro makes its own 5V, which is ofcourse very stable.
The values should be stable. Can it be bad contacts of a breakboard ? A missing ground ? Reading the wrong analog input ?

Can you upload a photo of it ? so we can check the wires. And upload your sketch.
Hello, I don't get notified of new posts after the forum update. When you need my help, try sending me a PM; yell very loud; knock on my door; whatever is needed.

mangiari

Yes I know what it is supposed to do, read all the documentation before even touching the thing.

I also already thought about a bad connection of the input voltage, but my micro sits in a 40 pin IC socket, firmly pressed in. All pins work fine and I realy use all of them, except for the ones that are not connected internaly and the reset pins, which I do not need. I think it's rather unlikely that the VI pin which sit's in between others is not getting good contact. Especially because there is not much current needed. Soldered connections of the socket I also double checked, it's all quite solid.

In fact I'm not 100% sure whether it's a problem with the current, I just recognize the unstable analogRead, when only powered via VI pin. When having it mixed powered, so my circuit uses the 9,6V for the extern parts and the arduino micro uses the 5V from USB, everything is fine.
The problem with the unstable analogRead values occurs at the beginning when selecting run modes and similar from the menu. In this case only a small 2x8 LCD and the resistor of the potentiometer use any additional power from the battery. Later when running, there are engines pulling notable current from the battery, but at that time I do not care about any analog reads any more.

I will make a short video of the behavior.

Grumpy_Mike

Quote
but my micro sits in a 40 pin IC socket,

What sort of Arduino is this?

Is it home made?
Does it have enough decoupling on the power supplies?

Peter_n

A 9,6V 2500mAh battery pack should have no problem to supply current for the backlight of the display.
Does the voltage regulator get hot ? Can you measure the 5V with a multimeter ?
Hello, I don't get notified of new posts after the forum update. When you need my help, try sending me a PM; yell very loud; knock on my door; whatever is needed.

mangiari

Like mentioned in the first post, I use an original Arduino Micro, like described here. I bought it from a large German electronic store, so I guess it's quite unlikely that it is not original.
As it fits into a bread board very well, of course it also fits a standard IC socket. The only thing is, that there are no standard sockets with the exeact number of pins, so I used one with some more pins and the arduino sits in the middle of it. Here you see how those sockets look like.

I uploaded a small video where you can see the behavior of the input values on the LCD.

Somehow I have to correct my information: The unstable values appear always whenever the battery pack is connected to VI, no matter whether USB is also connected or not. Only when I disconect the 9,6V from the VI pin, the analogRead get's stable.

Actually I do not need the 9,6V on the arduino, I just need them on the engine shields, so I could also enpower the arduino with exact 5V by using some extern part like L7805VC

I just wonder how the problem can occur, as the arduino can only compare the voltage at the analog input pin with it's own inner voltage. So even when the voltage is a little bit unstable, it should not lead to unstable analogRead values.

In the moment I have no external capacities or inductors on the board, So there should not be much to enable any oscillating behavior.

After having found out today, that the values are also jumping around when connected to 9,6V AND USB, I even increased my doubt in a bad connection from the battery to pin VI

As the arduino socket is soldered and all the parts are also soldered and connected, it is not so easy to test, what will happen If I only use the 9,6V on the engine shields and not on the arduino. In fact there is not even place on my board to do this correction  :~

Peter_n

Thank you for the video, it is very informative.
When you start turning, the value jumps to 500 or 600, while it should be still below 100.
At the end, with the knob turned more, the values get more stable.
It could be a bad potentiometer, but then again, why is it stable with usb power.

I'm watching the video a few times, but I don't know what is wrong !

When the external voltage is connected, the usb power is not used. So as soon as external power takes over, you get the unstable values, regardless whether the usb is connected or not.

When no one knows the cause, it is time for some rigorous actions.
Make a second one without using anything from the first one. A new Arduino board (the Micro or another board), new potentionmeter, new wires, new battery, new cables and another computer. Test that, it should work.
Then you can try to exchange parts with the first setup, to see what caused it.

Can you find a wall wart of 7.5 to 12V DC ? You probably have some devices in the house that have it. Try that.
There is even the posibility that the problem is in your sketch. Or you use components or modules for 3.3V. The usb power is lower than 5V, most likely around 4.8V or even lower, 4.6V or so. With the battery, the 5V should be 5V. That can make a difference in one way or another.
Hello, I don't get notified of new posts after the forum update. When you need my help, try sending me a PM; yell very loud; knock on my door; whatever is needed.

mangiari

I have tried out some more things: Using 4 batteries instead of 8 gives me a voltage around 5.0V and the only difference that I could see is that the LCD seems to have another voltage on the contrast resistor also, because it gets difficult to read it. But the jumping values are the same.

Then I used a multimeter and checked the input voltage with the 8 batteries. It shows 10.02V and the second fraction digit never changed, although the LCD showed the same jumping values. Then I measured the 5V from Arduino board and also that voltage stayed exact the same on the multimeter display something around 5V.

Somehow I have no idea if the multimeter does maybe some damping of the input voltage.

My next try will be to use a Micro-USB connector, plug it to the battery using a L7805VC and see whether the Arduino will run ok with the 5V from my battery, when it get's them through the USB connector.

Strange anyhow...

Peter_n

Multimeters reduce the mains 50Hz/60Hz influence.

However, it is getting stranger and stranger. I have no clue what it can be.

It must be something we overlooked or you didn't tell, either in the sketch or in the way it is connected.
Hello, I don't get notified of new posts after the forum update. When you need my help, try sending me a PM; yell very loud; knock on my door; whatever is needed.

Grumpy_Mike

Try it again on the batteries only this time connect a wire from the ground on the arduino to the ground of your computer, nothing else.
Does it still misbehave?

Go Up