Sunday, February 20, 2011

§ LDR+555: Dark Sensor


Component used:

1)        9v Battery with cap

2)        ON/OFF Switch

3)        L.D.R (Light Depending Resistance)   

4)        I.C 555 with Base

5)        L.E.D (Light Emitting Diode) 5 pieces.

6)        Variable Resistance of 50K ohms

7)        P.C.B (Printed Circuit Board)

This circuit uses the inbuilt comparator of 555.LDR is a special type of resistance whose value depends on the brightness of light which is falling on it. When light falls on the LDR then its resistance decreases which results in increases the voltage at pin2 comparator compares between the input voltage from pin2 and 1/3rd of the power supply voltage. When input falls below 1/3rd then output is set high otherwise set low. When light falls on LDR its input voltage rises so we get 0 volt at pin 3, besides in poor light we get positive output at pin3 to drive LEDs.

Circuit Diagram : design the circuit using PCB-WIZARD.


PCB:
normal


real world


artwork


unpopulated

NOTE: We can also use LM358 or LM324. These are comparator ICs.
LM358 pin details


Circuit Using LM358




real world

artwork
                                                                                                                                              ~pg

Saturday, February 19, 2011

§ Difference between CPLD and FPGA


FPGAs and CPLDs are both programmable logic. The main distinction between FPGA and CPLD device architectures is that FPGAs are internally based on Look-up tables (LUTs) while CPLDs form the logic functions with sea-of-gates (e.g. sum of products). The most noticeable difference between a large CPLD and a small FPGA is the presence of onchip non-volatile memory in the CPLD. This distinction is rapidly becoming less relevant, as several of the latest FPGA products also offer models with embedded configuration memory.The characteristic of non-volatility makes the CPLD the device of choice in modern digital designs to perform 'boot loader' functions before handing over control to other devices not having this capability. A good example is where a CPLD is used to load configuration data for an FPGA from non-volatile memory.

CPLD :
1.A complex programmable logic device (CPLD) is a programmable logic device with complexity between that of PALs and FPGAs The building block of a CPLD is the macrocell.

2.CPLDs are easy-to-understand AND-OR structure, offer a single-chip solution with fast pin-topin delays, even for wide input functions.

3. Once programmed, the design can be locked and thus made secure.

4.The limited complexity (<500 flip-flops) means that most CPLDs are used for "glue logic" functions.

5.Non-volatile configuration memory. Unlike many FPGAs, an external configuration ROM isn't required, and the CPLD can function immediately on system start-up.

6.For many CPLD devices, routing constrains most logic blocks to have input and output signals
connected to external pins, reducing opportunities for internal state storage and deeply layered logic.

7.CPLDs have several programmable PLDs which are interconnected via a programmable connections at the global interconnection matrix.

8.In the CPLD way of programming several complete logic functions at once on inividual PLDs and then bringing these PLDs together via programmable connections.

FPGA:
1.Field programmable gate array.FPGA is similar to that of larger CPLDs.

2.FPGAs offer much higher complexity, up to 150,000 flip-flops, and their idle power consumption is reasonably low.

3.Since the configuration bitstream must be reloaded every time power is re-applied, design security is an issue, but the benefits and opportunities of dynamic reconfiguration, even in the end-user system, are an important advantage.

4.FPGAs offer more logic flexibility and more sophisticated system features than CPLDs: clock management, on-chip RAM, DSP functions, (multipliers), and even on-chip microprocessors and Multi-Gigabit Transceivers.

5. Use FPGAs for larger and more complex designs.

6. FPGAs typically have range of gates from tens of thousands to several million.

7.FPGAs on the other hand have individual logic blocks - each block can be programmed to implement a logic function such as AND, OR, NOT etc. These blocks are then connected via programmable switches to implement complete logic functions.

8..In the FPGA way of programming individual AND, OR, NOT logic functions and then putting them together to implement a complete logic function.

NOTE:In general CPLDs are good choice for wide combinational logic applications while FPGAs are more suitable for large state machine.(i.e. microprocessor)
                                                                                                                                                 ~pg

§ PCB design at home

Required things --
1. PCB design software - PCB Wizard
2. LASER printer
3. Mag zine paper
4. Ferric chloride
5. Copper Platted PCB
6. Hand Gloves
7. Electric iron
8. Hand drill
9. Cello Tape
10.Plastic tub
11.Small Hacksaw
12.Scale,pencil,scrubber..etc.



Step 1: Design your circuit in PCB Wizard software which will automatically design your PCB or you can design your PCB manually.


layout

real world

Step 2:Print the layout on magazine paper using LASER printer.
LASER printer  (CANON 2900B)
Step3. Cut the desired size of copper platted PCB using hacksaw and after cutting wash this piece. 


Step4.Put the paper in opposite direction on the copper platted PCB and tape it.




Step5.Switch on the iron set it in high HOT mode and Iron the PCB with  uniformly presser by hand about 10 min.This is very important step; if you don't do this step properly and with patience your circuit tracks get braked.(in step 7)



Step6. When the impression of the circuit looking outside the paper (as shown in figure below) stop doing iron and dip it into the hot water carefully and wait for 5 min.; don't touch PCB directly because it's too hot.


Step 7: Now keep out the PCB from water and slowly remove the paper from it. Masking of PCB is completed.



Step8: After masking it’s time for etching. For etching process etching solution is required. We can use easily available  ferric chloride. For safety use hand gloves. Take a plastic tub only not metallic otherwise the etching solution makes reaction with metal which can be dangerous for you.






Step9: Add 4 to 6 spoon of Ferric Chloride powder in the water. The ratio of water and FeCl3 is not specific. If water is more then we have to add more FeCl3 and if water is low then low amount of FeCl3  required. One thing is remember that the water is enough for the PCB to dip completely in it. The amount of FeCl3  affect the reaction time of etching; if it is more then etching is done in less time and vice-versa. After mixing water and FeCl3 dip the PCB inside the tub and vibrate tub continuously (if u want fast etching) or after every min.



                                          


Step10: When all the copper (exposed) area vanishes then put the PCB out from the tub.Etching is done.Wash this PCB using scrubber.








Step11: Now our PCB is ready to drill. For drilling you can use small hand drill. Drill the holes.




Step12.Now the final step is to paste the components and soldered them.The final product is just looks like this.


                                                                                                                                 ~ pratyush

PID Controlled Self balancing Robot using ESP8266 and MPU6050

This ROBOT is made using ESP8266 Node MCU and MPU6050 accelerometer. Motor used here is normal gear motor of 150 rpm with TB6612FNG motor dr...