A few more files just to get them out there if anyone cares.
I trickled a few bits of info in some other threads, this one will be dedicated to the upgrade I am doing. I started this upgrade about 3 years ago and got a bit lost, and lost interest. My CNC has been dead since, and I want it back. I am taking a different tact this time so I can be self-sufficient in getting the parts together and working. HUGE thanks go out to James Dressman for all the groundwork he shared with me years ago. I would NOT be in a position to finally pull this off without the information he provided, including the pinouts to the DB9 connector on the Mikini, solid models for the motor mount, and tons of info. 38 emails worth! In the end, though the exact parts he used weren't available, and I was unable to follow exactly in his footsteps.
So, now I am going my own way, integrating an Arduino in between the Mikini/Mach and the VFD. The signals on the DB9 connect will go to the Arduino which will interpret F/W, Run/Stop, and spindle command speed. The Arduino will then command the VFD to perform those actions, interpret the encoder feedback on speed, etc. Here is the schematic as it stands right now:
I have all the signals working in both manual and MACH3 control. I am waiting for delivery of the VFD. I have 3D printed the motor mounts for now, and the "first job" of the upgraded machine will be to make aluminum replacements for the motor mounts. James' models are attached in a ZIP file.
Here are the DB9 pinouts that I know:
- DGND (Ground)
- ENABLE (Run/Stop from Mikini/Mach)
- F/R
- - (????)
- FAULT (Signal fault to the Mikini)
- FOUT (84 PPR signal back to the Mikini)
- maic (PWM out from Mikini/Mach)
- DVCC (????)
- S1 (????)
maic is the PWM signal for spindle command speed. I don't know what S1 is. The rest are pretty well self explanatory. I am only using pins 2, 3, 5, 6 and 7 right now.
I am using a Marathon BlackMAX 2 hp motor from Automation direct, which includes a differential encoder:
https://www.automationdirect.com/adc...duty/y540-a772
The VFD will be this one (ordered, but not received yet):
https://www.automationdirect.com/adc...vfds/gs21-23p0
I am using an Arduino Mega 2560 board, with a demoboard shield:
https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1
https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1
For feedback I am using a 4-line OLED display:
https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1
This is driven off the I2C pins on the Arduino and tell me Run/Stop, F/R, Command Spindle Speed, and Actual Spindle speed - all programmed in the Arduino. I will post the Arduino code as I get closer to a final version.
I think that's all for now. I will keep this thread updated as I progress.
Similar Threads:
- Need Help!- VFD Configuration With Huanyang VFD [ Model: HY02D223B ], C10, C6, Mach3
- Upgrading OmioCNC spindle to ATC - VFD options?
- Upgrading OmioCNC spindle to ATC - VFD options?
- Need Help!- PRT-E1500W VFD CNC60/90 locked out - cant change VFD settings, flashing 50.00
- New Machine Build- Implementing VFD control on the G540 - into a non-VFD variable-Vin PWM controller
CAD, CAM, Scanning, Modelling, Machining...
A few more files just to get them out there if anyone cares.
CAD, CAM, Scanning, Modelling, Machining...
Is there a special reason to use the Arduino, as you can control the VFD directly from Mach3, in more than one way, Modbus, or through a Breakout board that has a built in PWM to Analog converter.
Does the Arduino PWM signal get converted to Analog 0-10v dc if not it won't work for the VFD Drive speed control.
Mactec54
I want to be able to use the manual mode on the Mikini as well, and have it work "as new" except with a better motor. Yes, the PWM to 0-10V module is in blue on the bottom right of the schematic.
CAD, CAM, Scanning, Modelling, Machining...
Finally got the VFD in (it was backordered). I have the motor installed and running from the front panel of the VFD, but hit a snafu when trying to drive it from the Adruino. The Arduino is a 5v system, and the VFD wants 24v logic, so I have some optocouplers ordered to step up the signal. I am able to update the frequency drive on the VFD from the Mikini and from MACH3, but can't get the start/stop or fwd/rev signals without the 24V signals. There is an issue with the frequency, as when I enter S5000 I only get about 4.3 volts on the Arduino and 7.7 volts on the VFD, so something is not reaching the max speed. I'll have to look in to that further once I get the 24v signal issue figured out.
Here is the current schematic:
CAD, CAM, Scanning, Modelling, Machining...
You don't need 24v for a Stop / Start you only need at most a Relay the Relay can be turned 0n / 0ff by your 5v from the Arduino the output of the Relay just needs to connect to Dl1 / DCM FWD Dl2 / DCM REV no voltage is needed for this connection to the VFD Drive this is in Sink Mode.
Mactec54
The Mikini uses Start/Stop and Fwd/Rev. I think I can use a DCM signal, but not sure how just yet. The OptoCouplers didn't work today but I ran out of energy/hands/brains to troubleshoot. I bought some 5V relays and will try those instead tomorrow.
CAD, CAM, Scanning, Modelling, Machining...
I see np reason why Opto's would not work, in fact if the Arduino is the only interface to the VFD PLC then you could probably go direct.
Seems overkill using relays.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
If I jumper DCM to DI1 or DI2 I get no activity. If I jumper 24V it works. I have some other issues, but at least the way I have the VFD set up it needs 24V to work. There are hundreds of settings, though, so maybe one of them could switch it to make it happy with DCM.
CAD, CAM, Scanning, Modelling, Machining...
Agreed, it should work, and it could work. I just gave up as working with the tiny OptoCouplers I had was difficult at best. The relays have nice screw terminals. It is just for Start/Stop and FWD/REV, so no big deal if they are a bit clunky. Not like it is a PWM signal or something. I can't go direct because the VFD wants 24V (if it can work with ground, I don't know how), and the Arduino is only 5V.
CAD, CAM, Scanning, Modelling, Machining...
I have it switched to PNP. Maybe if I switch back to NPN I can drive it directly with sinking outputs from the Arduino. I'll try that tomorrow.
CAD, CAM, Scanning, Modelling, Machining...
Got everything working now, and had a chance to cut some steel today (actually cast iron). Cut smooth as butter at 500 rpm, no dips in speed, just constant cutting action. FINALLY! THIS is the machine Mikini promised!
CAD, CAM, Scanning, Modelling, Machining...