Hardware:
Arduino Nano Every
NI PCIe-8430/2
Hello all,
This is my first post on the forum, greetings!
Background:
I am working on a project that involves control of BLDC motors using several of this ESC. Telemetry (namely RPM) can be extracted from the programming port of the ESC in the form of Serial, which I have successfully done. I have hacked my Nano Every boards to have 4 hardware serial ports enabled as per this post. From this, I can get RPMs from 3 ESCs per Nano Every (Serial is tied to the micro USB). As a part of my project, many other data are being collected from other sources, but these will all interface with a data acquisition (DAQ) computer.
Goal:
As far as BLDC motor control goes, I want the Nano Every to communicate to the DAQ computer the RPM of each motor. The DAQ computer has the control laws and is responsible for sending control inputs (as PWM pulse width values) to the Nano Every. Since I have more motors than I have analog output channels on the DAQ system, I am looking to send motor-specific commands to the Nano Every via serial, which is a RS232 port on the DAQ computer.
Question:
Is it possible to use just a micro USB to RS232 cable to establish 2-way communication between the Nano Every and the DAQ computer? As an example, will I be able to read from the RS232 port the data transmitted from doing
String data = "032400,"; // ID:0 RPM:32400 Termination Character: ','
Serial.print(data);
I am hoping to eliminate the need for a daughter board like TTL to RS232 converter, which would restrict my setup to just 2 ESCs per Nano Every (if I understand the connections correctly) and add to the complexity of the system. However, using a TTL to RS232 converter is the most popular solution, though I have my suspicion that this is to do with USB being a master/slave design.
Thanks in advance. I hope I have provided enough detail on what I am trying to do. I think serial communication is my best option, but please do tell of better alternatives. I also did not see it necessary to post any code for this type of question, but if I've missed something that needs attention to my code, just ask and I will share.