Advice regarding analog inputs and outputs of Arduinos

Hello all,

I'm relatively new when it comes to handling micro controllers and extremely new when it comes to arduinos. I'm in need of some advice and would appreciate some assistance.

I'm currently working on a project that will dim a series of LEDs (without PWM) using a photodetector of sorts (thinking photoresistor but will explain in a moment).

Basically, I wish to control an analog input via the photoresistor circuit and based on the read value, output a certain voltage corresponding to the LEDs.

I currently plan to have each LED on a different output channel and adjust them one at a time. Once the LED, on channel 1 for instance, reaches its maximum voltage value, I plan to have the micro controller I use (hopefully arduino) switch channels and start adjusting the second LED. (NOTE: Yes, normally LEDs don't use voltage as a variable measure, but I have a buck converter circuit between the MC and the LEDs that only needs a voltage to work correctly. I cannot give more information than this).

Specifics:
Variable input control (thinking current sensing)
Several analog output pins (hopefully enough to control upwards of 24 LEDs)
Each analog pin able to output on a range of 0-~1.2V

So here's where my questions come in:

  1. I'm assuming Arduinos do not need their own programming board. I can simply plug one in via USB and program it that way, correct? (most other microcontrollers require expensive development boards and I'm wanting to avoid that).

  2. Can a typical Arduino read an input current? I'm considering using a photoresistor with a constant voltage source. This would vary current and would probably be the simplest photodetector circuit I could build.

  3. Can anyone recommend an arduino that has the output pins necessary for my project? I'm using, at minimum, 24 LEDs and an arduino with about 20 analog outputs would be perfect for this (as we plan to have two separate detector circuits with each one controlling separate LEDs (20 on one, 4 on other).

Thank you for your assistance and any guidance you can give.

  1. yes
  2. no it can only read a voltage. A current passing through a resistor gives you a voltage.
  3. No arduino has an analogue output, the only way is to use the PWM and smooth it.

Dimming an LED by applying a variable voltage is not a very good idea basically it dosen't work, can you explain more about why you think it would.

I posted it in my post (as an edit, but I guess you didn't see that).

I am actually using a Buck converter circuit that varies current based on a fed voltage (from 0-1.2 volts). That's how I planned to vary current. I suppose I can use a PWM input to the converter; I'll look more into that. Thanks for the assistance.

I suppose I can use a PWM input to the converter

Yes feed the PWM into a RC low pass filter to smooth it, that will control your regulator.