cancel
Showing results for 
Search instead for 
Did you mean: 

CNC

Shlomi9137
Associate II

Hello, so this is how I decided that I wanted to create a CNC machine for plasma cutting and also an option for milling

*The machine will work on 5 axes
And of course I also have a software code that has already been created that will run the engines for me with the shifts etc...

*Motor drives
I purchased 6 PCB boards of the STEVAL-SPIN3204 type, from STMicroelectronics

I use powerful brushless motors that I have
Only the boards I mentioned match the Volt and Amps of the motors I have

*Microcontroller
So that I can run 6 motors at the same time in different directions and speeds
I will have to connect the motor drives to a microcontroller that knows how to synchronize the software with the motors

And here I encountered a small problem that I am trying to figure out how to connect the motor drives to the STM32 Nucleo 144 microcontroller

I would appreciate some help for this thank you very much!

8 REPLIES 8
Bob S
Principal

Not sure how much help this is going to be, but.....

Plasma cutters are a nightmare electrical environment - lots of EMI (electro magentic interference).  You absolutely need good grounding and shielding for your electronics.

What external interface do the STEVAL-SPIN3204 have for controlling the motor?  I spent a minute or so looking through the user manual and couldn't tell other than they have an on-board pot to control speed (I think).  You need some way to tell each board either the speed or position you want to to move to, and if all you can control is speed then you need a way to read its position so that YOUR code can handle the position servo.  Often people use "step-servo" drivers for this purpose - the interface is 2 digital signals (step and direction) just like a stepper motor.

If you can modify the SPIN3204 firmware you could probably add the "step servo" interface to it.  Then use the timers on your NUCLEO-144 board to generate the step signals.

"STM32 Nucleo 144 microcontroller"

It's a series of boards of a relatively common foot-print, not a specific microcontroller.

The timers and peripheral availability can be markedly different across models.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Chris21
Senior

It appears that the STEVAL-SPIN3204 boards provide a connector to the board's microcontroller UART peripheral.  You could use that to connect to UARTs / USARTs on the Nucleo board.

Look, first of all I use special cables with EMC protection and braided cover

And as for the plasma torch, I use a solid state relay

And I wanted to ask you another question. I know that you usually need 2 connections, 1 for Step and one for Direction

I have added a picture for you marked with a red arrow pointing downwards. This is the connection of the board. It is a USB 2.0 Type B Mini input and the question with this is suitable for connecting Step and Direction. Although it is possible to control steps and operation through the computer, I need to know which wire goes to Step and which wire goes to Direction I am also adding a link to the STMicroelectronics official website where there is a full PDF file with a simple explanation I got a bit confused with this

1.png2.png

Bob S
Principal

DO you want to use the USB interface (and USB protocol) to send step/dir - that is not possible.  USB transfer rate is too slow.  Or do you want to re-purpose the USB connector and use the D+ and D- pins as your step and direction signals instead of USB signals?  That may be possible.

Either way, I suspect (but I don't know for sure) the ST motor application does not support step and direction inputs.  If it does not, then you will have to add that functionality to the motor app.  And remove any USB code that it contains.

Shlomi9137
Associate II

See i want like this line u write "Or do you want to re-purpose the USB connector and use the D+ and D- pins as your step and direction signals instead of USB signals"

I make little wire diagram the i want use 6 motors control, The board can work in like 130-137 Mhz frequency in PWM the board have like 10-12 pin support pwm

At single motor maybe i use setting max 20 Mhz, 20 Mhz X 6 MOTORS = 120 Mhz and board can support like 130-137 Mhz

And I realized that there are also connections of
USART_RX USART_TX
What it means?

And what is the best way you can recommend to me to connect the motors, of course I have 6 boards of STEVAL-SPIN3204

I am adding a picture I made

Untitled4561.png

 

Bob S
Principal

Yes, that is how you would wire step/dir pins to the SPIN3204 boards.

I cannot tell you how to wire your motors.  If you can't figure that out by reading the documents, try finding a CNC forum.

You show a USB connection "to computer and run marlin software".  I thought the marlin s/w (really firmware, based on grbl) runs on the STM32 with the PC sending G-Code commands to the STM32.

And what the heck is this about 250MHz on USB type b and 20MHz x 6 motors?  And what board can support 137 MHz?  Are you expecting to generate step pulses at a 20MHz rate for each motor?  That is WAAAAAAAAY beyond what is needed for almost every CNC maching I've ever heard of**.  And you aren't sending the step pulses for all 6 motors over one pigtail USB cable.  There is one cable for each motor board.

** the exception being machines with huge reduction gearing to support motion resolution in the micron range yet still allow fast moves over relatively large distances.

My intention was that USB 2.0 Type B Mini can support up to 250 Mhz

And I don't use every engine at 20 Mhz, I mean that I can set every engine up to a maximum speed of 48 Mhz in the software, I set every engine up to a maximum of 20 Mhz, but that doesn't mean that I will really use a speed of 20 Mhz, it will probably be much, much less than that, I just wrote it down It!

STEVAL-SPIN3204 can work up to 48 Mhz directly with a USB connection to the computer I use this board for CNC so because I need some motors so I thought to do it

And say after all it's okay to connect it as I mentioned in the picture?

And of course thank you for your help!