Jumat, 16 Maret 2012

How to make a simple MOMENTARY touch switch using transitor circuit.

BC547 is a npn transistor. datasheet

Construct this schematic:

NOTE: if touch pad is small enough to connect both pads with a finger. Then you can use your finger as a touch. Otherwise you need 2 fingers.
This circuit will help you know how a touch switch works. Suppose consider Q1 circuit was not there and the touchpad was connected to Q2. Since we humans skin has some resistance,  the current will flow through our body from +2v to base of Q2. Hence making the LED glow. More harder you press, less resistance of your body decreases. Hence LED will glow more brighter when you press harder.

When you connect Q1, the sensitivity of this circuit increases. Hence LED will glow more brighter with light touch on the touch pad. Try it. This is the basics of all the touch sensitive devices.

At the touch pad pin 2, if u connect a capacitor one end and other end to Q1 base. When you touch at this setup you will notice that the LED will be brighter first and then the brightness will reduce slowly to zero.
For electrolytic capacitors. + side will be connected to pin 2 of the touch pad.

Now this circuit above is tested for Relays. If you Connect a relay across the load (put current limit resistor if needed) and apply VLoad= Voltage needed to trigger the load ON. Say for my relay it was 24V. (Remember BC547 can support upto 45V. Do not forget a Reverse biase diode(flyback diode) across the relay to prevent spikes. In this configuration if you touch the touchpad, the relay will turn on. (or any Load you connected).

Have fun, Try it.

I'm not responsible for any short circuit you make. Remember do not short circuit the touchpad. BC547 will blow off.


Senin, 12 Maret 2012

You need to have exhaust system for your soldering station. Why is that?
The solder wire when gets melted evaporates fumes of flux (rosin) which has carcinogens which can speed up cancer making mechanism. Never inhale those fumes.

All you need to do is make a mechanism to exhale the fumes to exhaust pipes.

Well I made this setup myself. It has 4 CPU cabinet fans which gives suffucient air force to push the fumes away to exhaust.

Well things you need:

1. Circuit  for making fans work on 230V AC.
2. Fan ratings: size: 8cm x 8cm x 2.5cm
                        voltage: 12v Dc , Current : 238mA each.
3. Wooden Frame.
4. Self Tapping Screws

Construct this circuit Diagram as shown below using PCB making method explained in previous post:

Test the Fans if its working. LM7812 heats due to current consumption by motors, so put a heatsink on it , in between apply heat sink compound. This circuit will work only for Fan less than 250mA of current. For more current the transformer and regulator has to be replaced with higher ratings. Cost will increase upon that.

Make a Frame like I did, You can do also using metal. But i do not recommend metal frame.


On my setup, I put the transformer in between to save the space. Used a Glue gun to isolate the circuit wires from touching each other. Used a double side adhesive foam tape to stick it on the transformer. The AC wire is right on top of the frame. I locked it to the frame incase, I mistake my self in pulling the wire out.

Now this is the final part of the exhaust system. The First Frame with 2 fans pushes the fumes away towards the other frame. Then this above picture frame hence furthur pushes it away to exhaust.

Here I just kept this frame without constructing a exhaust pipe. You can construct a exhaust pipe here which then exhausts the fumes to outside the working environment.

Thank you for reading, Save yourself from cancer. Make yourself one.

Jumat, 09 Maret 2012

Things you need:

Thinner (used in mixing the paint)
 Iso-Proply Alcohol
Acetone
3 Brushes (small and harder)
1 Tooth brush
1 cotton cloth

I follow this procedure below:

After etching the PCB and soldering the components, the flux remains and PCB looks kind of un attractive. Keeping flux for long time can accumulate dust hence there are chances of corrosion.





Above picture shows flux remains after soldering.

Now step 1: Using hard brushes apply thinner on pcb quickly without getting dried. After applying use the tooth brush to brush the flux off. Remember thinner should not get dried. So do remember to apply thinner every 5 seconds after brushing with tooth brush. You'll notice the flux getting dissolved in thinner and disappearing. Keeping the thinner wet on pcb clean it off quickly using cotton cloth. Keep it for drying.

Step 2: After getting dried, if you did not cleaned it quick your pcb will be little sticky. Thinner gets sticky after drying. So apply acetone with another hard brush. And wipe it off with cotton cloth immediately before it gets dry. Your stickiness will go away. check for sticky spots again and clean them. After cleaning keep it for drying.

Step 3: Apply Iso -proply Alcohol to clean it furthur. Keep for drying.  Congratulations You PCB is ready and cleaned. Iso- Proply Alcohol can also be used to clean pcb before soldering. Do not use thinner before soldering.

You will have a flux free PCB.





Senin, 05 Maret 2012

There are lots of  FPGA (Field Programmable Gate Arrays) uses in industries where lots of logical blocks are replaced by one FPGA. Secondly they are very expensive compared to our 89c4051 microcontrollers.

Well there is only one simple solution. Make use of microcontroller to make logic blocks as done in FPGA.
Like 3 to 9 decoder, 8bit shift register, etc.

First you need to plan every logic block and write its truth table. Make a formula out of it using karnaugh's map. Simplify the logic formula if possible.

Implement the formula in your software and program the controller.

Here's one example:

//2 to 4 decoder using 89c4051

#include "REGX51.H"
#include "stdio.h"


//create your entity here(pins)


sbit in0 = P3^0; // input 0
sbit in1 = P3^1; // input 1




sbit out0 = P1^0; //output 0
sbit out1 = P1^1; //output 1
sbit out2 = P1^2; //output 2
sbit out3 = P1^3; //output 3

void main( )
{

int input=0;
while(1)
{
  P3=0xff; //set port 3 to high to read inputs.
  input = input | in1;  //or input bit with input variable
  input=input<1;  //shift the input bit to consider 2nd order bit for a number (second last LSB)
  input = input |in0; //or next input bit to consider 1st order bit for a number. (LSB)
  switch(input)
 {
   case 0: out0=1;
           out1=0;
           out2=0;
           out3=0;
            break;
   case 1: out0=0;
           out1=1;
           out2=0;
           out3=0;
            break;
   case 2: out0=0;
           out1=0;
           out2=1;
           out3=0;
            break;
   case 3: out0=0;
           out1=0;
           out2=0;
           out3=1;
            break;
   default:break;
  } //end switch
}  //end while
} //end main


 Try it. You can try various logical blocks and then combine into one block eliminating the use of fpga. Multiple microcontrollers can be used for bigger logic blocks. Some functions are very complex, and has high logical circuits. Those functions seriously needs FPGA's. They do it well at high speed.





How do I dispose of Ferric Chloride Solution?
Ans. There are two ways:

  1. Contact your local Hazardous Waste Disposal Company for the disposal of ferric chloride. 
  2. The solution must not be put down the drain because of residual copper ions left in it. To make it safe for disposal, you can add sodium carbonate (washing soda) or sodium hydroxide to it to neutralize it, until the pH value goes up to between 7.0 and 8.0, testing it with indicator paper. Copper will be deposited as a sludge. Allow the sludge to settle, pour off the liquid, further dilute it with water and then it can be poured down the drain. Collect the sludge in plastic bags and dispose of it as required by your local waste authority. 
  3. This information is taken from some other source. 

Minggu, 04 Maret 2012

Make your own PCB ( Printed Circuit Board)

Our main Aim is to make a PCB using 4x4Cms Copper Clad board.

WARNING:  I have been testing this for years without problems. Short circuits and damage to you is out of my hands. 

Things required:
    1. 4x4Cms Copper Clad PCB. 
    2. Ferric Chloride Anhydrous (Iron III chloride)
    3. Small square container
    4. Plastic spoon and rubber gloves.
    5. Acetone / Thinner.
    6. Toothbrush ( local use only)
    7. Trace Paper (used mostly where engineering plans are done)
    8. Iron
Step 1: Draw a PCB on any PCB design suite. I use Diptrace 300pins Limit version. And print a correct layout you need to print on a Trace paper using a laser printer (black toner). 600dpi resolution is needed. Remember always to check whether you need a positive side layout or negative side layout. wrong layout leads to wrong connections, Circuit will never work and mite result in damage.

Step 2: Clean the pcb first using a washing scrub or a cleaner like acetone. Main aim here is to keep the pcb to be ironed dust free and oil free. Do not touch the board after the process. Now place the trace paper onto the board (printed side should be facing the copper) and iron it till you feel the ink has been transferred.
Remove the paper only by soaking in water. Some tracks will go off if cleaning or ironing part is not done well. Remember it also depends on quality of your laser print. Low quality setting also results in this problem.

Step 3: Now we must make the setup for pcb etching. Take small amout of water into a small square container and add few tea spoons of ferric chloride powder. (WARNING: wear protective gloves and eye goggles. Exothermic reaction) Remember Ferric Chloride is corrosive in nature, it will stain material and disolve metals. That is why plastic tea spoon and container is important. Put this setup in a water bath heated and maintained at temperature of 50degrees.

Step 4: We are now ready to insert pcb for etching. Insert the pcb into the container. Stir periodically till the pcb gets etched completely (you will notice copper dissolving). Remove the board after etching and dip into the container with water to neutralize the ferric chloride reaction. Over etching results in tracks loss. Under etching results in some copper remains on the pcb.

Step 5: Clean the board using acetone to remove the toner using the toothbrush and wipe it using cotton cloth and your pcb is ready to be soldered.

Dont's:
1: If tracks are lost after soaking process, do not use permanent marker. I have been testing that for years. It gets dissolved eventually if etching is very slow and your tracks look ugly. Remember, you can always Re- iron the board with fresh new layout. Over ironing results in bubbles on copper clad board. it means your board have to be replaced with new one.

2: Do not dispose off ferric chloride in drain directly. Corrisive material has to be disposed carefully.

Any questions about this method please email : mcf009_activ@yahoo.com
or
post a comment.



 

Minggu, 14 Februari 2010

PIC 16F877A HELP

As I have seen so many problems are related to this PIC controller IC's. Nobody finds these programs online. First program is to blink a LED and that we can't find so easily. Let me provide you one code i wrote. This is tested through MPLAB software.
The circuit diagram has not much components. I tried blinking this whole port B. You can change the hex number 0xff and 0x00 and put as you want in the C program. while loop is infinite so the LED's will blink.
Circuit diagram :
The program to be burned has to be written on MPLAB or PIC C compiler as i used them.
The C code is written below:

#include "16f877a.h" //IC selection
#fuses XT, NOWDT, NOPROTECT, NOLVP
#use delay (clock =20000000) //clock 20MHz
void main()
{
while(1)
{
output_B(0xff); //hex to binary output on port B
delay_us(500); // delay = 500 x clock period.
output_B(0x00);
delay_us(500);
}
}

I have tested it. If any questions regarding this circuit. Please do ask . Thank you!