Is anyone able to provide me some advise please?
I haven't made a breakout board before for a CNC, and a second pair of eyes would be appreciated
Hi All... I'm working on building my own opto-isolated PC interface and power supply design for my CNC.
I want the CNC for machining various aluminum, plastic and PCBs. So I've been looking at a good balance between high speed, torque and accuracy. I will be getting a WigitMaster Midi-CNC for the job. I have HobbyCNC 305oz-in steppers and Gecko G203V controllers, which I plan to run at 50V. I hope this will give me the desired speed and high torque without causing too much stepper cooking.
I'm very big on safety and having defaults to auto off, while having something very robust and reliable. I DO NOT FOLLOW THE KISS PRINCIPLE... and proud of it hahaa... But I don't design things and leave the possibility for failure either.
Schematics are below… I’m interested in any help you can provide to refine these before I design the PCBs. I’ve written some of my design notes on my schematics, but will write a bit more here for my thoughts on why I’ve done it this way.
MAIN POWER SUPPLY – 50V
Using a 18+18V, 300VA toroid to get ~50V. I found using smaller filter caps was a much better solution for higher ripple current capability and were not as hard to get. I’m also going to distribute there positions a bit to improve decoupling to each of the 4 stepper controllers.
EMERGENCY STOP
The Estop switch will break the connection between the transformer and the bridge with a solid state relay. I’d rather it there, because I want the filter caps still connected to the drivers. I know it could power them for another second or so, but cutting the current there could produce some large inductive spikes, which I’d rather avoid. The disable on the controllers will stop them quicker than cutting the power, so this part is the secondary. Being able to control the power may also help avoiding the steppers getting hot while idle, even though the Geckos reduce the current at idle.
POWER – 12V/5V
12V will come from a wall adaptor… I’d be lucky to match the price of building my own anyway, and it give the flexibility to use a larger one if needed. A 5V regulator is powered from this, so supply all the interface logic etc…. The Estop does not effect either of these power sources… I’d rather the logic stay powered all the time to do their job.
BLEED CIRCUIT
I’ve designed my own bleed circuit. I wanted something to both discharge the filter caps quickly and also bleed regenerated power from decelerating the motors (planning to run the motors fast remember). I won’t be a constant drain though, as it only enables if the output is higher than the input but a couple of diode drops. I simulated the circuit and it worked perfectly… though it won’t be until I try it that I’II see if it solves the problem. The circuit is quite fast. It uses the input AC voltage as the reference, whereby it has a peak filter to compare with the output voltage. If the output is too high, the T2 transistor turns on and enable the bleed resistor to soak up some of the energy. I want to use a higher voltage transistor at T2 than shown (just for reliability)… haven’t changed it yet.
MISC POWER
Steppers all have 5A slow blow fuses. Because I’m worried about heat, I’m putting some extra connectors on there in case I want to mount small heatsinks + fans to the steppers. Also plan to have focused LED lighting for user control :-P
OPTO ISOLATORS
I decided to opto-isolate all inputs and output from the PC. They only cost around a buck each, and I’d much rather have my PC protected than skimp on them. Using a USB input to provide +5V power for them. I started with the 4N35’s, but soon realised they are seriously slow! What was worse, they are a real design challenge to run fast and reliable. Once you take into consider the Vce drop, required input/output currents and temperature… quite flaky to use in the design.
The 6N137 / HCPL2601 devices in contrast are absolutely beautiful devices! Much easier to use, very very fast and take half the current to operate reliably (lower temperature). I think they are perfect for the G203V’s stepping at 1/10th resolution at high speed. I still need to re-visit the resistor values I’ve used. They only need a minium of 3mA, but have take into consideration margins etc… Not 100% sure of the connection for pin 7 of them yet.
Before anyone says… I do know the G203V’s have opto-isolated inputs. But I’d still rather have the complete isolation from one section of board to external wires… otherwise the isolation is compromised by induced currents.
LIMIT/HOME SWITCHES
All limit switches are normal closed type, wired in series. Same for the home switches (which also serve as limit switches). I want to run at least 4mA through them for a good signal. I've also designed it so the switches pass 12V through and only trigger when the voltage drops less than ~5V... so they have a lot of noise immunity.
ESTOP / CHARGE PUMP
Charge pump is really the wrong term… it should be watchdog… </end gripe>. I’ve put together a circuit that requires both the charge pump and the emergency stop switch to be engage for all the outputs to function. If either fail, the stepper controllers disables turn on, the outputs turn off and the Estop signal feed back to the PC. I started designing an active bandpass filter for the 12.5KHz charge pump signal… but when it came to getting the tolerances/margins reliable I gave up and just put a small micro there hahaa… so much easier and more accurate. I’ve designed all the circuitry so that it defaults to off. So on power up, silly things don’t happen. I’II probably have the habit of hitting the Estop switch whenever I turn the main power off too.
Otherwise… I still have a spare input and output I’m not sure what to do with yet.
I’d really appreciate any advise on particulars… where I might have problems with this design or things I should re-consider. Or where it can be done better :-)
Similar Threads:
Is anyone able to provide me some advise please?
I haven't made a breakout board before for a CNC, and a second pair of eyes would be appreciated
hi
im new in cnc , so can u help me sedning me schematics and designs of a 3 axis cnc controller please, or give me a site that can help me, thaks
Hello;
I will be very busy till December 10th, but I'll check your schematics as soon as possible.
Thanks for sharing.
Kreutz.
Eclipse,
I would suggest using some pin other that OUT1 for your XDir signal. I have heard that sometimes pin one is set or reset by computer software in ways that could be detrimental to the well being of a cnc project.
I would suggest taking a look at the pin-in and pin-out assignments that are commonly used by other controllers and software (i.e., Mach3, EMC2, Xylotex). For example, if you chose to use EMC2, by using a common pin-out configuration you would be able to start with existing software initialization files rather than having to do everything from scratch.
For example, Xylotex uses: (and emc2, Mach3 and Turbocnc have configurations for this format)
pin 2 -XStep
pin 3 -XDir
pin 4 -YStep
pin 5 -YDir
pin 6 -ZStep
pin 7 -ZDir
pin 8 -AStep
pin 9 -ADir.
Mach3 commonly uses pin 17 as a charge pump signal.
A number of systems use pin 10 as E-stop.
Pins 11, 12, & 13 are often used for limits and/or home switches.
It is possible to configure things in many different ways, but, when it comes to testing it all out, it is easier to limit the number of areas that you have to troubleshoot.
Alan
Fantastic, thanks acondit! I agree, much easier to stick with the normal and avoid making such things additional overhead on setup (less problems). I'II make those changes, appreciated
I have been debating what to do about controlling vacuum and coolant. I previously thought of just having solid state relays to drive them, but I'm leaning towards having manual switches as I see no real reason to automate them. Spindle control is probably a good thing, as it safe guards against forgetting to turn it on and breaking a tool.
I don't have spindle control on my router or my lathe and have yet to break a bit because I forgot to turn on the spindle, but there have been close calls. I have a couple of relays and I am hoping to get spindle control on the router set up soon. Earlier today I dug out the schematics for the DC controller on my lathe today to see about hooking it up to the controller also.
My dust collector switch is across the room from the router and a pain to turn on and off. I am thinking about one of those remote control switches for it. I haven't been using coolant yet but I believe that coolant being switched on either by itself or with the spindle makes sense too.
Alan
I haven't used Mach3 to drive a CNC before, so not sure when it comes to the particulars. But I was thinking about having the system such that I could program/test without all the noise... hence the idea of manual control seems appealing. I'm actually installing two power sockets in the side of my all in one box (transformer, solid state relays, DC power, interface board, drivers, fans, heatsinks)
For coolant, I was wondering if it is practical to use a 12VDC washer bottle water pump. I know they aren't rated for continuous operation, but I can reduce the power to it to avoid the motor overheating. My main concern is having less like-able fluids running through it than water.
I am in Melbourne. Where are you.
X3 user running from Mach3.
Email me if you wish: neilw20@optusnet.com.au
Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. THREE ways to fix things: The RIGHT way, the OTHER way, and maybe YOUR way, which is possibly a FASTER WRONG WAY!
Well... the project is going quite well. After revisions to the schematic I finished designing the printed circuit board, got them back from the manufacturer and almost finished building them. Just missing a couple of the connectors.
I put a little micro on the PC interface board to handle reading the charge pump. I always thought it was 12.5kHz from the PC (using Mach3), but later found I was getting 10.2kHz grrr.... Minor code change fixed that! Otherwise, it's all looking quite good.
The box holding everything is getting put together. Held up on finishing the high voltage wiring by a couple of missing switches. Quite a painful exercise to make all the cutouts and holes. Even if I had the CNC running to do that, the case is just a little too big to fit within the gantry.
Getting closer to finishing and giving it a test run!
Not sure if anyone is interested... but the attached picture shows the progress. All I can say is I love this time of year where a bit of extra time goes a long way to finishing projects
Dude,
Your work is awesome!
Jeff Alessi
jalessi@aol.com
I sure am interested keep the pictures rolling.
Keith
Mounted the rear panel with the heatsinks and Gecko Drivers, as well as the front panel that has the high voltage switches.
I have one master switch, which cuts the mains power to everything.
One switch just controls a power point mounted on the box, for the vacuum system - just convenience ;-) The other switch controls the power to the 55VDC power supply for the steppers. This is so I can kill the power to the steppers (stop them heating) while I'm playing around and still want the 12V supply running.
Finished wiring up all the mains AC voltage items (switches, solid state relays, sockets, transformer etc...). All tested One of the solid state relays is for the spindle, which goes to a power point on the box, while the other is combined with the EStop system to kill the AC feed to the stepper power supply.
The power supply has also been tested. The bleed circuit I designed actually works quite well. I haven't tested it with handling the back emf spikes yet, but have for automatic capacitor discharge at power off. Without it, it takes ~50 seconds for the voltage to drop from 55V down to 10V. With the bleed circuit enabled, it reduces that time to just under a second Hopefully once the steppers are on there I'II be able to see it handling the back emf on deceleration by the LED that runs when the bleeding is active.
The main supply will be able to handle 8amps @ ~55VDC... should easily handle 4x 305oz/in steppers. The 12VDC supply is a 4A switchmode plugpack, which sits on top of the solid state relays. Will wire that up tomorrow, as well as all the wiring for the Gecko controllers.
Finished wiring on the inside. Only need to fit the ventilation fan now.
Just need to wire my stepper motors up with connectors... the emergency stop switch and limit switches and I can start playing with the machine!
Taken a couple of months so far, and now it's all coming together so quickly
Controller is a big success!
It works perfectly!
So nice when something comes together so well in the end.
Thanks kreutz
Someone asked me if they could use my power supply clamp circuit. If it's just for yourself, not for commercial sale, then your most welcome.
It has worked perfectly for me the last 3 days of used it. I did stress it with 10 on/off cycles in a row to see how hot the resistor got. I haven't determined how well it clamps the back EMF yet... the capacitors I have work really well, and I've had too much fun playing with my first CNC for the moment.
I did change a couple of values with the clamp circuit since the first schematic. I originally simulated the circuit to ensure it worked, however I backed off the current going through two of the resistors because the FET didn't need it, and it was just better to keep the heat in them low. I also used a different PNP transistor with a higher voltage rating. Originally I only used what I had in stock, but as I'm running 55V, it was a little too close for my robust design requirements. So obtained a 100V PNP for it.
Revised schematic attached for those interested.... use at your own risk please.