Powering Arduino and Servo from same 12VDC battery

Solved: see below reply

Issue:
I'd like to power the following setup with a single 12V battery. Currently this setup only responds to switch inputs when the Arduino is connected through usb. When connected to 12V and pressing a switch. A light onboard comes on but does not change servo position.

Components
Arduino: Uno R3
Power Supply: 12V DC 90AH battery
Voltage Regulator to Servo: Pololu 6V 15A Step-Down Voltage Regulator D24V150F6
Servo: Power HD 1235MG
Servo Power Rating: 6.0v@35kg-cm, 7.4v@40kg-cm
Digital Inputs: 2 momentary switches

Any advice whether it's possible to use the single battery, or what I may be missing?

Fit some extra LEDs to the arduino and write some extra stuff into your sketch such that they will blink a bit if things are running, you could have them flash out different morse code like patetrns depending on which parts of the coe are running. This will help you see if the arduino is running properly or managing to just about power on but not do anything else. You will need to say how you are powering the arduino, are you putting 12V into the Vin pin? A full circuit diagram would be easier to advise on than a list of components.

Circuit diagram please. A single battery should be o.k. IF everything is connected correctly.

It might also be useful to see the code you're using.

Steve

Stall current for that servo is 9 Amps, can your battery supply that current?

I solved the issue before coming back to check for input. I didn't notice there was a VIN pin on the UnoR3 :-\ doh! Wiring the voltage regulator (which is powering the servo) to the VIN and GND pins on the arduino instead of to the battery was the correct solution. i think it was a grounding issue even with the regulator ground wired to arduino GND. Or possibly the consecutive delay in the setup script.

To answer some of your questions though:
Infraviolet
Powering the arduino through 12v battery to the barrel jack. Good idea with the leds. I was only measuring current with multimeter.

slipstick
May post back a circuit diagram at a later time. Do you have any recommendations on diagramming software for simple circuits?

JCA79B
Yes, currently using a 12v marine battery and powering the servo from a 6V@<=15A voltage regulator.

working code for this particular servo (Power HD 1235MG 6.0v@35kg-cm) :

///////////
#include <Servo.h>

const int leftButtonPin = 12;
const int rightButtonPin = 13;
const int servoPin = 9;
const int defaultPosition = 85;
double pos = 85.0;

Servo servo;

void setup() {
pinMode(leftButtonPin, INPUT);
pinMode(rightButtonPin, INPUT);
servo.attach(servoPin);
Serial.begin(9600);
servo.write(defaultPosition);
delay(1000);
}

void loop() {
int leftButtonState, rightButtonState;
leftButtonState = digitalRead(leftButtonPin);
rightButtonState = digitalRead(rightButtonPin);

if(leftButtonState == HIGH && rightButtonState == HIGH){
pos = defaultPosition;
printInfo();
delay(200);
}
else if(leftButtonState == HIGH){
if(pos > 20){
pos = pos - .4;
printInfo();
}
}
else if(rightButtonState == HIGH){
if(pos < 160){
pos = pos + .4;
printInfo();
}
}
servo.write(pos);
delay(5);
}

void printInfo(){
Serial.print(pos);
Serial.println();
}
///////////

Thank you all.

Brendan

JCA79B:
Stall current for that servo is 9 Amps, can your battery supply that current?

90Ah lead-acid battery, sure it can handle 9 amps. The question I'd ask is do you have the right fuses
to protect the wiring?