November 1, 2012

How to diagnose and repair a refrigerator

Filed under: General technical reference — VIP @ 00:54

Be careful. Read manufacturer’s recommendations. Do this at your own risk. Make sure to research local regulations on ozone-depleting refrigerants.

There are many appliances in our life that have several standard configurations and haven’t changed for years. Refrigerators are one of those appliances. Of course there new designs with linear-action compressors and electronic control circuits but the majority of refrigerators has a very common scheme to them.

For the past seventy years this remains unchanged:

Compressor – an overview.

A refrigerator compressor motor is a rather economical motor that rotates a crank or a cam and that makes a piston reciprocate. A motor, a piston and the valve mechanism are encapsulated in a steel body that is welded shut and filled with oil to ensure constant lubrication.

The motor has to be switched on and off by the circuit to ensure that the temperature in the refrigerator is right. When the motor is energized it has to overcome the back pressure of the refrigerant fluid and some static friction. To make the motor more energy efficient, it is designed so it cannot overcome it by itself. There is an auxiliary coil in the motor that makes it more powerful temporarily, just to overcome that standstill friction and backpressure. Once the motor is running the power to this auxiliary coil is cut.

This is what you see if you take the connector off the compressor:

There are three pins, one for the Starter winding, that auxiliary winding that helps the motor start; another pin is for the main motor winding coil; the third pin is shared between them and supplies both windings with power. (or supplies ground to both windings)

The circuitry that controlls the compressor has to switch both, the Start Winding and the Run Winding for the motor to start and than deenergize the Start winding when the motor is running.


The thermostat and how it works.

I would admit that I didn’t get a chance to fix many refrigerators in my life, but I had repaired a few. Thermostats do vary in design and I cannot list all variations of thermostats here but here is the basic electromechanical thermostat that you are going to find in the refrigerator:

The thin tube of the thermostat goes up into the freezer. It acts as a heat conductor. When the gas in the tube and the chamber expands beyond a certain point, the chamber closes a switch. That “point” when the switch is closed by the chamber is set by an adjustment knob that usually threads some part in and out to bring the switch contacts closer together or further apart thus changes the point when they become engaged.

Since a thermostat is a rather delicate part on most large refrigerators it does not close the compressor circuit directly. The reason for this is to reduce the contact spark erosion and to keep the power chords that carry high current from going into the refrigerator.


The thermal relay

The thermal relay is another component that can be found in many refrigerators. The reason refrigerators use a Thermal relay is because it can be engaged by an Alternating Current unlike an electromagnetic relay that would require the current to be rectified. Also this relay reacts with a delay.

A thermal relay control circuit current heats up a small coil of wire that heats up the bimetallic strip. This bimetallic strip bends in one direction when heated to a point because bimetallic strips are made of two different metals with different heat expansion rates. This strip opens and closes the contacts of the power circuit that drives the load: a compressor in case of a refrigerator.

More modern thermal relays use a heating element that is incorporated into the bimetallic strip; therefore the control circuit is grounded into the power circuit since it is easier to build a relay like this.

On older refrigerators, a dual thermal relay will close the Run Winding and Start Winding circuit when thermostat circuit is closed; opening the Start Winding circuit after a certain time interval after the compressor starts to move.

Solid-state devices.

More modern refrigerators use a Solid-State device to shut off the Start Winding after the motor starts.

Those devices are commonly found to be built into the three pin female connectors that plug into the compressor, making this assembly very compact. They also commonly include a non-solid-state overpower protection that opens the circuit if too much current passes through it for too long. They are, once again, made out of bimetallic elements that open the circuit when they get hot, but stay closed when they are cold.

The “Solid-state” Start Winding shutoff relay looks like a puck of some material that gains resistance as it heats up. This puck is held in place by some contacts. When this puck gets hot, and its resistance increases and the current through it decreases, the Starter Winding gets less current and practically does not operate.

Usually, the Overpower protection is connected to the Common pin on the connector and it protects both windings, while this solid-state puck is connected to the Starter Winding pin. So if Overpower is in series, on the Line side of the circuit, the Start Winding shutoff delay is on the Neutral side of the circuit, or vice versa.

This image was taken from

  • Sometimes moisture gets in this plug/relay and corrodes the surface of the solid-state puck. The corrosion can be sanded off and the puck can be rotated 90˚ so contacts would not press against the same spots on the puck as before. This is one of the cheap ways to fix this problem without buying replacement parts.

Refrigerant – leakage and refilling.

Refrigerator cooling pipework is made from a variety of metals. The compressor inner casting is made of cast iron or aluminum; the pipes that come out of the compressor are steel or aluminum. To solder copper to aluminum some transition coupling is soldered between them that are made out of nickel. The freezer us usually aluminum and the heat exchanger on the back is steel. The pipes that connect everything are usually copper.

  • Because all metals have different thermal expansion coefficients, the connections between any dissimilar metals usually fail first. This also applies to places where copper pipe exits from some solid part that is made out of steel. Things heat and cool and expand and contract, causing places where they are joined to bend. This eventually causes those areas to crack and for the refrigerant to leak out. Connection areas are places to look for leaks.
  • If there is still some REFRIGERANT in the system a simple soap and water solution can be applied with a brush. If bubbles are forming, than there is a leak.
  • REFRIGERANTS can be FLAMMABLE. the lubrication oil that the pump is circulating along with the REFRIGERANT is always FLAMMABLE. if it is forced out of the system by leaking REFRIGERANT while there is a source of ignition, there will be an explosion. do not solder the pipes unless the system was depressurized and oil was allowed to drain.
  • Sometimes REFRIGERATORS loose REFRIGERANTS over time without any obvious leak spots. this happens because no system can be built perfectly sealed.
  • on every compressor there is a pipe that leads to nowhere in is crimped shut. this is how REFRIGERATORS get filled in the factory. to fill one at home, the manufacturer-recommended REFRIGERANT has to be filled through a different kind of opening.
  • a hole can be poked in the copper return line of the compressor. A thin tube that connects the heat exchanger with the compressor can be salvaged from some old REFRIGERATOR and inserted into that hole.
  • everything needs to be cleaned from corrosion and covered with flux before soldering is done. than the tube is soldered in place and a fitting is made to let in new REFRIGERANT.
  • after the system is filled (about 30 seconds, the tank is closed and the thin tube is crimped and soldered shut.
  • refrigerator oil is hygroscopic. it ABSORBS water from the atmosphere, just like brake fluid. avoid prolonged exposure of the cooling system to the outside air.

October 31, 2012

High Voltage experiments using an unrectified 14 KHz transformer with a 16,000 volt output.

Filed under: To blow your mind — VIP @ 19:14

Warning! High Voltage experiments possess a potential danger of electrocution and fire. Please be cautious when performing those experiments. Children should be supervised by an adult when experimenting with high voltage. High voltage can cause undesired electromagnetic interference. This interference can cause pacemakers and other medical devices to malfunction.

I happened to conduct a line of experiments with a device that I built over a Christmas Break last year, when I was still in college. This device uses an ordinary 60Hz transformer to convert 120 VAC to 12VAC. 12VAC is converted to 12VDC using a simple rectifier bridge and an electrolytic capacitor. This 12VDC powers a circuit that drives a high frequency transformer, similar to TV fly-back transformers, only a dedicated one. This circuit has some sort of undercurrent and overcurrent protection so if this transformer is shorted to the ground or is not driving any load, no harm is supposed to be done.

There are few other components in the enclosure. There is a shunt resistor that the current (at 12VDC) goes through to power the high-frequency driver. The shunt is made from iron chimney wire and there is a microamperemeter wired in parallel to the shunt to show how current consumption fluctuates. It does fluctuate. I will come back to WHY it fluctuates.

There is also an LED that glows when the high voltage circuit is energized. But it is connected to the high voltage output of the transformer with one of its leads and is not connected to anything with another lead. How so? I will try to answer this question later; again, however I can only draw a hypothesis explaining this phenomenon.

(The power switch has to be closed for the indicator LED to glow.)

As you can see, there is a 120VAC power chord going into the enclosure and there is a stud with a pseudo-hemispherical knob on top of it. There is no ground for the high voltage. None of the experiments required there to be a ground…

First of all, an unrectified high voltage transformer will spark to conductive objects that are brought near it even if they are not connected to ground. Maybe because they resemble a capacitor plate, while another capacitor plate is the ground, concrete and wires inside the walls. Maybe because all conductors have an internal capacitance, inductance and resistance that delay the alternating current until the source switches polarity thus consuming energy to overcome a previously acquired charge. I could not find a clear answer to that, but I tend to think that the latter contributes more to the sparks that we see.

It seems like some materials can trap the charge better than others, causing longer sparks and showing the increase of the total device current consumption on the microammeter. Pencil lead is one. Pencil lead is made by baking conductive graphite, a conductor with ceramic, an insulator. This gives pencil lead a lot of internal capacitance and resistance. Thus it can draw a relatively long spark, compared to a steel rod of a similar size.

One of the most interesting experiment that I conducted was intended to further understand the nature of single-pole electricity. I took a strip of cardboard and glued sewing pins to it, making sure that the gaps between them are equal. All pins were facing in one direction. A sharp point of one pin would face a hemispherical end of another pin. Since sharp conical or pyramidal points tend to discharge with more ease than spherical objects, I hypothesized that the current is going to move in one direction across this strand of pins, with more ease than in the other direction. (Notice that I am avoiding the word “resistance”.) The strand of diodes was connected to the pole of the high voltage circuit with the middle pin in the row of pins, while I held the “tip” end of the strand to the pole. There was a large spark. After that I held the “ball” end. There was a smaller spark. I tried various circuits with pins and I will illustrate them to make this experiment easier to understand.

Pretty much, I built a very inefficient diode with high reverse current leakage and a lot of resistance in both directions.

Nikola Tesla (who else would it be) pioneered the concept of single pole electricity, but his archives were lost after he died and his scientific achievements in this field had to be rediscovered by many other scientists in different countries, many years later. (Many scientific records of Nikola Tesla were lost either at the fire that happened in his laboratory or taken by the US intelligences or his records vanished in the hands of a capitalist that sponsored his research. This creates a lot of room for speculation and fables which are beyond the scope of this article.)

One of the researchers who attempted to transfer energy using single pole electricity was Stanislaw Avramenko. Among many other discoveries, he came up with a circuit that could rectify single pole electricity and charge a capacitor. This circuit is named after its inventor, the Avramenko Fork. I played with this circuit until I ended up unbending two wire spark gap leads too far and causing the diodes to fail from the charge that had built up in the capacitor.

I hypothesized that LEDs glow when brought near the high voltage single-pole power supply for the reasons similar to those that cause the diodes in the Avramenko Fork to charge the capacitor.

I also noticed that single-pole power supply can cause Fluorescent lights to glow very brightly. I used a CFL that had a broken internal circuitry to for my experiments

This observation inspired Stanislaw Avramenko to start his research of single-pole electricity.

CFLs start to glow when there is a presence of static electricity and make a dim flash if brought to near the automotive distributor cables. So I made a CFL into a convenient HV detector by using a conventional bulb socket and encapsulating everything in the polycarbonate mayonese jar.

The most spectacular experiment that I conducted was based on my old pin observations. This experiment made me think that of an ignition system that can light the fuel and oxidant mixture in several places within the combustion chamber, at once. I can easily see how this can be applies in gas furnaces and jet engines and to safely detonate explosives. I was too greedy to sacrifice PCB to etch a design like this, so I used same old pencil lead. I think that a kiln-fired mixture of ceramics and metal shavings can be used to make an igniter surface that would not catch on fire or ware out too quickly.

Yes, there were sparks and even some smoke this time…

Eventually, the areas where sparks were jumping started to smolder. As holes got bugger, sparks stopped jumping, but some spark gaps caused the paper to catch on fire. I repeated this experiment several times.

With all those interesting things done I never used this circuit for the intent that I built it for. I intended to repeat the experiment that was conducted in the Russian Academy of Science.

My last experiment speaks for itself. A miniature incandescent light bulb is used. I tried detecting direct current with a coil of wire and compass and it does fluctuate but there is no way I can show this in a photograph. Wait for my next post to see something more spectacular.

Vladimir Tolskiy.

January 16, 2012

3 ways to toggle an LED with a push button, using a PIC16F628 microcontroller and a MikroC compiler

Filed under: General technical reference — VIP @ 12:07

Microcontrollers have a built-in processor, some memory and a number of different pin control and analysis hardware, all on a single chip.

Serial communication, pulse width modulation, frequency output, hardware USB, CAN bus are only few of the hard-logic modules that can be built into a microcontroller.

Then there are common options, such as an analog to digital converter input, Schmidt trigger input or a logical button input.

An internal clock source is a common option common on most modern microcontrollers.

Usually, the full list of hardware and software means to adapt the input and output pins of the microcontroller to your needs can be found in the datasheet. Also the compiler documentation is important so you don’t find yourself reinventing the wheel.

So here is the “hello world” project that I had started with about a year ago using the MikroC compiler. And if it doesn’t work, that isn’t a problem. It will give you some experience insolating the problem and correcting it.

If you want to control the delay interval with a variable, than you should use the Vdelay_ms((variable));.

This command also uses a lot more space in the microcontroller RAM.

To set the fuses, click Project>Edit Project, in the main menu.

Pay close attention on how you set the fuses for the microcontroller:

  • If you don’t want to pull up the MCLR pin, disable MCLR.
  • You don’t need to write-protect your code.
  • You don’t need a brownout, watchdog timer or a power up timer in this project
  • Use the internal oscillator at 8 mhz. Therefore use the INTOSCIO setting for the oscillator selection.

    “INTOSCIO” makes GB4, the PORTB pin 4, an ordinary I/O pin versus a clock output pin, used to synchronize the PIC with other devices.

I have a PicKit2 and a PicKit3 to program the microcontroller (Figure 1). There are many devices on the market to write your compiled code into the microcontroller.

Download an appropriate standalone utility for the PicKit2 or PicKit3, whatever is that you are using. Connect the device via USB to your computer. Find the ‘Check Communication’ button and see what your Microchip utility is going to say… Hopefully, your device was detected.

Now for the connection to the microcontroller and for the actual burn: I assume that you use a breadboard where things can be easily plugged into and pulled out off.

Look at the datasheet at I would recommend printing page 4 and page 137 of the datasheet.

You notice that there are pins:

  • MCLR
  • VDD – 5V
  • VSS – ground

PicKit2 or the PicKit3 has the same set of pin sockets, for programming. There is also an additional LVP pin socket, but that technology didn’t exist when PIC16F628 was developed. So five pins need to be connected to the five sockets on the device, by the use of headers and some copper jumpers, on your breadboard. At this point, I made a device that can simplify this procedure to a great extent. Power supply must be off. Also look at the Figure 2 to see what not to have connected when you program a PIC.

Go to Project>Build and build the code. Than find ‘import hex’ in the PicKit utility, find the .hex file in the root folder of the project you had just compiled. (I hope that you keep it away from the compiler’s examples folder) write it to the microcontroller. Connect and LED to the ground, via a 470 ohm resistor and connect a button between the ground and a 10kOhm resistor. (See Figure 4.)

One of the images here originated from This is a very useful website to get started with using PIC microcontrollers. The Mikroelektronika MikroC compiler has a great help file that will help you build projects. However it relies on the expensive development boards that the company is trying to promote for some more complicated projects.

Figure 1. Figure 2.
PicKit3 with a label that makes it easier for me to connect it to the target microcontroller. This information is directly copied from the poster that comes with thePicKit3. Be aware of those circuit connections when programming a PIC controller.
SFigure 3. Figure 4.
Image from

This is how your microcontroller should be connected to the programming device.

Image from

This is how a button should be connected to the PIC microcontroller.


Pick the pair of IF statements that you like and see how the PORTB

is toggled on and off by the button attached to RA0 pin of the PORTA

of PIC16F628 microcontroller.

The hardware circuitry for the button may cause instability and therefore is a

subject for research.

The value of the pullup resistor determines the stability.

The delay is necessary to supress the contact bounce effect or to ‘debounce’ the button.

The software part is here and it is tested to work in 3 combinations of IF statements.


Created by Vladimir Tolskiy*/

bit oldstate;

void main()


short oldstate=0;

CMCON = 0x07; // Disable comparators

TRISA.F0 = 1; //pin RA0 as input – it doesn’t matter if you are using F0 or B0

TRISB = 0x00; // PORTB as output

PORTB = 0x00; // PORTB pins are all “off”

do {

//Choose the IF statement that you like the most:

if (Button(&PORTA, 0, 1, 1)) // Detect logical one

//if(PORTA.F0 == 0)

//if ((PORTA & 0b00000001) == 0b00000000)


Delay_ms(10); // “debouncing” mechanical contacts

oldstate = 1; // Update flag


//Choose the IF statement that you like the most:

if (oldstate && Button(&PORTA, 0, 1, 0)) // Detect one to zero change

//if (oldstate && PORTA.F0 == 1)

//if (oldstate && (PORTA & 0b00000001) == 0b00000001)


Delay_ms(10); // “debouncing” mechanical contacts


oldstate = 0; // Update flag


} while(1); // Endless loop


Making an SMD circuit board without specialized equipment (This is a developing story.)

Filed under: To blow your mind — VIP @ 02:58

When you think of soldering an SMD – mounted component on to the circuit board, you are probably thinking of the reflow oven and some other expensive equipment. Not in my case.

But you have to remember that any DIY technology involves some risk taking and some estimation of the economic benefits/losses. I began searching the internet and looking for a cheap solution to make DIY circuit boards at home, and I didn’t find an instruction that would match my goal from the beginning to the end.

What I learned:

  • That this exponential growth but to but with exponential decay function of temperature over time can be obtained by making a control module for the toaster oven with an alarm that will warn you when to open the door. I am still looking for the website I read it at. (Remember the Newton’s Law of Cooling?)
  • There is a way to solder SMDs on the frying pen. I bought a frying pan with low edges for making a French toast.
  • After I tried to solder an SMD onto the breakout board and had the board bend and turn brown from uneven heating, I took some silicone grease that can hold 400˚F (204˚C) and used that to evenly transfer heat. I also tried using sand, but the grease works better.
  • Only if the board is pre-tinned, you can solder the component right on to the board.
  • I bought a laser thermometer. It is not very precise but it is fairly precise when it comes to change in temperatures. (How else would you measure the temperature of the molten solder?)
  • 60/40 solder contains sixty percent tin and forty percent tin. The melting temperature of the solder is 183–190 °C (361–374 °F). Although Tin and Lead have fairly high boiling points, the solder can boil below 300°C and that’s what you don’t want to happen by any means unless you are trying to get lead poisoning.
  • I bought a portable range so I could experiment with solder boiling outdoors.
  • Lead is a known toxic metal but more expensive ROHS-compliant solder has a number of other neurotoxic heavy metals to replace lead. Antimony is one of them.

Fluxes are the trickiest part: there are too many options on the market to try in a lifetime.

  • Plumbing paste is not recommended because it is acidic and will corrode the solder spot after the assembly is finished, because the moisture in the atmosphere will make the remains of the solder into electrolyte. (Can it be washed away with alkali? Not sure yet. Experiment is on the way.)
  • Old-school chunks of brown rosin can be dissolved in rubbing alcohol to make a very good flux for precision soldering. Store it in the bottle and use a linen brush to apply the flux onto the solder joint. The rosin can hold your SMD component.
  • Modern organic solvent rosins are more expensive, but superior to rosin flux. They have a limited shelf life. Some of them can glue the component on to the spot the way rosin solution can.
  • A rare and a more expensive industrial product – the solder paste has a mixture of both, flux and powdered metals. As the heat is applied, the paste melts, burns out the flux and forms a strong solder joint. Similar to brazing.
An example of a successfully soldered SMD negative voltage generator. This silicone grease makes an ideal medium to transfer heat from the frying pan to the circuit board.

« Newer Posts

Create a free website or blog at