Small Arduino... with lots of Analog Inputs?

Hi,

I’m working on a project which requires 5 analog input pins AND needs two more to communicate with I2C devices. I guess the question is then, what is the smallest Arduino which has 7 total analog pins?

I also need to run it off 3.3V and communicate wirelessly using a bluetooth modem. I looked around and couldn’t find anything that suits my needs but I figured maybe I overlooked something.

Thanks.

All Arduinos have seven or more analogue inputs, AFAIK, although they might be assigned to digital I/O on the connectors. Chose the smallest one.

On the Uno version, Digital 6 and 7 are also Analog 6 and 7 as I recall.

All Arduinos have seven or more analogue inputs

No, most Arduinos only have 6 analog inputs, which is all that exist on the ATMEGAxx8 DIP package. And two of those are shared with the HW I2C peripheral, so you don't get to use them if you want I2C as well. Note that you want 5 A-D pins plus I2C; it's NOT universal that I2C always shares pins with the A-D (for instance, the ATmega644/1284 doesn't have ANY special functions sharing the pins with the A-D.)

The non-DIP packages with 32 pins add an additional two analog inputs, so one of the SMT versions (nano, etc) might work. (I don’t know if all of them connect the IC pins to board pins, though…)

It looks like the 32u4 has plenty of analog IO not shared with I2X, so the (coming real soon now) Leonardo or clones would probably work.

Yes, I was wrong. It’s the other way round - the analogue inputs can be used for additional digital I/O.

Thanks for the input. I’m actually in a really strange situation because it seems that none of the smaller boards have more than 6 analog inputs, and the larger boards are too big for my application. I was hoping to use a Pro Mini; this is to be mounted on a glove or armband so it has to be decently small.

The only small Arduino that fits the bill is the Arduino Fio, but alas, I’m using bluetooth to send data over serial to my computer so I don’t want to use the built-in Xbee.

So, two questions:

1.) Is there any way to remove the Xbee from the Fio and use my bluetooth mate/standard FTDI programmer instead? That would solve my problem.

2.) If I2C is digital communication, why does it need to be done on analog pins? Can it be modified to use two digital pins?

I’m using this for a glove with a type of flex sensors. Worst case, I may have to just use a Pro Mini and have four fingers assigned continuous values and one a digital bent/not bent value.

Thanks

In theory, you could bit-bang I2C on any two pins.

I’d just use another MCU, such as a PIC, that didn’t have those restrictions.

Would a femtoduino work?

nrotella:
Hi,

I also need to run it off 3.3V and communicate wirelessly using a bluetooth modem.

Thanks.

I would say go with the Arduino Pro Mini since that can run on 3.3V. It also has 8 Analog Pins and 4 Digital I/Os.

nrotella:
1.) Is there any way to remove the Xbee from the Fio and use my bluetooth mate/standard FTDI programmer instead? That would solve my problem.

I know there are [Bluetooth XBees out there you could try using that if you want Bluetooth, but I dont know if you can use your FTDI programmer.

nrotella:
2.) If I2C is digital communication, why does it need to be done on analog pins? Can it be modified to use two digital pins?

I know its possible to do a “software I2C master” on any pair of digital pins. See [this link for more.

As for extending I2C bus length, that is an issue. I2C was designed to be a used only on a circuit board, not over cables. Not that that’s stopped people from trying. :slight_smile: The theoretical length using standard ribbon cable is around 8m. This is because as the cables get long, they start to act like a capacitor, which slows down changes in the data signals, making them hard to read. To counteract this, you can use external “pull-up” resistors to make the signals restore faster.

Instead of the standard 4.7k resistors, use lower values on longer bus lengths. Try 2.2k or 1.5k.

See a discussion of bus length here:

http://www.i2cchip.com/i2c_connector.html#Bus%20Length

For some info on I2C on Arduino, see:

http://www.uchobby.com/index.php/2008/0 … on-to-i2c/](SoftI2CMaster: Add I2C to any Arduino pins – todbot blog)](http://www.dontronics-shop.com/990016-xbee-bluetooth-module.html)