Using the additional I/Os on the Arduino bit

Hi Wolfgang,

I moved this post to its own topic, thinking that others will be interested.

Currently the best way to attach a bitsnap to any circuitboard, Arduino bit included, is by snipping a wire bit in half [ http://littlebits.cc/bits/wire-bit ] and then separate and strip the wires. Viola! two bitsnaps ready for connection to a PCB or bread board. It is safe to solder directly to the Arduino bit through holes.

If you’re new to soldering, I’d suggest practicing on some broken circuit boards first.

We are aware that there is a lack of easy places to connect to VCC and GND and have made it easier in the new revision. On the current Arduino bit you can connect to power from the 2 x 3 pin ‘In-Circuit Programming’ [ ICSP ] header.

Looking at the top of the bit with all the text upright, VCC is the bottom left through hole and GND is the top left through hole. These six through holes are in the bottom middle of the board and unlabeled.

ASCII ART ALERT:

                    GND ---> O O <--- Reset
 Digital Pin 16  / MOSI ---> O O <--- Digital Pin 15 / SCK
                    VCC ---> O O <--- Digital Pin 14 / MISO

As for protection, the underlying hardware is fairly rugged but here are some tips:

1 - Don’t connect a pin directly to GND or VCC, this could create a ‘short circuit’ at points. Instead connect pins a 10 kOhm resistor, and the other end of that resistor to power.

2 - Research your specific application. Connecting to a +/- 15 volt modular synth system requires a very different connection when compared to a headphone output or an audio mixer input. Search for examples using old Arduinos, these examples apply to the Arduino bit as well. If you are just connecting to the Synth Kit, the both the Synth and Arduino are safe for every connection I can think of right now.

3 - Measure twice. A $5 multimeter will save your expensive circuit many times over. Watch a quick howto video if you have any questions how to use an electrical meter. Many times its the only way to know why something isn’t working; unfortunately we humans can’t see much of electricity directly…

4 - Don’t work on live hardware. Turn things off and disconnect from powered electronics first and then it doesn’t matter if your hand slips, etc…

5 - Secure your wires beyond the solder. Solder is not a strong physical connection, it is a strong electrical connection. You will save a lot a frustration if you glue/tape/wrap/etc all your wires down in addition to soldering. Thin wires+solder can break with 3-5 bends.

Hope this helps and happy hacking!

Ed

Continuing the discussion from Ask a littleBits engineer:

4 Likes

Hi Ed,

Thanks for posting this super-helpful information on the additional Arduino I/Os. Do the A2, A3, and A4 pins have built-in filters like the analog switches on the d5 and d9 pins? Or would these pins require additional electronics, such as those shown in http://www.instructables.com/id/USB-MIDI-Littlebits-synth/, to be used with the Oscillator bits?

Thanks,

David

Hi Ed,

thanks much for the helpful reply, and please pardon my long silence (too much stuff going on at the moment). As I only plan to use the additional I/Os with other littleBits, I should be save by just connecting the “snipped-in-half” wires to GND, VCC and the accoridng I/O pins, without having to use any additional resistors, correct?

But your answer #1 made me curious nevertheless (and confused me a bit, quite frankly): “Don’t connect a pin directly to GND or VCC, this could create a ‘short circuit’ at points. Instead connect pins a 10 kOhm resistor, and the other end of that resistor to power.”

In my understanding, the “power” you mention is the VCC, so I have no idea how I should connect a resistor to VCC and to power. Please pardon my ignorance here, but where exactly should I put resistors?

Like this (Wx denoting the cables of the Wire)?
VCC—R10kOhm—W1
SIG—R10kOhm—W2
GND—R10kOhm—W3

Thanks much in advance,
best regards,
-w

P.S. And as “djpeterso23662” asked, will the additional analog outputs be pure PWM outputs, or do they have the additional lowpass filter built-in for analog outputs, or are they even real digital-analog outputs?

Hi Wolfgang

I was more trying to give some general pointers than instructions on connecting the wires. Apologies if it was confusing. What I meant was, in general, do this:

VCC==R10kOhm==|
              |
SIG===========|

or:

SIG==R10kOhm==|
              |
GND===========|

instead of:

VCC==|
     |
SIG==|

or this:

SIG==|
     |
GND==|

When connecting the wires to the Arduino, you do not need any resistors at all! Just connect the VCC to the wire’s VCC, GND to the wire’s GND, the new input or output to the wire’s SIG.

Another important detail about connecting the wire: When you snip a wire bit in half, you end up with one input bit, with a raised “circled x” littleBits logo on top of the snap, and one output bit, with a recessed “circled x” littleBits logo on the snap. Make sure to connect the input bit the the analog inputs [a2, a3, a4] or digital pins you intend on using as inputs. Conversely, connect the output bit to the digital outs.

The additional analog outs (d10, d11, d13) will be “standard” Arduino analogWrite() PWM signals without filtering.

Best

Thanks for the information, this adds so much versatility to the Arduino bit! I have a couple project of ideas, like attaching a serial LED matrix (yes, I know I can do it with ATmega, but littlebits makes it so much more fun).

Too bad shipping is expensive to Australia ($50!!)… I guess I’ll wait till littleBits comes out with more cool stuff and add an arduino bit to it.

Hi all (and ideally also @Philip_Verbeek who is really helpful) !

I read this conversation and am still confused. I want to use more analog inputs than the snappable A0 and A1. I am under the impression that I can’t use d1/5/9 for this purpose, but can I use d0 as analog input? The inward arrow suggests that it might work. Simply assigning pins as in/outputs in the Arduino code wouldn’t work?

As for VCC and GND,

My understanding of the ASCII-art is shown below:

Can I use this VCC and GND for all three analog 2/3/4? Won’t individual wires touch and short (or something)? I’m an electronics newbie, so it’s unclear to me why I need to use VCC and GND when all I want is the analog input signal, but my guess is that the circuit isn’t closed otherwise. I’d be happy to be corrected on this! :grinning:

Thank you.
Caroline

Hi @Car0line,

Basic rule: Connect all the VCCs together and all the GNDs together.
You can also use the VCC and GND from the protoBit. It’s all the same;)

The “d” in d1 or d2 etc stands for digital and you can only read digital signals with these.

the “a” in a0 or a4 etc stands for analog and you can meassure analog signals with it.

See the picture below:

In your arduino sketch use this for analog: You dont have to declare if its an input or output.

void setup()
{
//nothing
}

void loop()
{
int Voltage = analogRead(A3);
}

for digital you have to declare eg in your setup if its an input or an output.
Like this:

void setup()
{
pinMode(2, OUTPUT);
pinMode(5, INPUT);
}

void loop()
{
int val = digitalRead(inPin); // read the input pin
digitalWrite(ledPin, val); // sets the LED to the button’s value
}

Hi @Philip_Verbeek !

Thanks, things are clearer, but I still need to clarify something with respect to the physical wiring of sensor bits to a2/3/4. You say to connect all VCCs together and all GNDs together, and your photo suggests that they are linked via a 10k resistor. Say I have 2 sensors, A and B. I wire A’s SIG to a2 and B’s SIG to a3. I am left with both A and B’s GND and VCC wires - 4 wires in total. But I have only one GND and one VCC in the ICSP, i.e. two holes for four wires.

What do I do? Should I also add a 10k resistor to each sensor? Sorry if your previous reply answered this, and I just didn’t get it. :grinning:

Have a good weekend!
/C

Hi @Car0line,

The 10K resistor is actually a potentiometer(variable resistor). It was an example on how to connect a sensor…

So solder all the GNDs together and all VCCs together to the VCC and GNDpin on the ICSP connector.

No problem , Let me know if you have other questions.

Have a great weekend too!

1 Like

I am interested in using the modified wire bit for input/output. Instead of Arduino, I’m trying to interface with a micro:bit. I have been trying to use the protoBit, with only minimal success.

I’m thinking that I need to dig deeper into these Arduino threads and transfer the knowledge to a micro:bit interface.

Is this thread still alive? Has anyone posted anything related to micro:bit already?
Thanks.