Wiring buckpuck to arduino?

Hey guys so I've been searching the forum on how to wire a luxdrive buck puck to an arduino and I'm kinda confused. I think I have most of my code down for my project but I was also wondering if someone could review it.

First the wiring:

I will be using 2, lux drive 3023-D-E-1000P buck pucks. Now I made another thread and someone told me that I could power the arduino directly from my car's 12v battery....is this true? I was going to use the 5v REF output from the buckpucks to power the arduino but I read it doesn't work well....it makes it reboot over and over. Don't I need a regulated 5v to run the arduino? How do I wire this?

Do I need to connect anything in between the arduino and the ctl pins? Like a resistor?

I'm designing an LED angel eye system for my car and would like the LEDs to do dim according to a reading from a phototransistor. The brighter it is outside, the brighter the LEDs. The darker it is, the less bright they are.

The buckpuck accepts a 0-5v dimming control signal. Is this analog or digital? As the voltage increases, the output of the LEDs (buckpuck) decreases. I also want a delay so that when I'm under overpasses etc, they don't dim at first. Only when I am in a garage or it has become darker for an extended period they will dim...delay (3500). Does that work?

So here is my code. I haven't gotten the board yet so I haven't been able to see what values I get from the temt6000 sensor I'll be using....that's why there are just commas where numbers should be.

int rdriverPin = ; int ldriverPin = ; int temt6000Pin = ;

void setup () { pinMode(rdriverPin, OUTPUT); pinMode(ldriverPin, OUTPUT); pinMode(temt6000Pin, INPUT); }

void loop() { int val = analogRead(temt6000Pin);

val = constrain(val, , ); int ledLevel = map(val, , , ,);

analogWrite(rdriverPin && ldriverPin, ledLevel); //Is this ok? Can I use the && like that? Do I need to make a separate one? delay(3500)

}

Thanks!

When I started reading your thread I didn't know what a buckpuck was. After some looking, I found a blog where someone made a tank lighting system using buckpucks, and the Arduino. He even posts his code in the end!

If your interested: http://www.nano-reef.com/forums/lofiversion/index.php/t174406.html

cyclegadget: When I started reading your thread I didn't know what a buckpuck was. After some looking, I found a blog where someone made a tank lighting system using buckpucks, and the Arduino. He even posts his code in the end!

If your interested: http://www.nano-reef.com/forums/lofiversion/index.php/t174406.html

Thanks. I've been looking through that site as well. Lots of good info but I'm still confused.

Ok so I did a bit more researching and I found that I might need a PWM to analog converter?

The buckpuck accepts 0-5v for the ctl input. And since the analogWrite feature does PWM? It won't work with the buckpuck? I need a digital to analog converter?

Not sure how I do that either....I'm confused as to what values for resistors and capacitors I should use.

Do I need to use a transistor as to interface between the micro and the control pin on the BuckPuck and maybe some kind of opto isolation IC between the Micro and the Buck Puck to protect the micro board. What sort of signal do I need to drive this with I'm now not sure I've thought about this enough is it digital analogue PWM I need to use?