1
\$\begingroup\$

I'm trying to build a haptic feedback suit, which requires me to control over about 576 vibration motors (24x24), using an arduino uno. I have no idea how to do this because the uno has only 13 gpio pins... Does anybody have suggestions as to how to go about this?

EDIT: I don't think that the arduino UNO is capable of handling this task.. I'd appreciate it if you could suggest another microcontroller to use. And also, if i can use a raspberry pi.

EDIT2: I need 524 Analog outputs

asked Jun 21, 2020 at 4:27
\$\endgroup\$
9
  • 2
    \$\begingroup\$ You could start by looking at GPIO expanders and Multiplexers. \$\endgroup\$ Commented Jun 21, 2020 at 4:44
  • 4
    \$\begingroup\$ Why specifically did you pick an Uno for this? \$\endgroup\$ Commented Jun 21, 2020 at 4:50
  • \$\begingroup\$ Find a chip that can control a more reasonable number of them and make a lot of copies of the board with that, cooperating as a network. Needless to say you don't have the funding to actually do this in the quantity you mentioned. But you might make three copies of the board or something to demonstrate the idea. Depending on your control need, any of multi-channel PWM controllers, high pin count MCU's or FPGAs could be an option, given the perspective this seems to be asked from you should probably limit yourself to the first two so that you get something working you can demonstrate. \$\endgroup\$ Commented Jun 21, 2020 at 5:11
  • \$\begingroup\$ There is no sensible way to do this with an Uno \$\endgroup\$ Commented Jun 21, 2020 at 5:14
  • \$\begingroup\$ How many quantization bits per haptic excitation 1? 4? 8? If 8, then you need a dual-port memory to write like video memory but depends on the latency you need/want? 10 ~ 60 fps ? This must go in your design spec with other attributes like size/cost. before you even say Uno. Otherwise, you may need to change your mind. \$\endgroup\$ Commented Jun 21, 2020 at 7:22

1 Answer 1

0
\$\begingroup\$

Whatever MCU you use, it is unlikely to have 576 available GPIO pins.

One approach would be to devote 10 pins (one byte plus two control pins) and use 72 74HC595 shift registers (plus one driver per motor, of course). You could update the matrix with 72 clock cycles, bit-banged, and then update all the motor controls simultaneously with a single clock edge.

Whether the UNO is fast enough to do anything usable with that amount of data per update is another question, but update speed is probably usable.

Another approach would be to daisy-chain all 72 shift registers and use a single data pin, which would allow use of on-chip SPI hardware. With the addition of buffers you should be able to get the clock frequency up into the MHz range, so again millisecond-range updates could be possible, with only 3 pins (but getting it to work reliably might be a bit trickier).

In either case, excellent and well-thought-out circuit layout is essential. Turning on 576 motors simultaneously (with the associated surge looking more like 10x that) has potential to cause vexing issues.

answered Jun 21, 2020 at 6:29
\$\endgroup\$
4
  • \$\begingroup\$ Umm.... Yeah i doubt that the arduino UNO will be fast enough to handle. Will a raspberry pi 3b fare well in that respect? Also.. I don't think that it is possible to give out analog outputs for each of those pins. But controlling the speed of each individual motor is essential, to this project. And so i'm gonna need another way around it... Thanks for the solution BTW \$\endgroup\$ Commented Jun 21, 2020 at 7:59
  • \$\begingroup\$ Umm not mentioning you need 576 ANALOG outputs is a major omission. That's also n times the data storage. Maybe look at using an FPGA to provide PWM outputs on many pins (then use a number of them). \$\endgroup\$ Commented Jun 21, 2020 at 9:07
  • \$\begingroup\$ Something like TLC5947 SPI-controlled multichannel PWM LED driver could work, but the OP would have to say how much current each motor will use. \$\endgroup\$ Commented Jun 21, 2020 at 11:28
  • \$\begingroup\$ @SpehroPefhany I don't think OP really needs analog outputs. It sounds more like he/she is thinking that having analog output is the only way to control speed of the motor. In which case this entire project is more like a wishful thinking without basic required knowledge. \$\endgroup\$ Commented Jul 9, 2020 at 10:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.