External supply of energy for sensors

For a school project i was using some reles, leds and sensors, but my arduino uno was reseting. To solve my problem i decided to make a "shield?" to power my sensors. I used some AAA batteries supllying around 10V and used a tension regulator to decrease it to 5v. I connected the "+" of the 10v battery to the Vin of the regulator, the "-" to the Gnd of the regulator and the Vout i connected to a 5v sensor. The Gnd of the sensor i conected to the "-" of the battery, but the sensor didn´t worked. I used a voltimeter and the 5v was reaching the sensor but there it was around 1.2A! and it was reading alleatory values. Afraid of having damaged the sensor i put it in the 5v and Gnd of my Uno and it worked fine.... Do u know why my "shield?" didn´t worked? Because i thought that if i delivered 5v to it it would be fine and work.

Sorry if you find my english bad ;-;

Without the circuit and sensor information we can only guess.

Weedpharma

Sorry... here are some photos. Im using Pololu´s Qtr-L-1A reflectance sensor:

as u can see through the photo the sensor is on bcuz the infrared led is on, but i read strange values in athe analog input and when i change the power supply to the arduino the sensor gives non-aleatory values.

The reason is that you have not joined the ground connection of the board to the Arduino. This leaves the input floating and it will pick up stray electric fields.

Why are you using the battery pack?

Run it all from the Arduino.

Weedpharma

It worked! it worked!
thank u very much weedpharma! Now the sensor is working fine! i thought that i would have to put some capacitors!