2

I plan to build functioning reaction wheels, controlled by an Arduino Micro. Ideally, I'd like to have the reaction wheels, and the micro, be a single unit which would receive external commands from another microcontroller.

I know you can link Arduino microcontrollers, and every time I've seen it done it has been with a RC module such as XBee. Is it possible to link units using something like the micro-usb on the Arduino Micro?

If this is possible, is it as simple as connecting the micro-usb ports on my microcontrollers, and then working out the programming?

1
  • Eh, I didn't know there was an Arduino.SE... I probably should've looked harder. – CoilKid Dec 24 '14 at 20:54
4

You cannot do this with the micro USB ports. You will need to use I/O pins. Either serial or I2C would be good options. It might be advisable to use I2C if you want to control multiple 'slave' microcontrollers as they can all sit on the same bus. Using the serial port would require multiple transmit and receive pins on the master controller, likely requiring software serial ports (high overhead). Also, if you don't use the serial port for comms, then you can use it for debugging.

0
2

It might be worth explaining WHY you can't "just connect the micro-usb ports". There are two issues here:

  1. USB is not symmetric, and an Arduino micro is only designed to act as a client. One of your microcontrollers would need to have USB OTG support to act as a host.
  2. Even though there are microcontrollers that do have USB OTG support, you'd still have a nontrivial hurdle writing the software for them (Pretty sure the Arduino USB code is client specific as well, though I'm not familiar with the details of the serial over USB protocol).

In short, your basic idea is not physically or technically impossible, but would be fairly difficult to execute, while there are much simpler solutions available.

0
1

Usually the RF links (xbee included) just replace a set of wires connecting two serial ports. You can very easily connect the serial ports on two arduino's and communicate between them without any special hardware in between. You will only need 4 wires (power, ground, transmit, receive).

2
  • For me, it would be easier (I know now that the other way is easy too) to just connect the micro-usb ports. Would that work just as well? – CoilKid Dec 24 '14 at 21:15
  • No, you cannot just connect the usb ports – BrettAM Dec 24 '14 at 22:22
0

You can use a USB connector (micro) (mounted on a custom PCB) for whatever you want and route the connector's pins to whichever Arduino pins you want. It will not be USB, but you could, at least, use USB cables for ease-of-connection.

This is un-wise, at best, because someone is, eventually, going to plug in a real USB cable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.