Created Thu, 17 Jan 2013 18:57:39 +0000 by eljainc
Thu, 17 Jan 2013 18:57:39 +0000
Hello,
I am new to the ChipKit MAX32/Accelstepper library. Not knowing much about it, I would like to know if it is possible to connect the MAX32 to a Windows XP/Vista/Win7/Win8 PC and control bipolar motor controllers directly using .NET (C#) code in a Windows forms app? I am not intersted in using the MPIDE or Arduino IDE to control the motors that way. Can someone tell me if it is possible and if there are any direct libraries/classes for doing this?
Also, we have a product from Brian Schmalz which is the EasyDriver/BigEasyDriver. Would these components also be required in addition to the MAX32?
Thanks Mike
Thu, 17 Jan 2013 19:05:07 +0000
Should be very possible. Have you seen Brian's video using the BigEasy with the chipKIT?
http://www.youtube.com/watch?v=7Ga6RMYwuQI
Jacob
Thu, 17 Jan 2013 19:27:50 +0000
Yes I saw that video a few times now. It is pretty amazing.
What I would like to know is:
Do the programs that run the motors reside on the MAX32 or are they on the PC? I would imagine that it is the former, on the MAX32. Can one have several programs set up in "memory" on the MAX32?
Can I use a simple call in my Windows C# program to run the command to move the motors using the MAX32? I need to basically have the equivalent of a function that would allow me to move a motor for a specific number of steps, specific speed, specific direction.
Again, do I need an Arduino do control the MAX32? I am trying to get away from that and use a Windows PC as as the host platform.
Thu, 17 Jan 2013 19:40:44 +0000
- Do the programs that run the motors reside on the MAX32 or are they on the PC? I would imagine that it is the former, on the MAX32.
The program resides on the Max32.
Can one have several programs set up in "memory" on the MAX32?
Yes, but it may be easier to have one program that does several functions.
- Can I use a simple call in my Windows C# program to run the command to move the motors using the MAX32? I need to basically have the equivalent of a function that would allow me to move a motor for a specific number of steps, specific speed, specific direction.
Yes, you just need to open a serial port and send serial data to the board. The board then needs to parse the commands from the PC and act upon them.
- Again, do I need an Arduino do control the MAX32? I am trying to get away from that and use a Windows PC as as the host platform.
No. The Max32 can be thought of as an Arduino Clone (but with much more power and functionality).
What exactly are you trying to get away from? Arduino?
Jacob
Thu, 17 Jan 2013 21:11:27 +0000
Yes for this particular project we do not want to be tied down with the Arduino.
Would it be fairly easy to have a program that resides on the MAX32 to be a stepper motor controller "function" which can take parameters passed to it from the PC (number of steps, speed, direction). Can the PC update the MAX32 parameters and execute the onboard program in a very timely fashion with low latency? When we issue a command to start the motor or stop it, it has to be quite responsive with almost no perceived delay.
Does anyone have a stepper motor library for this? I have heard there is the Accelstepper library. Are you familiar with this?
Thu, 17 Jan 2013 21:57:42 +0000
Would it be fairly easy to have a program that resides on the MAX32 to be a stepper motor controller "function" which can take parameters passed to it from the PC (number of steps, speed, direction).
Easy is relative to your skill set. I think it would be easy, but I've been programming for 30 years, and doing embedded for 20 years.
Can the PC update the MAX32 parameters and execute the onboard program in a very timely fashion with low latency? When we issue a command to start the motor or stop it, it has to be quite responsive with almost no perceived delay.
From a humanly perceivable delay, yes, it can be very responsive. How responsive again depends on your skill set and needs. There are threads around here of transferring data to the Max32 in the megabit speeds, but I suspect that the speeds even in the 115kbps range will be more than fast enough for you.
Does anyone have a stepper motor library for this? I have heard there is the Accelstepper library. Are you familiar with this?
I know Accelstepper but I have never tried it. Also I don't know if it has a serial parser or if you need to build it yourself.
Jacob
Fri, 18 Jan 2013 02:27:20 +0000
The Accelstepper library (which is not only excellent, but one of the best ways to do stepper control from Arduino compatible boards) does not have any sort of a parser built in. You'll have to write that yourself.
For example, the EiBotBoard (that I designed) : [url]http://www.schmalzhaus.com/EBB/[/url] does many of the things you're asking to to: you send it serial commands from a PC and it controls 2 stepper motors (there are two stepper drivers built right on it). It's just not a MAX32 based board.
*Brian