Archive for March, 2010
I’ve received some email and comment requests for the layouts and schematics of the electronics running my CNC machine. I’ve pulled together what I can find for this article.
Power Filter Boards
I made these power filters for a few reasons. One is to protect the stepper motor drives from the inductive spikes that can come off of the motors. They can be pretty big. Another reason was that I wanted to use a switch-mode power supply to run the drives. There’s a lot of good reasons for this:
1. Switch-mode power supplies are cheaper than linear power supplies.
2. Switch-mode power supplies are smaller than linear supplies for equivalent output power.
3. Switch-mode power supplies come in a wide range of voltages, so you can run the stepper motors at the highest voltage possible. (The highest voltage your controller supports) This allows for more torque from any motor because a higher voltage will push more current through the inductance of the motor than a lower voltage. It will also do it quicker, so you should get a little more speed too.
However, I wasn’t sure that the chopper-style stepper driver would be okay with a switch mode supply, as it pretty much shorts out the supply every time the chopper turns on. So I needed a buffer.
I found this article at EETimesAsia by John Betten from TI. I modified the circuit for the voltage levels I wanted to run, and also found a suitable replacement for the FET since I couldn’t find one at the time. Here is the original schematic:
I’m using an IR IRFP9140N in place of Q1. I also replaced D2 with a 56V TVS from ON semi, 1.5KE56A. I used 56V because the LMD18245 motor driver IC I have has a continuous rating of 55V and an absolute max of 60V. I also oversized the output capacitor just to be on the safe side since I had some big ones laying around anyway. They are 22000uF 100V Panasonics. They are overkill, the voltage is rock-solid even when the motors are running at full clip. I wanted to be able to recycle the boards though if I ever upgrade to a bigger machine and have bigger motors. Here’s the layout for my circuit:
Opto-isolated Parallel Interface Board
I designed this parallel interface board after killing a parallel port with a breakout board that I bought off the internet. I think it just pulled too much current from the port. I designed this board to pull the smallest amount of current from the parallel port as possible, while also providing good drive characteristics for outputs. This board is customized to my application, so the voltages and bias might not be appropriate for all. Check to make sure your inputs will work before using the values here. I couldn’t find the schematic, just the layout but it’s not too complicated to figure out if you have the datasheets for the TLP2631 and the SN74LS244N. › Continue reading
I ran across a battery charger a while ago that was collecting dust. I looked inside and saw the transformer, heatsinks, high current bridge rectifier and SCR and knew I could do something with it. So I turned it into a spot welder.
I originally intended this project to weld thin sheetmetal tabs to stuff to act as solder tabs. The project has not been as easy as I originally thought though. (It also suffered some scope creep) It’s my first crack at 5V logic mixed with line AC voltage, and for rolling my own power supply. I used a step-down transformer, bridge regulator and a capacitor to feed an LDO regulator for the control circuit. With the low current draw of the controller, the voltage input to the regulator was relatively free from any ripple thanks to the capacitor.
I ended up frying a processor, LCD, and a couple other components due to a dumb move while troubleshooting the circuit, and overlooking a capacitor’s voltage rating. 120VAC will eat 5V stuff for lunch.
The control circuit basically modulates the SCR, which is hooked up to the output of the bridge rectifier after a step-down transformer. The controller allows for adjustment of duration of the weld and amount of the rectified AC phase that is delivered to the workpiece. The controller holds off the SCR until a pre-determined time of each half phase to control power delivery. An analog comparator detects the zero point of the phase for timing purposes, via a seperate bridge rectifier that has it’s ouput fed through a large resistor to the comparator. A zener clamps the current-limited voltage at 4.8V so as not to damage the micro’s input. A high-to-low transition on the comparator triggers the zero crossing timer. The threshhold voltage is adjustable by an on-board pot.
I also added an Allegro hall effect current sensor that I had lying around from my alternator current sense project. It’s overkill, but it measures the amount of peak current being delivered and displays it on the LCD.
The controller is an ATmega88PA running at 8Mhz. Firmware is written in C with AVRStudio and AVR-GCC. The micro reads the power and duration settings, displays that on the LCD, along with the max current for the last weld cycle and the temperature of the mega’s on-chip sensor. The controller also handles timing duties, zero crossing detection, and control of the SCR gate. The gate is fired by a P-channel MOSFET, with the FET’s gate driven by an NPN BJT on one of the micro’s pins. A footswitch is used as input to the micro to trigger a weld cycle. Both the footswitch input and the zero crossings are buffered by a simple three-sample debouncing routine to prevent erroneous triggers. The system also checks for the footswitch input on power up and after the weld cycle is complete, and waits if the footswitch is down with a message on the LCD to release the footswitch. This allows for safety as well as eliminating any unintended re-triggers at very short durations. Duration is adjustable from roughly one ac cycle to 60 cycles (1 sec). Power control allows from 5% to 95% of each half phase to be delivered to the workpiece.
The SCR’s cathode voltage is available at PORTC2 as a 10:1 voltage divider, and clamped with a zener to prevent damage to the micro. I didn’t need it, so it’s not used in the code.
I’ve also added a power resistor to the output to limit current. I used carbon-carbon as a power resistor (I work in a carbon plant) since it’s free and power resistors are expensive. You only need a few tenths of an ohm to limit the current to a level that won’t destroy the diodes and SCR. I’m overdriving mine at about 130A maximum. It seems to handle it fine for the short bursts. [Edit: 130A isn’t enough though. I may rewire so the diodes/SCR are on the input side and push the current higher by removing or modifying the resistor. Pressure of the electrodes on the joint is also important, still figuring that out.]
Here’s some drive waveforms: yellow is the output voltage (it’s at 50V/div so it looks small), purple is the output current measured by the hall sensor, blue is the FET’s gate that turns on the SCR, and green is the bridge voltage.
This project has got me thinking about modifying my old “buzzbox” AC welder. I’ve got some big capacitors and IGBTs from a couple old motor drives that could give me a really nice TIG welding power supply. I think I’ve read you can weld high frequency (1-2kHz?) square-wave without needing any HF section. If I remember right square-wave with a positive DC offset is sort of the ultimate TIG welder. Anybody with comments or information about that feel free to drop me a line.
Continue reading for the schematic, PCB layout, and code.
References: Miller Resistance Spot Welding
- Automotive rear fill “surround sound” with Boss DD-3
- Spring tester / weight scale
- Ducati 749/999 Tail Light
- Instruments for the GSXR
- Light pipe tail light for the GSXR
- M17x 6990m / 6970m overheating
- PAR / Spectrum analyzer
- Acrylic polishing and scratch removal
- 330W power supply for M17x update
- Continuous vs. batch water changes
- April 2017 (3)
- October 2015 (1)
- May 2015 (1)
- March 2014 (2)
- December 2013 (1)
- July 2013 (1)
- November 2012 (1)
- October 2012 (4)
- September 2012 (1)
- August 2012 (3)
- June 2012 (1)
- March 2012 (1)
- February 2012 (1)
- January 2012 (1)
- October 2011 (3)
- July 2011 (1)
- June 2011 (3)
- May 2011 (2)
- April 2011 (1)
- December 2010 (1)
- August 2010 (1)
- July 2010 (3)
- April 2010 (2)
- March 2010 (2)
- January 2010 (2)
- December 2009 (2)
- October 2009 (2)
- September 2009 (1)
- August 2009 (15)