# Basic electronics question

Hello. I have programming experience, but I am learning electronics from zero. I messed around with my breadboard and a battery and made circuits to light up LEDs, put in a switch, etc. I see that the core has the the volt pins, D# pins, and then a ground pin. Can someone explain how the 3 pins on the core correlate to 2 “pins” on a battery? Thanks in advance.

D pins mean digital pins from D0-D7.

A pins mean analog pins from A0-A7.

Look at the Arduino basics or docs.spark.io to find more information

The 3V3 pin takes in 3.3v input and Vin takes in 5v. Batteries we usually use do not output exactly the same voltage (there are those with the same though) so don’t attempt to connect it until you know what’s going on.

Safest path would be to power it via USB.

I am powering it by USB, and I understand at a high level what A and D mean. I’m just trying to understand in terms of very basic circuits. For example, does the ground pin = the negative terminal on a battery? Do the 3V3 and D pins both represent the positive terminal on a battery?

Definitely not. Both the D and A pins have nothing to do with power, they're GPIO pins. Do not stick a battery in any of them before you know what you're doing.
This diagram might be of use:

I think I’m doing a poor job of explaining my question. I’m not using a battery at all with the core, just the USB. I’m trying to conceptualize a circuit with the core vs. a circuit with a battery. Take this image from the starting tutorial http://i.imgur.com/QZUZvmE.jpg. To my beginner mind the D0 pin is like + on a battery and GND is like the - on a battery. If so, then what is the 3V3 pin? Is that also like a + on a battery?

``````D# ---------> Resistor -------->  LED -------> GND
``````

In this case, the D# is known as a General Purpose Input Output (GPIO) pin where for your circuit example it will be configured as an OUTPUT

For a digital pin, it will output 2 voltage level and in the case of a Spark device it is either 3.3V or 0V (gnd you call it)

The maximum that each pin can supply is around 20mA of current so the pin is actually driving current through the circuit and making the led light up

Another way to hook up the circuit is:

``````3V3 -----> Resistor -----> LED ----> D#
``````
1 Like

This has some explanation to your question as well (it’s the same question).

Let me try to fill in your analogy just a bit but don’t take this too literally–it just to explain how it works:

• GND is like the “-” terminal of a battery
• 3.3V is like the “+” terminal of a battery
• Each digital I/O pin (D0-7) can be an input or an output
• When D0-7 are outputs, they are like a SPDT switch where the central pole is connected to the pin and the other switch terminals are connected to +3.3V and GND so each output can be +3.3V or GND depending on the position of the switch
• The Analog pins (A0-7) can also be used as digital pins
• In addition the analog pins can be analog input using a built-in analog-to-digital converter
• Some Analog pins can be “analog” outputs which are just like digital outputs (think switch between +3.3V and GND) except the switch gets thrown up or down quickly based on timers so the output voltage depends on how long the switch spends on the +3.3V terminal versus how long it is on the GND terminal

Hope this helps.

4 Likes

Okay, so if I understand right, 3V3 is always like +, GND is always like -. D# could be like either +/- depending on how it is configured?

yes you can say that but don’t usually say plus minus. It’s more for easy identification on the batteries but yeah!

1 Like

D# are more like individual on/off switches, rather than +/-