LCD

Spring tester / weight scale

This is another one I finished a couple months ago but haven’t posted. I wanted to test the rate of the springs in the coilover kit on my car, and manufacturers treat this like it’s some kind of trade secret. Except for a few; my kit was from Bilstein who gave me the rates but they weren’t very believable. I knew they were higher than what I was told.

So I built a spring tester. It is basically a weigh scale that can go up to 1000 pounds or so, with a way to safely compress the spring and measure displacement. For the scale I used four load cells with one at each corner of a 1/4″ aluminum plate and another 1/4″ plate to distribute the load to the four load cells and allow fixtures for various springs. The electronics for the load cells are INA103s and some more op-amps for gain. Since load cells are bridge devices a TDK DC-DC converter drives the in-amp rails with +/- 12V. The signal from the in-amps is offset and fed to an ATmega8 which does ADC and puts the values on an LCD. I am displaying the values for each load cell as well as the sum so I can see if any load cells are not being loaded equally which could result in an overload. There is also a button on an interrupt that allows zeroing the summed weight output. › Continue reading

Tags: , , , , ,

Monday, April 10th, 2017 Automotive, Electronics 7 Comments

Build a spot welder from a battery charger

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.

SpotWelder 028

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.

Spot Welder guts

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.

SpotWelder 034

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.

Low driveMedium drive

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

› Continue reading

Tags: , , , , , ,

Wednesday, March 10th, 2010 Electronics 15 Comments

Digital RPM indicator

IMAG0008

I made a circuit for RPM measurement based on an Atmel ATtiny24 to drive a Hitachi 44780 parallel interface character LCD. It uses an external interrupt request and INT0 to calculate the elapsed time between high/low transitions on the INT0 pin. The elapsed time is then converted to RPM and sent to the LCD. The code will work from RPM values up to 999, and a variable timeout is used for a low cutoff to display 0RPM. The RPM range could be extended to 9,999 or higher by modifying the decimal to BCD routine at the end of the program.

Sony 016

Here is the source code, it compiles with AVR Studio and AVR-GCC. › Continue reading

Tags: , , , ,

Wednesday, August 26th, 2009 Electronics 7 Comments