First of all my background isn't in electronics so I apologise for any bad terminology, my only prior experience with arduino is tinkering with Ardupilot on a board with fully integrated sensors.
For a current project I need to rapidly prototype a device which translate the motion of an accelerometer to a key press on a keyboard. Essentially i'm trying to emulate a number-pad input with accelerometers (this input is then fed into a predictive text algorithm on a windows based PC).
For the PC to recognise the device as a keyboard, I understand a Arduino Leonado (or Due?) is best suited as they interface directly by USB allowing the plug and play compatibility currently required.
I'm looking at using a minimum of 10 single axis analogue accelerometers (with the likely candidates being Grove - Single Axis Analog Gyro's or ADXL193) to give an indication of +ve or -ve translation/rotation, I have no need for high quality 3-axis data for this proof of concept.
To manage so many analogue inputs I can't reply on the grove shield alone, so I have found the Mux Shield II which appears to be an integrated multiplexer which seems best suited for 10+ analogue sensors.
Does this arrangement of hardware seem broadly compatible? Or have I seemingly bitten off more than I can chew with this concept?
The Arduino Leonardo uses the same chip as the Arduino Micro but the Micro has a different physical shape with more analog pins. Still not enough analog for what you want. A Due or a Teensy will also do the USB-keyboard emulation but they also don't quite have enough analog pins for what you want.
But, why not use two? You can have two USB keyboards (or Arduinos) plugged in at the same time, sending different keys. Two Micros would be my recommendation.
Analog accelerometers are becoming rare in the Arduino world. It's much easier to use an I2C or SPI interface. Then you can add more devices to the data bus without using up lots of additional pins. Getting more than 4 on one I2C bus would depend on the exact devices you choose and may require some more components to get them to respond individually.
I don't understand why you want to use accelerometers at all. There exist simpler circuits (switches, digital hall sensors, capacitive sensors or keypads...) for entering digits.
I don't understand why you want to use accelerometers at all.
The device is intended to support people with impaired/deteriorated motor neurone function so pressing a physical button requires more strength, co-ordination or dexterity than they are capable of. So we aim to attach sensors to their persons and utilise their remaining mobility to activate keystrokes via acceleration
But, why not use two? You can have two USB keyboards (or Arduinos) plugged in at the same time, sending different keys.
My original design did consider using two controllers each attached to a minimum of 5 sensors, but for the prototype I thought one controller would make it easier, but in light of what you've told me two would be an easier way forward.
Would a simple I2C/SPI expansion shield give me the necessary number of ports I require?
The sensors must be mounted where they can be touched/moved separately, away from the controller. Shields are not applicable, perhaps modules (break out boards) can be used.
While a couple of different modules (chips…) can be connected to an I2C bus, the number of same modules is restricted by their selectable bus addresses. Most probably you’ll need multiplexers to connect multiple acceleration sensors to the same bus, as MorganS mentioned already.
SPI does not require distinct addresses, instead it uses a distinct chip select (CS) line to address each connected module. That’s easier achieve than an I2C multiplexer.
From former times I remember a keyboard with hall sensor keys, activated by the movement of a magnet. Digital hall sensors provide a logic signal that can be connected directly to an input pin, so that no further logic is required. You have much freedom in the placement of the magnets, to allow for various kinds of activation.
SPI does not require distinct addresses, instead it uses a distinct chip select (CS) line to address each connected module. That's easier achieve than an I2C multiplexer.
Thanks for the advice, I've only ever worked with analogue and I2C interfaces before. SPI looks simple enough and definitely better suited to my needs.
For the prototype I'll settle with two arduinos each attached to 5 SPI accelerometers, with scope to transfer them across to a single micro controller in future.