powersource

i guess it might be a stupid or silly question but i dont know
what will happen if we connect both usb cable and a dc battery to the arduino which source will be chosen?

It depends on what arduino you have, the newer ones will switch automatically to a battery if you have it, the older ones you need to change a link to choose what source of power to use.

i have the new one :slight_smile: duemilanove
that fixes my problem then when powered from the usb it didnt have a atandard v ref so i had some trouble with a few analouge sensor
and i was scared to conect both battery and usb i thought some thing would blow up :o

it didnt have a atandard v ref

How come? That doesn't make sense.

i didnt have a standars v ref i was fluctuating when powered via usb
now does it make sence?
yeah i know that uno is the new one :slight_smile:
but i think itz not released yet is it ?

If you are running external power, then check the voltage at the +5v pin to see what it acually is. I have a chinese DFRobot clone board that, when externally connected to 9v, the 5v pin reads ~7.5v.

i didnt have a standars v ref i was fluctuating when powered via usb

The reference voltage on an arduino is connected to the supply voltage. This is fine for most cases where the signal is related to the supply as well, like measuring a pot. When it will give you variations is if you are measuring a voltage not related to the supply voltage, like from a battery.
If this is important you can either use an external regulated reference voltage or switch over to the internal 1v1 reference.

thanks :slight_smile: