Connecting Arduino to ARC
Description
Program an Arduino and connect it to ARC to become an EZ-B.
Related Robot Skills
Compatible Arduinos
This tutorial currently covers what Arduino's are compatible with ARC, where to download the firmware, how to flash the Arduino and connect to ARC.
Once you follow this tutorial and program an Arduino, you will be able to connect an Arduino to ARC and control the Arduino. Essentially, you will be converting an Arduino into an EZB. The best part about this is having access to the source code means you can add new functionalities to the Arduino and extend the capabilities of ARC. The one item to note is each Arduino will have different capabilities or lacking capabilities (i.e. video, audio, etc.).
ARC Version
- This feature works with ARC 2019.01.31.00 Beta or newer
Arduino Capabilities Additionally, each Arduino model will have a different MCU (microcontroller) with different capabilities for servos, PWM, and Analog. Consult the datasheet/manual of the Arduino you're using to ensure you understand what ports are available for different commands. For example, some Arduino models only allow PWM/Servos on specific digital ports. Meanwhile, other Arduino's share I2C with Analog ports. You will have to determine what ports are available because we have no idea due to the number of Arduino versions out there. For example, servo ports on Arduino UNO must be PWM ports 3, 5, 6, 9, 10, and 11. These limitations are that of the Arduino libraries and hardware.
There's a significant number of Arduino's variations out there each with slight modifications. This means the base firmware provided in this tutorial can be modified for various Arduino configurations. Also, you are free to add new features to the Arduino firmware and register them as Capabilities to be used in ARC. But, that's a future edit of this tutorial.
Compatible Official Arduinos The ARC software is compatible with a number of Arduino products, which the firmware can be found on their respective pages. Find your Arduino board and download the firmware from this page: https://synthiam.com/Support/Hardware/Hardware-Overview
Download the firmware source code for your Arduino version or compatible from the above link and continue to the next step of this tutorial. *Note: compatible or clone Arduino's will require a toolset and library installation to compile the firmware. Check the Arduino compatible product manual for instructions on adding libraries and tools to the Arduino IDE for clone hardware.
Very interesting, hopefully this does not stop/limit any future hardware development like say a newer EZ-5 controller.
Wow, this is very interesting and as others have said a Game Changer!! This definitely opens up a ton of questions, but I’ll have a play around with this first.
Has anyone gotten it to work yet? I'm in need of some assistance please.
The only servo response I've been able to get is on "D0" of my UNO. No other pin combination responds. Even then, I seem to have wrong speed and position, as my small servo barely moves between 0-90 and only in one direction. Its also backwards in the "Servo Summary." Speed scroll moves position setting and position scroll moves speed setting. I'm guessing I have a few things set incorrectly or perhaps way off base. I'm green at this, so take it easy on me.
Whoops...Hello by the way! This is my first post and first time ever using ARC. I don't know about anything else here yet. I just downloaded it tonight and jumped in with my Arduino and servos. Sorry if this is the wrong place to ask questions, but I haven't found a user forum yet. thanks!
:DHey there, Welcome HuneyBee Glad you have jumped on trying ARC on your Arduino! I am very curious to see if anyone does get this working out!
I followed the "'Connecting Arduino to ARC" step by step and loaded the Arduino Uno firmware OK onto my Arduino Uno board.
But I get the following error message when attempting to Connect to the ARC.
03-Feb-19 4:36:24 PM - Attempting connection on COM3 03-Feb-19 4:36:25 PM - Connected to COM3 at 57600 03-Feb-19 4:36:25 PM - Reports 222 03-Feb-19 4:36:47 PM - Connection Failed: System.Exception: This device is not an EZ-B. Please follow the online tutorials on the EZ-Robot website. at EZ_B.EZB.o412JueFyx() at EZ_B.EZB.Connect(String hostname, Int32 baudRate) 03-Feb-19 4:36:47 PM - Disconnected
Could it be I'm using a Arduino Uno+ board, rather then a standard Arduino Uno board? The boards should be identical apart from the Uno+ has more features regarding power pin-outs and USB.
Hunnybee: welcome! That’s interesting - what servo shield are you using? And are you powering the uno with a battery? It won’t run off usb. The ports D0 and D1 won't be used on the Arduino because they are reserved for DEBUG and USB communication on all Arduinos. So the firmware has the ports D0 and D1 ignored. The reason you may see servos on D0 or D1 move is due to the USB traffic. There's no way to control D0 or D1 from ARC because it's reserved for the USB on all Arduinos.
Something else to notice which is bizarre on the arduino servo shields is they seem to provide servo power from the voltage regulator, which means +5 volts. That's not very useful because most servos will brown-out the pcb.
Cem: you’re not using the beta ARC.
Thanks JD, Yep, I didn’t read all the requirements!!
ARC Version
Thanks everyone for the welcomes. Also thanks for updating the code. I uploaded the latest version. Now I have much more success than my first time around using the UNO. I am getting the servo responses I expect, though I still have a lot to figure out in general.
I started printing an INMOOV head as my first project, but I had to shelve it for a number of reasons. I haven't decided what else will be my first robotics project, but it will definitely be much smaller scope. I'm excited to learn about ARC. I hope to see you all around here somewhere. Thanks again!