2009 ~ MY Thoughts & Learnings

Thursday, December 24, 2009

Video Courses in Math, Science, and Engineering

While searching on the net i found these extremely helpful link to the content rich websites in form of open course ware.

There are many more... be tuned for more links

Wednesday, December 9, 2009

I am Back

Finally my exams are over and now I AM BACK to this blogging words and once again continue on the journey of addressing whatever we feel or believe to the people out there and the roaring world calling for our attention.

I hope that visitors visiting this blog even once would stick on to it like friends and be ready to speak whatever comes to the mind.In this process we sometimes make friends or perhaps may strike with your own alter ego who knows!!!.


I will be posting more on programming etc but besides this it is important that we become better as human being and realize that we have born in human form to do something!!!


SO BYE VISITORS AND HAVE A GOOD DAY

Uncivilised debate in the indian parliament


Uncivilized debate in the Indian parliament has increased in the past few weeks.This has certainly given an option for the world to deride.Parliament is always attributed with a place where scholars and more elite people of the country sit together to discuss on the problems of the country.Question hour has turned into an hour full of accusations,clash & antagonized behavior disrupting the garima of parliament.


Liberhan report took seventeen long years in scrutinizing the case and in my opinion has been a result of prejudice & conjecture work of the members of the committee.All of the above are my personal opinion but i do believe that many of you reading this would also abide by my looking at all this happening around us.

Referring to the pic above it is essential that some sort of cleaning work is also required inside the parliament for making our country a better place to live in.


Start Talking and be a part of Country

Friday, August 21, 2009

First Page


Hi Visitors,

Besides all tech stuff in this blog i thought that I should have a section for Myself.
This is where i want to write few diary pages filled with my life experiences,any nostalgic dream,or my opinion on a issue which is effecting my country INDIA progress and it's prosperity.

I found that this could be a place where i can interact with the world as a Friend and try to share my feelings and viewpoints and attitude towards life.

To make this section really happening i would also like you to participate through your valuable comments and place your viewpoint too so that maybe we can all learn some Psalm of Life ... morals which make us a better human being.




I found this very interesting widget which would bring me closer to the visitors :





Please feel free to ask or give suggestions.I am always anxiously waiting for them.

Blog Designing


Ever heard of BlogDesigning ?? yes or no...

I don't know about you but i have not such term formally in my life and i have termed it on my own.This post is for you if you are also into blogging and are fed up of the old traditional style Blog with a dull look which no one wants to be see....

I have tried to make lots of changes in this blog to make it appealing to the visitors.

For example
  • Removed the blogspot bar which comes on the top
  • Added a Favicon you can see the dancing penguin
  • Embedded swf files & many cool animated gifs
  • Can you see the Tabbed Menu for your easy navigation to key sections of the blog.
  • & many more
If you want to do anything out of these and make your blog good as well then keep visiting this blog or in comments give your specific requirement & I will post How to of that specific problem in my next post.

Thursday, August 13, 2009

Timer,Usart,Interrupt Basic Steps

While coding for timers Usart etc there are some steps that are always rather generally taken in order to initialize them.

I have tried to just summarize these basic steps for the beginner which they can adopt while writing code for AVR (i use ATmega 8)

Timer

1. Set the prescalar TCCR0 (example using timer0)
2. Enable the timer interrupt TIMSK timer mask register
3. Enable global interrupts
4. Calculate how often OVF interrupt is thrown as timer OVF is periodic in nature


Usart

INIT

1. Set the baud rate register UBRR is 16 bit
2. Enable Receiver and Transmitter UCSRB also enable the RXCIE or TXCIE or both if interrupts are required.
3. Set frame format for assynchronous communication UCSRC.
that is if you are using parity bits or not,which form of start & stop bit are you trying to incorporate


Transmit
1. UCSRA&(1<<UDRE). If done than store the data to be transmitted in the UDR(usart data register).

Receive
1. Check if receive is complete if yes then store the data from the UDR to any variable

further if using the interrupts related to usart events then make sure you enable the global interrupt by SEI();


Disabling the interrupt before atomic statements.

1. Method is to store the status or condition of the MCU by saving the SREG into any 8 bit variable
2. Use _CLI() to clear global interrupt enable bit
3. Restore previous state form variable used in 1.


PWM hardware based

1. Initialize all the timer in the desired pwm mode and set whether you want inverting or non-inverting pwm.
2. Set the prescalar in TCCR1B.wgm13=0 means normal mode.That is timer would start then OVF and then restart from BOTTOM.
3. Set OCR1A/B a 16 bit register
4. Duty cycle is dependent only on OCR values




Some AVR uc related stuff

Hi,

I apologies for not writing blog for few days because of some tight schedule i was having at my college.But Krishna Janam Ashtami gave me some time to make another post.

1. The Input Capture unit is easy to use in normal mode(WGM13=0).However,observe that the maximum interval between the external events must not exceed the resolution of the counter.

Things one can do to increase the resolution :

If the interval between the events is too long,the timer overflow(inc a software counter/any register) or prescalar must be used to extend the resolution of the capture unit.

2. Constants can also be stored in the program memory as they need not to be reprogrammed or changed too often.

How to do that?

#include "avr/pgmspace.h"

const char table[480] PROGMEM ={} also calculate the amount of memory it will eat/consume.

There should be enough memory left for APM(Application Program Memory) & BPM(Bootloader program memory) in the whole progrqam memory map

3. Two stage pipeline in AVR -

Any instruction you give to the micro-controller undergoes following routine of FDE :

Fetch -----Register ---------Decode----Register --------Execute

It appears as if each instruction is taking lesser clock cycle to execute


4. Why two sets of registers in AVR ATmega8 (in 32 General purpose register ):

Explaination :

For example if i have a instruction like :

ldi r6,$3f

$3f is 8 bits,ldi consumes let say 4 bits.then i am left with only four bits which can be used to represent 16 registers.therefore,16-31 are separate and 16 instructions including ldi are possible only with these(16-31)

Friday, July 24, 2009

Counter using atmega 8

Enjoyed previous videos???
I programmed atmega8 along with my friend divya alok (class mate) to display numbers (0-9) on a 7 Segment Led.

This is also based on simple I/O pin control




I Hope that you liked it.
Good Day

LED Flashing

This video shows LED Flashing and blinking to generate beautiful patterns.The kit you see in the video is the Development & Learning Kit made by Gadre sir.He is extremely qualified teacher and fortunately he is a professor in my college NSIT.I along with a friend programmed this kit to display patterns.It is extremely simple programming of setting I/O pins on or off.



5 Volt DC Supply

Hi,
watch the following video of a 5 Volt Power Supply i made along with my friend.
enjoy,




To know how this circuit works visit


http://harshtripathi.blogspot.com/2009/06/dc-power-supply-5-volts-imax-1a.html

My First Website using JAVA J2EE & Javascript

I have made a website using jsp & servlets.This was built by me only for educational purpose i.e Learning By Doing process.




Features include :

1. JavaScript for Client Side Validations.
  • This makes filling long & tedious looking forms to be filled in seconds.As you can see in the video below, using JavaScripts has made Registration & Login page page more User-friendly
  • I have used it to catch some events such as onblur, onfocus etc thrown by the form elements.
2. Ajax
  • Ajax makes everything so easy for the client/visitor.It communicates with the server in the background makes available all the data required either from a file or database and makes it available to the user.This all happens without refreshing or loading the page!!!
3. Jsp & Servlets
  • This is the backbone of whole project.These are the server pages which listen to the request from the client(actually web-browser) and accordingly is generating a response
  • For example - when the user clicks submit on Login page.It is the server page JSP that communicates to the database using an underlying bean ( a java class file).If the user is found then a session is created & attributes are set.Finally user is again moved to the main page.
4. CSS or style tag
  • These are used extensively to apply a desired design format on the entire JSP page.
  • Best part - In order to change the style/appearance of elements in a page you have two options - i) You would have to place standard html tags in each of the required places throughout the page OR ii)The better way is to set the style for the element types in one place which would effect the whole page.Futher one can have external css which makes the style format once set to be used in many pages.
5. File data Handling
  • For Post file data handling has been done which can be used to post data on the website.
6. Jsp & Html
  • This was the Best feature incorporated by SUN professionals which makes java web development extremely simple.
  • Feature is - you can mix up HTML & JAVA Scriptlets any number of times without hesitation.
  • The data you see on the home page which i call posts are actually dynamically read from the disk and presented to you in the form of a table (with border = 0)
7. Flash
  • I may not be a pro in using Macromedia flash.But i managed to make the text effects you see in the banner on the top.I have embedded these swf(s) in my blog too.They look COOL!!! Isn't it
8. Session Handling
  • It is very important to keep track information about the visitor/user visiting your blog.
  • For example - I don't wan't a person to be able to post data to my website unless and until he has registered himself to my website and has Loggined into the website.This is integral for admin management of the website.
  • can be done by session handling,cookies,url rewriting,hidden text field.I have used first two i.e Session creation & writing cookies to the client.
If you have any problems/suggestions please let me know
harshtripathi.blogspot.com

Sunday, July 19, 2009



King of music .... i was shocked at hearing the death of a great artist.I never believe that he died of pill overdose(or something like that).

check the following link giving some insights into his life.

Michael Jackson’s life cut shockingly short

He would always live in heart of his fans

Q-4 What is a "MIME Type"?




MIME (Multipurpose Internet Mail Extensions) is used to extend the format of the internet emails to send non-textual,Non-ASCII data such as pdf,image etc through a E-mail.MIME Type- in the response header we have Content-Type: text/html this is called MIME type as it describes the type of data that is sent as a response to the Client.This Content-Type can have only those formats which are also in Accept field in the request header.

Q-3 Get & Post what are they?

Both are the methods of the HTTP protocol.Whenever client wants to access a resource from the server the web browser generates a HTTP Request.This request can either be in get or post method.Get is used to pass limited and insensitive/non-personal/insecure data to the server.Data sent through this is visibleto the client.Whereas Post is much more powerful technique where large amount of data can be sent & still client is unable to see that data.Post is generally used for username,password,credit card number etc which are personal and sensitive data that needs to be hidden.

GET EXAMPLE

http://www.google.co.in/search?hl=en&q=java&meta=&aq=f&oq

http:// is the protocol used.

http://www.google.co.in is the host/server/container URL.

/search is the path to the resource on the server

?hl=en&q=java&meta=&aq=f&oq= after the ? are the parameters sent to the server in this GET Request.For example - hl=en means that language is English. & is used to separate two parameters. Along with this Request header is also sent which has details such as User-Agent,Accept,Accept-Language,Keep-Alive etc.Giving General information about the client.

Whereas in post method -
1. Is much more Powerful than get method
2. Any amount of data can be sent.
3. Client is not able to see the data sent to the request thus protecting the personal/secured data from being viewed by anybody.

Remember : doGet() is the default method of the servlet and is automatically executed when the servlet/JSP page is run for the first time.


Q-2 You need to make your Website scalable.What is meant by Scalable?

If a Website is scalable it means that even if Load increases(large no. of client are trying to access the server) it does not substantially effect the performance & speed of request-response routine.

One of the frequently used technique for this purpose is Caching.

Caching Basics

Retrieving data from the database is time-expensive whereas doing the same from a File/Memory(HashMap) is fast.Therefore it helps the server to deliver the resource quickly.

Caching is done under following conditions -

1. For the data which is frequently demanded from the clients
2. Admin of the website is making changes in the database.Therefore cached data must also be updated.
3. Caching is done for the first request.next time a client tries to access the data, it is fetched from the cached file and not from the database

Friday, July 17, 2009

Interview Questions ( One question per Post )

From now on i will be posting some very basic questions(one question per post) when it comes to Website Development or those asked in an Interview.I thought that this would be the best way to learn things quickly for a newbie.

I have given the answer as per my understanding & would not be responsible for any harm to you with this inf.

Enjoy!!!!...............................................

Q-1 What is HTTP Protocol so much talked about?

Hypertext Transfer Protocol is a Stateless protocol i.e there is no information about which client is making the request.A request is sent by the Client to the Server & Server looks for the resource through buissness logic/Data Model.Then it sends the data back as a response to the Client.It runs on top of TCP/IP protocols and uses basic request-response routine for srving the client.TCP - Transfer Control Protocol is responsible to ensure that file sent from one network node to another ends up as a complete file.Whereas IP - Internet Protocol has the responsibility for routingthe packet of data for reaching it's proper destination.

Monday, July 13, 2009

JAVA JMF IMAGE CAMERA

JMF
i have introduced with it's fundamentals in my previous .Here is the java src code of a program which captures images from the camera and process a bit before saving to the disk.
Enjoy,
Capture using JMF


If any problem in understanding the code you can mail me at harshblog.query@gmail.com i will reply asap.

ROBOTICS BOOK DOWNLOAD 150+


ROBOTICS

Ever found interest in building your own ROBOT the visit the following link.

Download this text file containing to 150+ books

I am in no way hosting links given in the text file.If it violates any norms please inform me.I don't have much inf with copyrights.Thanks for your co-operation

Saturday, July 11, 2009

INTRO TO TECHNOLOGIES FOR DEVELOPER

FOR JMF look into one of my previous post.

HI,


JSP/Servlets

It's easy on JAVA to built websites business or data logic.with JSP/Servlets built server pages to handle the client request and process as per the requirement.Yes i do agree that php,ruby,python developers would now start roaring at me to say that JAVA lacks speed both in development and processing.

But the buisness logic which Java can provide is unmatchable(as i think).If you are a beginner then first study about Servlets , as once you get acquainted with it you would find JSP very easy.

JSP offers

1.
HTML embed for Static design and Scriptlets(<% %>) for JAVA based code.

2. Concept of Implicit Object has greatly reduce the workload while working with JSP.
Ex- response,request,out etc.You can directly type <% out.println("hello") %>

3. Further JAVA has highly rich TAG Library JSTL(Java Standard Tag Library).

4. You can also add JavaScript functionality in your JSP page. JavaScript is used to enhance the working and appearance of your web pages by making it more dyanamic.It is extensively used for client side validations.The only limitation does it offer is it's inability to communicate with the server.But with Ajax & JavaScript combined this limitation is also overcomed.

To run these pages you require a Server(container).Among the most widely used are NetBeans GlassFish,Apache Tomcat etc.

Most Importantly : In Java it is very easy to built a three-tier logic.


AJAX

-> AJAX stands for Asynchronous JavaScript And XML.
-> AJAX is a type of programming made popular in 2005 by Google (with GoogleSuggest).
-> AJAX is not a new programming language, but a new way to use existing standards.
-> With AJAX you can create better, faster, and more user-friendly web applications.
-> AJAX is based on JavaScript and HTTP requests.
-> With AJAX, JavaScript can communicate directly with the server, using the JavaScript XMLHttpRequest object. With this object, JavaScript can trade data with a web server, without reloading the page.

AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages.

-> The AJAX technique makes Internet applications smaller, faster and more user-friendly.
-> AJAX is a browser technology independent of web server software.
AJAX is Based on Web Standards

AJAX is based on the following web standards:

1.
JavaScript
2. XML
3. HTML
4. CSS


XMLHttpRequest:

This class is for Firefox, Opera, Safari.
Var obj=new XMLHttpRequest()

ActiveXObject:

This class is for IE.
Var obj=new ActiveXObject("Msxml2.XMLHTTP") // for 6.0+
Var obj=new ActiveXObject("Microsoft.XMLHTTP") // for 5.0+

Properties:

1. onreadystatechange
2. readyState
3. responseText

onreadystatechange
The onreadystatechange property stores your function that will process the response from a server.

xmlHttp.onreadystatechange=function()
{
// We are going to write some code here
}

readyState

The readyState property holds the status of the server's response. Each time the readyState changes, the onreadystatechange function will be executed.


State Description
0 The request is not initialized
1 The request has been set up
2 The request has been sent
3 The request is in process
4 The request is complete


responseText
The data sent back from the server can be retrieved with the responseText property.

xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState==4)
{
document.myForm.time.value=xmlHttp.responseText;
}
}

The web standards used in AJAX are well defined, and supported by all major browsers. AJAX applications are browser and platform independent.

Remember : AJAX is not an application it is a Technique which make the appearence of the pages to look more Dyanamic and User Friendly.


3. Python

It helps in very fast development of software.It is also object oriented and introduces special data types like tulips,list & dictionary.Every program can also be thought as modules and these can also imported easily.
like

>>import Image

It also has control statements like if-else & loop statements for while statement with slight difference in syntax

>>for x in range(0,3):
... print x
...
>>0
1
2
>>x = 10
>>if(x<12):>>import Image
>>i = Image.open('c:\line.bmp')
>>i.show()

for making functions
>>def sum(x,y):
... return (x+y)
...
>>sum(4,5)
9

for writing into files
>>harsh = open("hello","w")
>>harsh.write("HARSH TRIPATHI BLOGSPOT IS BEST")

keywords : jsp,servlets,jfx,struts,jsf,hibernate,AJAX,JMF,python,vhdl,ruby,php

SOME SAMPLE JAVA SOURCE CODES

1. NOTEPAD beta - it is very basic program for the beginners to make their own notepad.I have BUILT this just for educational purpose to understand basic javax.swing.* and File I/O

2. Database - This is also for educational purpose showing use of JDBC to connect to a MS Access database(*.mdb) and perform some basic operation.

3. Using JMF to capture image from a usb camera and save it to disk after converting into jpeg.

If you are interested in any of the above

Send me mail at harshblog.query@gmail.com i will reply asap

I have made many other cool apps .... KEEP VISITING MY BLOG FOR THEM

JMF BASICS

hi,

Ever wanted to work with multimedia files,capturing data from the camera and processing encoding as per the requirement.Yes i know this looks quite interesting let's get started with basics :

Java™ Media Framework (JMF)

1. Provides a unified architecture and mes-saging protocol for managing the acquisition, processing, and delivery of time-based media data.

2. JMF is designed to support most standard media content types, such as AIFF, AU, AVI, GSM, MIDI, MPEG, QuickTime, RMF, and WAV.

I have tried to divide things in components so that it is easier to understand

Media Streams -
  • Can be media from file,network,camera.media format
  • Some have media stream containg multiple channel of data called tracks.hence Demultiplexing is required to get the data.such is called complex media stream.

To locate the source-

1. File protocol is used for files as sources
2. HTTP protocol for network
3. MediaLocator to locate media when URL can't be used

Media Streams Types:

1. Pull type - initiated and controlled by client - file and http protocol
2. Push type - from the server side initiated like RTP,SGI MediaBase used for VOD(video on demand)

CLASSES FOR SOURCES

1. Pull Data Source - Types of pull data sources:
  • PullDataSource
  • PullBufferDataSource, which uses a Buffer object as its unit of transfer.
2. Push Data Source - Types of push data sources:
  • PushDataSource
  • PushBufferDataSource, which uses a Buffer object as its unit of transfer Specialty DataSources

JMF defines two types of specialty data sources

1. Cloneable data sources

2. Merging data sources.


1. Cloneable Data Source -
  • Can be used to create clones of either a pull or push DataSource.
  • To create a Cloneable DataSource, you have to call the Manager cloneableDataSource method and pass in the DataSource you want to clone. Once a DataSource has been passed to create CloneableData-Source, you should only interact with the cloneable
  • DataSource and its clones
  1. the original DataSource should no longer be used directly.Cloneable data sources implement the SourceCloneable interface, which defines one method, createClone. By calling createClone, you can create any number of clones of the DataSource that was used to construct the Cloneable DataSource.
  2. The clones can be controlled through the cloneable DataSource used to create them.
  3. The clones don’t necessarily have the same properties as the cloneable data source used to create them or the original DataSource. For example, a cloneable data source created for a capture device might function as a master data source for its clones—in this case, unless the cloneable data source is used, the clones won’t produce any data. If you hook up both the cloneable data source and one or more clones, the clones will produce data at the same rate as the master.

2.MergingDataSource -
  • Can be used to combine the SourceStreams from several DataSources into a single DataSource.
  • This enables a set of Data-Sources to be managed from a single point of control—when connect, disconnect, start, or stop is called on the MergingDataSource, the method calls are made to the merged DataSources.To construct a MergingDataSource, you call the Manager createMerging-DataSource method and pass in an array that contains the data sources you want to merge. To be merged, all of the DataSources must be of the Understanding JMF 19 same type.For example, you cannot merge a PullDataSource and a Push-DataSource. The duration of the merged DataSource is the maximum of the merged DataSource objects’ durations.

Latency - it is the time lag between actual start of the video after clicking start button.when synchronizing multiple streams then it must check for latency of each stream.
  • For example if i want to save the video captured by a camera to a file
1. Audio and video tracks are captured
2. Each individual tracks would be encoded and then multiplexed into a single media stream.
3. Multiplexed data is saved to file.

Codecs
  • A codec performs media-data compression and decompression.
  • When a track is encoded, it is converted to a compressed format suitable for storage or transmission; when it is decoded it is converted to a non-compressed (raw) format suitable for presentation.effect filters are applied to uncompressed (raw) data if needed.

Renderer -
  • A renderer is an abstraction of a presentation device. For audio, the presentation device is typically the computer’s hardware audio card that out-puts sound to the speakers. For video, the presentation device is typically the computer monitor.

Compositing -
  • Certain specialized devices support compositing. Compositing time-based media is the process of combining multiple tracks of data onto a single presentation medium.
  • For example, overlaying text on a video presentation is one common form of compositing. Compositing can be done in either hardware or software. A device that performs compositing can be abstracted as a renderer that can receive multiple tracks of input data
General Path of Data Acquisition

Capture Device(camera) --> Data Source(video tape i.e all streams multiplexed) --> player --->Destination(HDD or Output)

TIMING IS VERY IMPORTANT

WE use Time Class object which implements Clock having functions for basic Synchronising and presentation of streams. Clock derives it's timing from the Time-base(system clock) after using a prescaler.

To keep track of the current media time, a Clock uses:

• The time-base start time that it reports when thepresentation begins.
• The Media start-time—the position in the media stream where presentation begins.
• The Playback rate—how fast the Clock is running in relation to its TimeBase. The rate is a scale factor that is applied to the TimeBase.
Foexample, a rate of 1.0 represents the normal playback rate for the media stream, while a rate of 2.0 indicates that the presentation will run at twice the normal rate. A negative rate indicates that the Clock irunning in the opposite direction from its TimeBase—for example, a negative rate might be used to play a media stream backward.


The JMF API consists mainly of interfaces that define the behavior and interaction of objects used to capture, process, and present time-based media. Implementations of these interfaces operate within the structure of the framework. By using intermediary objects called managers, JMF makes it easy to integrate new implementations of key interfaces that can be used seamlessly with existing classes.

JMF uses four managers:
  • Manager—handles the construction of Players, Processors, DataSources, and DataSinks. This level of indirection allows new implementations to be integrated seamlessly with JMF.
  • PackageManager—maintains a registry of packages that contain JMF classes, such as custom Players, Processors, DataSources, and DataSinks.
  • CaptureDeviceManager—maintains a registry of available capture devices.
  • PlugInManager—maintains a registry of available JMF plug-in processing components, such as Multiplexers, Demultiplexers, Codecs, Effects, and Renderers.

HOW TO USE MANAGERS
To write programs based on JMF, you’ll need to use the Manager create methods to construct the Players, Processors, DataSources, and DataSinks for your application. If you’re capturing media data from an input device, you’ll use the CaptureDeviceManager to find out what devices are available and access information about them. If you’re interested in controlling what processing is performed on the data, you might also query the Plug-InManager to determine what plug-ins have been registered.

Event MODEL

  • Whenever a JMF object needs to report on the current conditions, it posts a MediaEvent.
  • MediaEvent is subclassed to identify many particular types of events. These objects follow the established Java Beans patterns for events.For each type of JMF object that can post MediaEvents, JMF defines a corresponding listener interface.addListner are used to handle posted MediaEvent.
Controller objects (such as Players and Processors) and certain Control objects such as GainControl post media events.RTPSessionManager objects post RTP EVENTS

SOME BASIC PLAYER CONTROLS

1. CachingControl - enables download progress to be monitored and dis-played. If a Player or Processor can report its download progress, it implements this interface so that a progress bar can be displayed to the user.

2. GainControl enables audio volume adjustments such as setting the level and muting the output of a Player or Processor. It also supports a listener mechanism for volume changes.

3. FramePositioningControl and FrameGrabbingControl - export frame-based capabilities for Players and Processors. FramePositioningControl enables precise frame positioning within a Player or Processor object’s media stream. FrameGrabbingControl provides a mechanism for grabbing a still video frame from the video stream. The FrameGrabbingControl can also be supported at the Renderer level.

Names of few frewuently used controls : BufferControl,PortControl,MonitorControl,FormatControl,TrackControlcontrol methods -getControlComponent returns awt default of a control componentPlayer methods - getVisualComponent,getCOntrolPanelComponent

BYE HAVE A GOOD DAY

Monday, June 29, 2009

DC POWER SUPPLY 5 VOLTS Imax = 1A Ihold=0.6A FOLDBACK LIMITING with Circuit Schematic made using Proteus

I made a DC POWER Supply 5 volts in my second year of college along with my friend divya alok(class mate).Below is the schematic made in proteus:




Power supplies are required everywhere, from industries to every household whether in urban areas or villages. They form the root of every digital as well as analog electronic item. Here, I demonstrate the construction of a conventional power supply using electronic components like diodes, BJTs FETs etc. The approach is easy to follow and can be used in many other applications. I have chosen +5V as our output voltage since majority of the circuits need such a source. Also to prevent any circuit damage like burning of components, I provided additional protection techniques which limit the output current.


The fundamental source of DC power is a battery or an electrochemical cell. A battery is basically a container carrying chemical reagents which undergo electrochemical reactions. These reactions provide a potential difference across its terminals; this potential difference is harnessed in cars, radios, inverters etc. Although batteries are highly useful devices they suffer from a number of problems. Due to prolonged usage the concentration of the chemical species reduces and the potential difference across their terminals decreases. There are further more constraints which undermines their practical use; their poor performance characteristics, low current ratings, fast discharge rates and also the fact that they are not economically and ecologically viable source of power (i.e. they are not biodegradable and are expensive to manufacture). Thus there's a need of an economically feasible and eco-friendly power source which can satisfy the needs of the industry as well as domestic demands and is easily available.


As an alternative to batteries, we use a source of 220 V 50 Hz from which we can fabricate a source of DC 5V. This source is easily available in India in every urban and sub urban household and in every industry. To get 5V out of AC 220V, the first step would be to step down the AC voltage to a lower level around 12V and then use a Bridge Rectifier to get a waveform which exists only in the positive direction. After this a peak filter i.e. a capacitor of sufficient capacitance will help in achieving the DC voltage.


The disadvantages of this circuit far outweigh its advantages. The voltage is constant for open circuit condition or light loads only. Also the circuit seems relatively simple and easy to fabricate. The disadvantages are that the output waveform has significant amount of ripple. The output voltage drops at heavier loads, i.e., when higher current needs to be drawn from the source which shows poor voltage regulation. To obtain a regulated supply from which we can obtain desired amount of current. Fortunately it is easy to construct stable DC supplies using negative feedback to compare DC output to a stable voltage reference. Such regulated supplies are in universal use, and can be simply constructed with integrated circuit voltage regulator chips, requiring only a source of unregulated DC input (from a transformer-rectifier-capacitor or a battery or some other source of DC input) and a few other components like diodes, BJT's and FET's.


Similar techniques can be used to make voltage regulators with discrete components, but because of availability of inexpensive high-performance regulator chips, there is advantage to using discrete components in new designs. Voltage regulators get us in the domain of high power dissipation, so we need to use techniques like over-voltage protection, current limiting and fold-back limiting to limit transistor operating temperatures and prevent circuit damage.


Circuit Parameters (objective)
· Output Voltage: 5V
· Maximum Current: 1A
· Fold-back Limiting enabled
· Short Circuit Current: 600mA


The µA723 Regulator: The µA723 regulator is an old voltage regulator designed by Bob Widlar in 1967. It offers flexibility and is easy to use and has good performance. The internal circuitry reveals that it contains a temperature compensated zener voltage reference, differential amplifier, series pass transistor, and current limiting protective circuit. High Current Regulator: The internal pass transistor allows maximum 150mA current, in addition the power dissipation must not exceed 1W at 25°C (less than ambient temperatures). Thus a 5V supply running at 12V input cannot supply more than 140mA. To construct a higher current supply, an external pass transistor must be used. It is easy to add one as a Darlington Pair with the internal pass transistor.


Fold-Back Current Limiting: For a regulator with simple current limiting, maximum transistor dissipation is when the output is shorted to ground. The situation is worse in cases when the dropout voltage is a smaller fraction of the supplied voltage. The brute force solution to this problem is to use massive heat sinks and transistors of higher power ratings and safe operation area. Even so, it isn't a good idea to have high currents flowing inside the circuit since other components may get damaged. The best solutions is fold-back current limiting, a circuit technique that reduces the output current under short circuit or overload conditions.


Band Gap Reference: It involves generation of a voltage with positive temperature coefficient, the same as VBE's negative temperature coefficient so that the resultant voltage has nearly 0 temperature coefficient. If we use a simple current mirror whose transistors operate at different emitter currents. Using Eber's Moll Equation it is proved that output current has positive temperature coefficient. This current is passed through a resistor and VBE is added. So now when total voltage is equal to Silicon Band Gap Reference the circuit shows 0 temperature coefficient. The constant sources from the circuit can be used to provide any constant voltage which is used as a reference in place of zeners.


Negative Feedback: This is a process of feeding the output back to the input to cancel off some part of the input. Although it lowers the amplifier's gain but it improves the output characteristics to a much larger extent. The effects include reduction in distortion and nonlinearity of amplifier's gain function, increment in input impedance and decrease in output impedance. In fact, as more negative feedback is implemented, the resultant amplifier characteristics become less dependent on the open loop gain and more on the feedback network itself.


Load Regulation: It is defined as change in output voltage per unit change in load. A power supply should have very low load regulation so that its output voltage remains constant at any load desired.


Line Regulation: It is defined as change in output voltage with change in supplied unregulated voltage.


Output Impedance: It is defined as the open circuit voltage by the short circuit current. For practical voltage sources it should be as low as possible.


Input Impedance: It is the impedance seen from the input side by the voltage source. For voltage supplies, it should be as high as possible so that less power is dissipated and it provides higher efficiency.

• Fixed voltage regulators 7805, 7905 etc series which are only three terminal devices i.e. output, input & a ground. The end user has got nothing to do extra with these regulators since everything is already made.
• Variable voltage regulators are five terminals devices. In addition to the former cases they have to more terminals, the inverting and non-inverting terminals. As the name suggests these regulators can be used to obtain variable voltages as per our requirement. For example LM723, LM317. Unlike the fixed regulators which have the complete protection circuitry is inside the IC, the voltage regulators like LM723 need it externally.

Thursday, June 25, 2009

Some JAVA books for you to download

Hi,
were you be able to digest part of java in my previous post ? yes well done ... no don't worry .... i have uploaded some books so that you can get a grasp essential oop caoncepts so that in my next posts i can directly jump to some key concepts!!!


Do you have interest in AVR microcontrollers, it's programming and interfacing here is aone of the famous books for you :





------------------------------------------------------------------------------------
In no way i am hosting these files.Please notify me if any rules are violated, i would remove these links immediately.
------------------------------------------------------------------------------------------------

Tuesday, June 23, 2009

Learn Java

New to java and have thirst to know what exactly all about? then you have come to the right place.
In 1991 small group of sun engineers called the 'Green Team' worked hard to come with Java.Since then it has revolutionized the world & has touched almost every aspect of software computing.

Want to built apps with cool GUI that to independent of the underlying OS?.Want to built your own website?.want to build mobile applications?or have interest in networking so that you can communicate with the computers on the network?want to incorporate security features such as cryptography,digital signatures,authentication,authorization,public key infrastructure in your build apps?
......... LIST GOES ON....

JAVA has answer to all these requirements of a developer.

If you know c & c++ then starting to learn JAVA would be easier for you.Java also incorporates the OOP(object oriented programming)concepts and has packages(you folder/directory) where you keep all your classes.Unlike c Java has both a Compiler and an Interpreter.First *.java files are converted into *.class file using javac(java compiler).These class upon execution are first sent to a class loader and then to an interpreter contained in the JVM(Java Virtual Machine).It is upto the JVM to check for any errors or runtime exceptions.After this process is complete you can see your application running.

To begin with a hello world of java----
open notepad or any text editor for that matter and type the following code >

package 1.2 //This is always the first line in any java src file
//import statements can be placed here as per the requirement

class abc //define a class of name abc
{
public static void main(String[] args)
//main function is the place from where the execution of the program commences
//args[] can be used to take inputs from the command line arguments.
{
System.out.println("Welcome to JAVA"); //would print text in " " on the console
}
}//end of class

Save this file as abc.java.As explained above compile this file using javac abc.java in cmd.If no error is shown(which is generally syntax error) then run the class file using java abc.

NOTE : Before you can use javac statement you have to set the path as the bin folder of JDK.
no For example : set path=c:\jdk1.5\bin
Also note that classpath must contain the location where your class file is saved

Here is a video tutorial :


How do you feel after successfully running your first program ---- cool amazing isn't it is a very good feeling if you are newbie to programming.

but hey never think that java can do just that there is whole lot things in the stock beyond your imagination.

Some of the key areas on which i can focus in my next post :
(besides concepts of OOP)

1. Exception Handling

2. Event Handling

3. AWT (Abstract Window toolkit) components for system dependent GUI with heavy-weight components.

4. Multiple Tasking or Multiple Threading

5. TCP/IP socket programming

6. Advanced GUI - swing,Java2D,Java3D

7. Distributed systems on network - RMI , JINI , JavaSpaces , corba, RMI IIOP(RMI + CORBA)

8. Web - Servlets , JSP(scriptlets and JavaBeans)

9. Security - Java Sandbox Security Model,Java Cryptography Extensions(JCE),Java Secure Sockets Extension(JSSE),Java Authentication and Authorization Services(JAAS)

10. Database - JDBC

11. Wireless applications - WAP(Wireless application protocol),Wireless Markup Language,i-mode , J2ME(Java 2 Micro Edition)

12. EJB to implement business logic at the enterprise level.Struts and MVC.

NOTE :
You need to have the following before you can start developing with java :

1. JDK - JAVA DEVELOPMENT KIT - for most of the programming J2SE(Java 2 Standard Edition) will do fine but for EJB etc you have to download J2EE.you can download J2SE from here

2. Any Text Editor - for example TextPad or Notepad

3. Cmd or MS-DOS

for any further genuine query/suggestions you can mail me at harshblog.query@gmail.com

Friday, June 19, 2009

Hi

Blogging.....

Hi,
Get ready to exercise your brain muscles to cerebrate and decode the matrix

I am new to the concept of blogging.This platform would enable me to communicate to large people & encapsulate my feeling and experience in a post.

All of my posts will be based on my personal opinions and experiences.In no way i want to offend or hurt anybody in any manner.I'll appreciate any sort of suggestions & error/correction remarks.This would help me to improve in my future posts and provide useful material for the user visiting my blog.

A journey of a thousand miles must begin with a single step.