Using the AX1500 w/ a PC, closed loop possibe?

15 years 7 months ago #21056400 by IGVC
Hi folks,

I'm looking at using a board (either the 500 or the 1500, but probably the 1500) for controlling the DC motors in a zero turning radius drivetrain setup. The programming that the wheels need to follow is pretty complicated, so we'll be running it in the serial mode, where it's continually receiving commands from an onboard laptop. I have a few questions about the setup:

I'm wondering if we can still run the controller in it's closed loop speed control mode while it's interfacing with the PC, so we'd get something like the PC sets a wheel to a certain velocity, and the controller will make sure that wheel maintains that velocity, feeding it more voltage if necessary.

I also noticed that there's a kit for the AX2550 to support optical encoders. Does this mean that lower model boards can't support OE's? If i connect the OEs to the inputs on the controller, can i read those values into my laptop's program controlling it? I guess it looks like the OE kit is necessary for the controller to do the closed loop control on its own without the user having to write the code to do the control loop themselves?

Thanks so much for your time, it's great that you guys have a message board setup for this sort of thing.

Please Log in or Create an account to join the conversation.

15 years 7 months ago #21063137 by cosma
It is best that you use a board with the Optical Encoder interface. This can be an AX2850, AX3550. You can also use the AX1500 + the Encoder kit but it may not be economically as interesting.

While you could use a controller without encoder and use your laptop to do the closed loop algorithm, this will unecessarily load your PC: you will need to find a way to feed the Encoder to it, send continuous commands to the controller, and the PC's response time will not be predictable enough to close the loop.

You will be able to query the encoder count (distance travelled) with your PC while in closed loop.

Please Log in or Create an account to join the conversation.

15 years 7 months ago #21063479 by IGVC
<DIV>Thanks very much for the reply. So i'm a bit confused, you say that i would need to find a way to send continuous commands to the controller in order to use the laptop for the control loop, can the board not do that usually? (i'm talking not even for the encoder, but just in general)</DIV><BR>We're considering using this board for an autonomous vehicle application, where a program running continuously on the laptop makes a path decision based on input from sensors, and then would set each motor to a different speed in order to either navigate forward, backward, or turn. We would be setting different speeds probably up to several times a second. Can this board not handle changing the speed like that on the fly from a computer?<BR><BR>Also regarding the controller running in closed loop during PC operation, that's great that we can check the encoder count on the PC through the board, but I was more trying to ask if the controller can continue to run its closed loop velocity control (given that we buy a board with OE interface) while receiving commands described above from the computer.<BR><BR>Thanks again, sorry for all the questions.<BR>

Please Log in or Create an account to join the conversation.

15 years 7 months ago #21063612 by cosma
You only need to send a speed command once. That command stays in effect undefinitely or until another command is received. The motion is not affected by other communication on the rs232 port.

In closed loop operation, you read the speed and make (typically minor) adjustments all the time. The controller does this on its own and transparently.

If you decide to do the closed loop in your laptop, you will need to read the encoder speed very often (controller does this every 16ms), compute the error (current vs desired speed) and adjust the speed at that rate. This is too fast for the PC to perform predicitvely.

Please Log in or Create an account to join the conversation.

15 years 7 months ago #21381229 by IGVC
Thanks again. One more thing though, I just wanted to make sure that the ax3550 outputs up to 40V from both output channels and that the voltage is not split. I assume it wouldn't be, but wanted to make sure. Thank you.

Please Log in or Create an account to join the conversation.

15 years 7 months ago #21385304 by cosma

Both VMot power inputs are connected to each other on the board. Voltage is the same for both channels.

Please Log in or Create an account to join the conversation.

15 years 7 months ago #21411894 by IGVC
Thank you again. Also, can C++ be used to write a program that will output to the board? <BR>

Please Log in or Create an account to join the conversation.

15 years 6 months ago #21893009 by cosma

You can use any programming language that allows you to communicate via the COM port

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.083 seconds