Thread: CNC 3020 Enclosure/Upgrade
Thanks Kris, I am getting there, slowly!
Charge Pump continued...
I ran a quick test this morning and the charge pump circuit worked fine through the opto-isolator. While I was testing the circuit, it occurred to me that my Estop flip flop on the IO board was no longer needed. It also occurred to me that I could use the Estop switch with the charge pump, to make a true hardware emergency stop. All I needed to do was take the NC side of the Estop switch to +5v, the NO to Gnd and the Common to Pin 5 of the 4538N. I also added a bi-color LED indicator and a 2 pin connector to take a feed over to the IO board so that Mach3 knows when the Estop occurs.
Here's the 3rd version of the circuit...
As I now have a PC PSU inside with ample 5v & 12v lines, I can also loose the 5v regulator circuit from the IO board. Hopefully this extra space will allow me to use some proper connector blocks. I simply didn't have space to fit them before, within the free version of Eagle's size limit (100mm x 80mm).
I managed to temporarily wire up the spindle over the weekend and isolation routed the above PCB, it wasn't until assembly that I realized that I had still managed to get the +5 and +12v wrong. DOH! I had a short male to female extension lead kicking about, so just flipped the red and yellow wires to test out the board. The design and manufacture were good, everything fitted nicely and the board worked as expected. I have however, since tweaked the design yet again, along with a redesign of the IO board. I now have a single 4 pin connector that will supply 5v & the Estop position to the IO board and it will also send the charge pump signal from the IO board to the power board. Hopefully I can get the 2 new PCBs routed and assembled this week and get them tested.
It sounds like your boards would be of use to others, are you planning to make them available ready built ?Spelling mistakes are not intentional, I only seem to see them some time after I've posted
I think this machine will be the death of me! I am on my 5th or 6th version of the charge pump circuit now, and 4th or 5th version of the IO board. The charge pump part is working beautifully. A five pin connector takes the 5v, gnd, switched gnd, estop switch position to the IO board and also supplies the charge pump signal. (Previous version I had forgotten the IO board needed power to send the charge pump signal, and was switching the 5v. DOH!) Without the switched ground from the mosfet, the spindle relay transistor wont do anything, meaning the the spindle wont work until a valid charge pump signal is applied. The estop position is just fed back to parallel port pin 15 so that Mach3 also knows when an Estop has occurred. All of this this works great, I just have one niggle with the IO board.
In my previous version of the IO board I had forgot the Limit,Home inputs are NC, which meant the LED's were on all the time. I added a transistor, and now the LED works but the parallel port pin is held low. The strange thing is I tested this with my breadboard before I made the new board, but somehow had managed to test and make something completely different. Here's that part of the schematic...
This was my thinking...
When X6-1 & X6-2 are connected to the Home switches, pin 2 of OK1A is grounded, meaning PP 13 is held low. By grounding the base of Q3 LED 1 should be off.
When X6-1 & X6-2 are open, R14 will supply base current to Q3, lighting up LED 1, and also hold pin 2 of OK1A high, making PP13 go high.
It's the last part that doesn't work, the LED lights up but pin 2 stays low, thus Mach3 doesn't see the switch activate.
I am guessing it has to do with the base of Q3, but don't know to be honest, I am better with digital electronics.
Any help or suggestions much appreciated.
Assuming the ok1a pin2 input is a logic input and not an optoisolator, to make it work, either:
- connect ok1a pin 2 to the collector then reverse your logic, switch closed= high
- put another resistor between the pullup-ok1a junction and the base of Q3. I don't know what values you've used so I've shown my calcs and you can run them for yourself. Assuming your led needs 10mA and q3 has a gain of 50 then the current into the base needs to be10/50mA= 0.2mA so the total resistance on the base to 5v rail is (5-0.7)/0.2k=21.5k. If your pullup is say 4.7k then the new resistor needs to be 21.5-4.7=16.8k, the value isn't that critical so use next lowest standard value of 15k. As a check, the ok1a input will see a voltage of (5-0.7) * 15/(15+4.7)+0.7v =4v when the switch is open.
If ok1a pin2 is optoisolated then option 1 may not work and a different calc is needed for option 2.
Hope this helps.
Last edited by irving2008; 01-03-2014 at 07:23 AM.
Thank you so much for replying Irving, this all makes sense now. I also think that I inadvertently did your second option when I tested it., I was using a 4.7k pullup and a 4.7k current limiting resistor on the transistor base. I will test this out as soon as I get a chance, but it probably won't be for a few days.
4k7 on the base is slightly too small, your logic 1 level will be 2.8v assuming 5v rail which is marginal for noise IMHO. I'd go to 10k at least.
Many thanks Irving, a 10k resistor on the transistor base worked a treat, I was able to squeeze it in without remaking the PCB which was also good. Here's a couple of pics...
Today I did the mains wiring and started on rewiring the stepper motors, I think I have identified the connectors used as JST SM connectors, and just need to order some male/female crimp pins for them to be able to finish it off.
While I was away I thought about the front panel, it would be nice the engrave some text/lines for a nice professional finish. I just wondered if anyone else had done this and managed to fill the engraving with black paint to good effect?
I think I have also decided to fit some form of LCD display, which I could use to display various info from Mach3 instead of a bunch of LEDs. I could also look at building a speed sensor for the spindle and displaying the speed on the display as well.
Anyway I think tomorrows job will be to try and design the front panel, stay tuned.
I spent a bit of time on the front panel and this is what i have come up with...
The 3 rockers are mains (red), lights (grey) and spindle (green). To the left is the Estop switch with status LED underneath (bicolor). To the right of the rockers is the spindle speed control with yellow LED indicator. The top 3 LEDs are home switches (green), probe (blue) and limit switches (red). Underneath is the PC power button with green power LED and orange HD LED. (I may do away with the PC switch and just set it to auto power on in the BIOS)
The right hand side of the panel consists of the 2 joysticks, LCD display and 9 buttons which I will use to control some basic functions in Mach3.
By Pointy in forum Machine DiscussionReplies: 31Last Post: 18-02-2014, 12:04 PM
By thomashomer1986 in forum General ElectronicsReplies: 12Last Post: 02-02-2014, 05:38 PM
By EddyCurrent in forum Items On eBay UKReplies: 4Last Post: 18-10-2013, 10:14 AM
By Washout in forum General ElectronicsReplies: 12Last Post: 22-09-2012, 08:10 PM
By manofgresley in forum Electronic Project BuildingReplies: 15Last Post: 10-08-2012, 10:47 AM