TechnoSyndicate

December 25, 2012

Распиновка выводов шагового двигателя, который используется на станке ЧПУ – конструкторе «Кулибин».

Filed under: General technical reference — VIP @ 23:59

На некоторых моторах чёрные провода заменены на синие.

Advertisements

December 23, 2012

Common 3.5mm 1/8 inch audio jacks and their pinouts:

Filed under: General technical reference — VIP @ 05:49

Generic 3.5mm jack stereo connector, common mono headset connector, Nokia stereo headset connector, Apple stereo headset connector.

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.

  • IF THE START WINDING IS NOT ENERGIZED, THE MOTOR WOULD NOT RUN. WHEN THE MOTOR IS ENERGIZED IT WILL STAND AND HUM WITH THE 60HZ FREQUENCY FOR A WHILE AND THEN THE OVERPOWER PROTECTION CIRCUIT WILL SHUT IT OF IF THIS MODEL OF REFRIGERATORS IS LUCKY TO HAVE ONE; OTHERWISE THE MOTOR WILL OVERHEAT
  • WHEN TRANSPORTING A REFRIGERATOR ON ITS BACK MAKE SURE TO LET IT SIT UPRIGHT FOR A DAY WITHOUT PLUGGING IT IN TO MAKE SURE THAT THE LUBRICATION OIL RUNS BACK DOWN INTO THE COMPRESSOR FROM THE COOLING PIPELINES. IF YOU FAIL TO DO SO THE COMPRESSOR WILL SIEZE UP AND FAIL.

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.

  • WHEN REPLACING A THERMOSTAT BE CAREFUL NOT TO KINK OR PUNCTURE THE TUBE OR THE GAS WILL LEAK OUT. MAKE SURE THAT THE TUBE IS ROUTED THE SAME WAY AS IT WAS BEFORE.
  • SOMETIMES REFRIGERATORS RUN FOREVER AND NO ADJUSTMENT CAN STOP THEM. THIS MAY BE BECAUSE THE REFRIGERANT LEVEL IS LOW IN THE COOLING SYSTEM AND IS NOT AN ELECTRICAL PROBLEM. IT HAPPENS BECAUSE REFRIGERATOR BECOMES INEFFICIENT AND CANNOT COOL TO THE TEMPERATURE LOW ENOUGH TO OPEN THE THERMOSTAT AND STOP THE MOTOR. IN THIS CASE A REFRIGERANT NEEDS TO BE ADDED TO THE SYSTEM.

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 http://www.spudfiles.com/forums/how-connect-wires-to-my-fridge-compressor-t21724.html

  • 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.

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 http://ww1.microchip.com/downloads/en/devicedoc/40044d.pdf. I would recommend printing page 4 and page 137 of the datasheet.

You notice that there are pins:

  • CLKIN
  • CLKOUT
  • 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 http://talkingelectronics.com/projects/StartHereWithF628/StartHereF628-P1.html. 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 http://talkingelectronics.com

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

Image from www.e-shore.com

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.

enjoy

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

PORTB = ~PORTB; // Invert PORTB

oldstate = 0; // Update flag

}

} while(1); // Endless loop

}

Create a free website or blog at WordPress.com.