Machsupport Forum

Mach Discussion => FAQs => Topic started by: paxman on July 08, 2019, 02:03:59 PM

Title: parallel port to serial
Post by: paxman on July 08, 2019, 02:03:59 PM
Hi,
I recently bought a cnc engraver( 3 axis's ). It is a Chinese machine, Suda SD3025SXH.
It only has a serial port on the back of the machine and looks like it is only using 4 pins from the Serial Port.
I installed Mach3 on a PC and can get voltage on/off on pins 2,3 and 4.

I was thinking of using the parallel port  on the PC and connecting to the serial port on machine.
Anyone ever done this or am I wasting my time?
If possible - how do I go about figuring out the pin layout on machine?
Any advice appreciated.

Thanks,
Paul
Title: Re: parallel port to serial
Post by: joeaverage on July 08, 2019, 02:30:18 PM
Hi,

Quote
I was thinking of using the parallel port  on the PC and connecting to the serial port on machine.

No, that will not work.

Machs parallel port is a lot more than just a db25 connector.  The parallel port driver takes numerical data, the
'trajectory', from Mach and converts that numerical data into simultaneous pulse streams, and can communicate those
pulse streams simultaneously over the db25 connector.

If you try to 'squeeze' the pulse streams through a serial connection all sense of simultaneity is lost.

Despite Machs parallel port being on the same PC as Mach (the Windows APP) it is separate and is a genuine motion
controller.

You can use Mach over a serial link, Mach transmits numeric data over the link to the controller and the controller
must generate the required pulse streams.

The distinction is.......motion controller in the PC (parallel port) verses external motion controller (within your machine control
box).

I can't find any info on your machine. Can you post some pics of the controller, take the top off so we can see inside?

Craig
Title: Re: parallel port to serial
Post by: paxman on July 08, 2019, 03:42:42 PM
Thanks for info.
Think this is the controller, not much info on it.
Apparently machine originally came with TypeEdit,
Supplier said they cant help - dont support machine any more.
Title: Re: parallel port to serial
Post by: TPS on July 09, 2019, 02:41:29 AM
after a while of searching on the net, it Looks like the machine has a standalone Controller, and the Serial Interface is
used for file Transfer (GCode or HPGL). But found no Information about the used protocol.

if the supplier is not able to give some documentation, it will be very hard maybe impossible to figure this out.

anyway it will not be "compatible" to Mach3/4.

the only way i see is to use the existing stepper's and do a "retrofit" with new stepper Controllers and external Motion
controler. plus an other new controler for the spindle.
Title: Re: parallel port to serial
Post by: paxman on July 09, 2019, 03:54:18 AM
I found a manual for it( or similar machine)
http://web.nchu.edu.tw/~daw/Manual/Metal_CNC_carving.pdf

Confusing part is the program they seem to use looks identical to Mach3.

Any suggestions on new stepper controllers and external motion controller and spindle controller, maybe this will be easiest option.

Could I try and just send G-code or HPGL) to machine and see if it does anything?
Or is there different versions (protocols) of the G-code - machine specific?
Read something on using hyperterminal to do this.
Thanks for info


Title: Re: parallel port to serial
Post by: Tweakie.CNC on July 09, 2019, 05:23:19 AM
I am guessing that your machine has a 25 way 'D' type connector which will connect to a PC's LPT Parallel Port. In that case it should operate from Mach3 as the manual implies.
Title: Re: parallel port to serial
Post by: paxman on July 09, 2019, 07:18:10 AM
Hi,
No only has a 9pin serial connector on the machine.
Title: Re: parallel port to serial
Post by: Tweakie.CNC on July 09, 2019, 07:44:27 AM
That is a shame, so it looks like you are left with the option suggested by TPS of retrofitting a new controller and stepper drivers etc.

It's not too much of a job  (I did it a while back with a small milling machine where the manufacturers would not share information on their electronics because I was not and educational establishment) and all the required parts are readily available. It could be a fun educational project ?

Tweakie.
Title: Re: parallel port to serial
Post by: joeaverage on July 09, 2019, 08:20:23 AM
Hi,

Quote
Confusing part is the program they seem to use looks identical to Mach3.

Hi, you are correct, they do picture a program page that looks remarkably like Mach3. It was a common technique
for Chinese manufacturers to take Mach3 and modify it for their machine and then sell it with their machine, a straight
out pirate derivative. Most of those manufacturers are gone. The screen shot in the manual you linked to is an example
of such a pirate derivative of Mach3.

If you can find a copy of it you may well get it to work but you will not be welcome on this forum....we don't support
pirated copies of Mach, either plain Mach3 or some derivative of it.

If you wish to get this machine going well do as TPS has suggested.

The first decision is Mach3 or Mach4. All development on Mach3 ceased six years ago, any bugs it has will stay that way.
It still has a huge fan base and is somewhat cheaper ($175 verses $200). Mach4 is the supported version, a much improved
and flexible solution that does all Mach3 did and more.

The second decision is external motion controller or parallel port. Both Mach3 and Mach4 have a parallel port option,
the Mach3 parallel port is free whereas the Mach4 parallel port called Darwin has a $25 license fee. Both parallel ports
require that you use Windows 7 or earlier and 32 bit OS. The parallel port despite its popularity (being cheap/free) is
not as stable and robust as a good external controller.

Well known, good quality controllers that have full manufacturers support include the Ethernet SmoothStepper (Warp9),
the UC300 (CNCDrive) or the 57CNC (PoKeys). These three all have both Mach3 AND Mach4 plugins. All three have fully developed
Mach3 plugins whereas The Ethernet SmoothStepper enjoys an edge in capability over the other two in Mach4. They range
in price from about $140 to $190.

There are other controllers like the CSMIO (CSLabs) at 600 Euro and the Hicon Integra (Vital Systems) at $600 for the base
model (more for various extra activated features); as you see they are very much more expensive.

There are a number of cheap to very cheap Chinese made controllers, seldom do they work well and none I know of support
all of Mach3s features and worse still you get zero support from the manufacturer. There is one Chinese manufacturer offering
what they claim is a Mach4 capable controller, XHC, it so buggy....avoid like the plague.

Craig


Title: Re: parallel port to serial
Post by: paxman on July 09, 2019, 11:34:46 AM
Hi, thanks for info.
Retrofitting looks like best option (probably only option ) and fun project to do.
Machine build does not look bad, apparently they used a German Spindle(water cooled), I generally try stay away from Chinese machines, for quality and support. You get better support from 50 year old machines than you do on brand new Chinese machines, but anyway I have the machine now.
 
The Ethernet SmoothStepper looks like the way to go, why not use mach4, not that much of a price difference.
Will this be able to control my spindle as well or should I just leave spindle alone?
What else will would I need to buy?
I assume a can keep the stepper motors already on the machine.
From what I can see the controller board connects to another board, think it is the board that drives the motors.
Will I need to replace this?

Sorry for stupid questions, not very clued up on electronic side.
Yet I have another project lined up - got a Deckel FP3 NC machine that I need to get up and running one day.
Hopefully that I wont have to retrofit, but who knows I might end up doing one day.
Title: Re: parallel port to serial
Post by: paxman on July 09, 2019, 11:59:17 AM
Hi, looking at manual again - looks more like specific instructions for a company on how to use the machine and not much like a manual from company selling machine.
I have seen other places on the net where they say machine comes with a version of TypeEdit.
Might also be a different model to mine that had a USB or Parallel port, but does look a pirated version of Mach.
 
Title: Re: parallel port to serial
Post by: TPS on July 09, 2019, 02:33:49 PM
if you are on the "retrofit road" IHMO the first things are (before buying anything):

-figure out witch stepper Motors are mounted, to get a idea witch stepper Controllers will fit.
-figure out witch spindle is mounted, to get a idea witch Controller will fit.

SmoothStepper is not a bad idea, even i am not a fan of These 5v Controllers.
Title: Re: parallel port to serial
Post by: joeaverage on July 09, 2019, 02:52:36 PM
Hi,
the Ethernet SmoothStepper (ESS) requires one or more breakout boards. A breakout board is a buffer that protects
the ESS and has screw terminals to attach wires.

A C10 is a simple and cheap ($23.00) breakout board. It will connect to one output port of the ESS. Thus the one board
will give you 12 outputs and 5 inputs. A second board is recommended, and if arranged such that the second ESS output
port pins 2-9 as inputs, then the second C10 will give you another 13 inputs and 4 outputs. The two C10s would under this
configuration give you a total of 18 inputs and 16 outputs. That should prove to be more than adequate.


The C10s are quite simple, they don't have opto isolated inputs nor do they have relays  or a PWM to analogue circuit.
I use Homman Designs  MB02 breakout boards (Australian made and near local to me in New Zealand) which are
very similar to the C10, that is they are bi-directional without opto isolators, relays or PWM circuit. I have used them
for six years without problem. Electronics is my thing, if I decide I need opto isolation on a particular input I add it; likewise
relays and PWM circuit.

Both the C10 and Homann boards are 5V boards whereas the CSMIO that TPS prefers has 24V IO. 24V IO is industry standard
and claimed to be more noise resistant, with some justification. Don't get me started on 'noise impeadance'.....I'm a radio
engineer and can talk about comparative noise performance all day long. Suffice it to say that 24V IO is nice but not essential.
In general 24V IO equipped boards are much more expensive. I have been using 5V boards for six years without problem
and do not regard 24V IO essential, nor even consider it a great advantage provided you pay close attention to the
'noise impedance' of the circuits to which you are interfacing. 24V IO allows you to be a bit sloppy whereas 5V tends
to focus your attention.

If you are not comfortable with adding circuitry to C10s then consider the MB03 board by CNCRoom at $180. It supports
all three ESS output ports with a balance of inputs and outputs including single ended and differential IO, relays and
a PWM circuit. I have not seen one myself but ger21 reports them to be good quality.

Note that these breakout boards do not drive the steppers but rather produce step/direction signals to the stepper drivers.
Your existing machine must have stepper drivers and you may be able to recycle those. If not you can buy entry level
stepper drivers for as little as $20 each or up to $150 for Gecko drivers, the gold standard among two phase stepper drivers.
Can you post some more info about your existing stepper drivers?

The most common way with Mach to control a spindle is with relays, up to three, to turn on/off, forward and reverse the spindle
and a PWM signal which is converted to a 0-10V signal to control the speed of the spindle. This is not the only means of
controlling a spindle but is most common.

Can you post more information about your existing spindle and its driver?

Craig
Title: Re: parallel port to serial
Post by: TPS on July 10, 2019, 02:58:57 AM
maybe a Little bit offtopic, but as Craig said i prefer CSMIO.

when i look for the CSMIO/IP-M it is 229.-€

-Mach3/Mach4 pluging
-real 0-10V Analog Output for spindle
-two analog Inputs for override potis
-all connetors included
-slave axis

ok, no backslash compensation, but IMHO backslash should be solved at the "beginnig" not at the "end".

PS. not getting anything from CSMIO for Promotion  ;)
Title: Re: parallel port to serial
Post by: paxman on July 11, 2019, 07:49:17 AM
Hi,
Looking at my motor driver boards, not much info on card, probably custom made same as controller card.
There is 6 IC's on card - A3955SBT, read up on them - need two to drive each motor(x,y,z)
Is there anyway to work out from IC how to connect to it?

Was thinking of trying to just bypass Controller card in machine and connect directly to Mach parallel port for initial testing.
Do you think this advisable or wasting my time?
Thanks
Paul

Title: Re: parallel port to serial
Post by: TPS on July 11, 2019, 08:06:11 AM
have a look to the Motors for a type, then can can a look for a stepper Controller like leadshine and power supply.
Title: Re: parallel port to serial
Post by: joeaverage on July 11, 2019, 08:14:21 AM
Hi,

Quote
Was thinking of trying to just bypass Controller card in machine and connect directly to Mach parallel port for initial testing.
Do you think this advisable or wasting my time?

Do you have a PC with Window 7 32 bit or earlier?. If not.....the parallel port is a DEAD DUCK.....IT MUST operate on a
32bit OS.

Even if you have a working parallel port you will need a breakout board. The breakout board will produce step/direction
signal, but only signals, probably no more than 20mA. So what are you going to hook them to?

Those ICs are not bad but they are pretty whimpy.....1.5A @ 50V??? Wouldn't 'pull the skin off a rice pudding' in my book.
Do yourself a favour and get some  Leadshine AM882s, one for each stepper, they will make your steppers take notice
especially with a 72V power supply (recommended).

Craig
Title: Re: parallel port to serial
Post by: paxman on July 11, 2019, 08:19:54 AM
Yes got a 32 bit windows 7 machine.
Cant seem to see anything on stepper motor that will identify it, just a a black motor. Ill try remove one and see if there is anything in front of it.
They have 4 wires from what i can see.
Title: Re: parallel port to serial
Post by: joeaverage on July 11, 2019, 08:28:54 AM
Hi,
does it really matter what they are?

With drivers like the AM882 you can drive them at whatever current up to 8A you like. My guess is they have
current rating of 1.5A or less as evidenced by the driver ICs fitted. Just set your AM662 to 1.5A and try it out.
If the motor gets too hot (60 C0) then back the current off a bit.

Craig