1

I am brand new to Arduino/robotics and am trying to take baby steps. First I'd like to just power an Arduino and an LED from a 9V battery like so:

enter image description here

No programming, just simple circuitry. The battery powers the Due, and the Due in turn powers the LED.

A few concerns here:

  • Will the 9V battery fry the Due, which I believe is expecting 3.3V? If so, what can I do to reduce the voltage/amps?
  • Will the 9V battery fry the resistor and/or LED?
  • As you can see by my question marks, I'm not real sure where to connect the battery to the Due (both positive & negative terminals) as well as the where to connect the breadboard to the Due (again, both terminals).

Any ideas?

1
  • You can connect the battery to VIN. That way the onboard regulators will bring it down to 5v and 3.3v. If you want to connect the led to the 9v battery directly, you might have to use a bigger resistor value.
    – Gerben
    Commented Jun 6, 2015 at 11:26

1 Answer 1

4

What you want is something like this (ignore the fact that my mini breadboard is stuck to a shield): Simple LED example with no software.

My starter Arduino kit came with the connector for the 9 volt battery into the power socket on the Arduino, you may need to make one. You cannot connect the 9V battery to any other part of the Due that I am aware of (without damaging it!).

It is perfectly safe to power your Arduino with 9V this way, there is circuitry to step the voltage down to the 5V and 3.3V that the board requires.

In the connector strip nearest this power socket (labelled Power on my board) there are a couple of Gnd connections and 5V and 3.3V connectors perfect for what you want to do. I have used the 3.3V connector in my photo, but the 5V one should also be fine with the right resistor.

In your picture you don't appear to have anything connecting the LED to ground, but other than that, if you were to connect the battery up as I have shown and the red and black LED connectors to 3.3V and Gnd respectively, it should work as desired.

As a next step, you could load the sample sketch Examples->01Basic->Blink, write it to your Due, move the red LED connecting wire to pin 13 on the opposite side and your LED would flash (along with one of the LEDs on the Due board itself).

Edit (to specifically address your concerns):

  • The 9V battery will not fry the Due if it is connected through the power socket, which has circuitry to drop the voltage to safe levels.
  • The 9V battery will not damage the LED or resistor as they are connected to 5V or 3.3V that the Due outputs, not the 9V from the battery.
  • Only connect the battery through the power socket. If you have a good quality steady 5V power supply, you can power the board through a 5V pin (at least I have been able to), but you bypass the voltage regulation circuitry that way and it is not recommended. Connect the black wire from your LED to any Gnd pin, connect the red wire from the LED to 3.3V or 5V.

Additional edit: You can connect the battery directly to the Arduino Due board without needing a plug to connect to the power socket. Connect the red battery wire to the Vin pin and the black battery wire to a Gnd pin.

3
  • The only thing I'd add to this thorough answer is, if you connect a barrel plug to your 9v battery (b/c I don't see one in your - OP's - photo) make sure to connect 9v + to the center-pin and 9v - to the outer shell.
    – JRobert
    Commented Jun 6, 2015 at 11:36
  • Thanks @Mick Waites (+1) - one quick followup question: please see Gerben's comment under my question. Gerben alludes that there is something called Vin which handles non-5V external power supplies. Sure enough, on the Due's website (under Power) they define Vin as: "The input voltage to the Arduino board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source)." Can you confirm that I could use Vin to power my board directly from the 9V battery? Thanks again!
    – smeeb
    Commented Jun 8, 2015 at 0:50
  • 1
    @smeeb - Gerben is completely right. I have never used the Vin pin as I use a stable 5V supply for my board in my projects. The voltage limits for the Vin pin are 6-16V, but 7-12V is recommended. This saves you having to get a connector for your battery to fit the power socket. You would connect the + pole of the battery to Vin, and the - pole to Gnd. You would then connect your black LED/resistor wire to another Gnd pin (it would be difficult to plug 2 wires into the same pin socket, but it would work if you could manage it) and the red LED/resistor wire to a 3.3V or 5V pin. Commented Jun 8, 2015 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.