Getting started with arduino

Recently I have started to get into electronics, I have breadboards, a multimeter, all the usual suspects of components and am reading endless books!
For christmas I'm thinking of getting an arduino as it seems the next logical step to take for me; I'm pretty sure I would like the Mega 2650.
Just wondering, as well as using it as usual, would it be (efficient or not) possible to program a row of, say, 10 pins to output voltages from 1-5 volts (is 5v the max the mega can supply? I know it is for the uno) to use as a PSU for my breadboard when I want different voltages? Or would that just be a stupid thing to do?
Any help much appreciated :slight_smile:

You could use an adjustable output regulator cards for that.
The Arduino can only provide 3.3V and 5V at low current levels.
Or a 0-5V PWM output that you could filter for DC-ish signal at even lower current levels.

Adjustable level output switching regulators.

Other than the Due on 2 pins, none of the Arduinos can output different voltages. Their output pins are either 0v or the base frequency (3.3v or 5v, depending on the microprocessor and how it is setup). The way variable voltage is done is to use PWM (pulse width modulation), which rapidly turns the pin on/off. On things like LEDs, this allows you to dim the light, since the human eye will average out all of the pulses (much like it does with lights using alternating current). Similarly for some motors, by turning it on/off at a controlled rate will give you the effect of variable voltage.

Each different Arduino or Arduino work-alike have different numbers of pins that can do PWM. For example, the Uno has between 2-6 PWM pins (depending on other things that might use the same timer internally and prevent the pin from being a PWM pin). The Mega 2560 has between 12-15 PWM pins. So, if PWM wil suffice for your needs, you can use it.

As Crossroads said, all outputs from Arduinos are at low current. So, you might need to read a data sheet to see if whatever your device can handle the current Arduinos put out.

If you need true analog voltage levels, you can get SPI or I2C add-on boards that do digital-to-analog (DAC) conversions.

10 pins to output voltages from 1-5 volts ... to use as a PSU for my breadboard

PWM is not going to be a PSU for anything. You may be able to get 20mA with lots of ripple, even with good filtering.

Ok thanks very much.
Just one more question:
Am I right in thinking that the mega has a 9v pin? If so how much current can it draw?
Also how much can the 5v and 3.3v pins draw?
Ok that's more than one question...
Thanks in advance :slight_smile:

Musicboy:
Am I right in thinking that the mega has a 9v pin? If so how much current can it draw?

No, that is your power input to the regulator.

Musicboy:
Also how much can the 5v and 3.3v pins draw?

5V - a couple of hundred milliamps.

3.3V - a (very) few tens of milliamps.