Wednesday, 30 December 2015

Python Programming

Collection Of 51 Free eBooks On Python Programming

To use with Raspberry Pi or to program simulation software, here's bringing 51 super helpful and free ebooks on Python programming that can help you become a python pro. Who knows you end up becoming the next big gaming programmer! 




Author: Cody Jackson, 2013
An introduction to computer programming, using the easy, yet powerful, Python programming language. Python, a cross-platform language, lets you work quickly and efficiently, allowing you to concentrate on your work rather than the language.
Author: Brian Heinold
Publisher: Mount St. Mary's University, 2013
Partly a tutorial and partly a reference book. I summarize information in tables and give a lot of short example programs. I also jump right into things and fill in background information as I go, rather than covering the background material first.
Author: Steven Thurlow
Publisher: Wikibooks, 2013
Contents of Beginner's Python Tutorial: Installing Python; Very Simple Programs; Variables, Scripts; Loops, Conditionals; Functions; Tuples, Lists, Dictionaries; for Loop; Classes; Importing Modules; File I/O; Exception Handling.
Author: David Beazley, Brian K. Jones
Publisher: O'Reilly Media, 2013
This cookbook is for experienced Python programmers who want to focus on modern tools and idioms. You'll find complete recipes for more than a dozen topics, covering the core Python language as well as tasks common to a wide variety of applications.
Author: Al Sweigart, 2013
The book teaches complete beginners how to program in the Python programming language. The book features the source code to several ciphers and hacking programs for these ciphers. The programs include the Caesar cipher, transposition cipher, etc.
Author: Nathan Yergler
Publisher: PyCon, 2013
Effective Django development means building applications that are testable, maintainable, and scalable. After reading this book you should have an understanding of how Django's pieces fit together and how to use them to engineer web applications.

Author: Harry Percival
Publisher: O'Reilly Media, 2013
Test-Driven Development with Python focuses on web development, with some coverage of JavaScript. This book uses a concrete example -- the development of a website, from scratch -- to teach the TDD methodology and how it applies to web programming.
Author: Jan Bodnar
Publisher: ZetCode, 2013
PyQt4 is a toolkit for creating GUI applications. It is a blending of Python language and the successful Qt library. This tutorial is suited for beginners and intermediate programmers. You will learn to program non trivial PyQt4 applications.
Author: Hannes Röst, et al.
Publisher: Wikibooks, 2013
This book describes Python, an open-source general-purpose interpreted programming language, available for all Platforms. Python is a high-level, structured programming language that can be used for a wide variety of programming tasks.
Author: EuroScipy tutorial team, 2012
Teaching material on the scientific Python ecosystem, a quick introduction to central tools and techniques. The different chapters each correspond to a 1 to 2 hours course with increasing level of expertise, from beginner to expert.
Author: John C. Lusth
Publisher: The University of Alabama, 2012
Contents: Starting Out; Literals; Combining Literals; Precedence and Associativity; Variables; Assignment; Conditionals; Functions; Python Programs and Using Files; Input and Output; More about Functions; Scope; Loops; Lists; Recursion; etc.
Author: Lennart Regebro
Publisher: Colliberty 2011
Porting to Python 3 doesn't have to be daunting. This book guides you through the process of porting your Python 2 code to Python 3. Using plenty of code examples is takes you cross the hurdles and shows you the new Python features.
Author: Kevin Sheppard, 2012
Python is a widely used general purpose programming language, which happens to be well suited to Econometrics and other more general purpose data analysis tasks. These notes provide an introduction to Python for a beginning programmer.
Author: Hans Petter Langtangen
Publisher: Springer, 2009
With a primary focus on examples and applications of relevance to computational scientists, this useful book shows computational scientists how to develop tailored, flexible, and human-efficient working environments built from small scripts.
Author: W.J. Turkel, A. Crymble, A. MacEachern
Publisher: NiCHE, 2010
This book is a tutorial-style introduction to programming in Python for practicing historians (and other humanists). We assume that you're starting out with no prior programming experience and only a basic understanding of computers.
Author: Jan Erik Solem
Publisher: O'Reilly Media, 2012
The idea behind this book is to give an easily accessible entry point to hands-on computer vision with enough understanding of the underlying theory and algorithms to be a foundation for students, researchers and enthusiasts.
Author: Rahul Verma, Chetan Giridhar
Publisher: Testing Perspective, 2011
This book is about learning design patterns with Python language. If you are new to design patterns, this text provides the first building blocks. If you are interested in design of test automation frameworks, this book will be very useful.
Author: Al Sweigart, 2012
This is a programming book that covers the Pygame game library for the Python programming language. Each chapter gives you the complete source code for a new game and teaches the important programming concepts from these examples.
Author: Richard L. Halterman
Publisher: Southern Adventist University, 2011
The focus is on introducing programming techniques and developing good habits. Our approach avoids some more esoteric features of Python and concentrates on the programming basics that transfer directly to other imperative programming languages.
Author: Jeffrey Elkner, Allen B. Downey, Chris Meyers
Publisher: Green Tea Press, 2012
This book is an introduction to computer science using the Python programming language. It covers the basics of programming, including variables, functions, control flow, program debugging. Later chapters cover basic algorithms and data structures.
Author: Steven Bird, Ewan Klein, Edward Loper
Publisher: O'Reilly Media, 2009
This book offers a highly accessible introduction to natural language processing, the field that supports a variety of language technologies. With it, you'll learn how to write Python programs that work with large collections of unstructured text.
Author: Zed A. Shaw, 2011
This is a very beginner book for people who want to learn to code. If you can already code then the book will probably drive you insane. It's intended for people who have no coding chops to build up their skills before starting a more detailed book.
Author: Allen B. Downey
Publisher: Green Tea Press, 2011
Think Stats is an introduction to Probability and Statistics for Python programmers. This new book emphasizes simple techniques you can use to explore real data sets and answer interesting statistical questions. Basic skills in Python are assumed.
Author: Charles Severance
Publisher: PythonLearn, 2010
The goal of this book is to provide an Informatics-oriented introduction to programming. The primary difference between a computer science approach and the Informatics approach taken in this book is a greater focus on using Python.
Author: Jody Scott Ginther
Publisher: toonzcat.com, 2010
This book is meant to help you begin learning the basics of Python programming version 3 or later. It is a brief introduction to Python. The author attempts to be as brief as possible to get the new programmer into programming as fast as possible.
Author: Jeffrey Elkner, at al., 2010
The goal of this book is twofold: to teach you how to program in Python; and to teach you to think like a computer scientist. This way of thinking combines some of the best features of mathematics, engineering, and natural science.
Author: Mark Guzdial
Publisher: Georgia Institute of Technology, 2002
Guzdial introduces programming as a way of creating and manipulating media -- a context familiar to today's readers. Starts readers with actual programming early on. Puts programming in a relevant context (Computing for Communications).
Author: Jason R Briggs
Publisher: Lulu.com, 2007
Snake Wrangling for Kids is a printable electronic book, for children 8 years and older, who would like to learn computer programming. It covers the very basics of programming, and uses the Python 3 programming language to teach the concepts.
Author: A. Holovaty, J. Kaplan-Moss
Publisher: Apress, 2007
Django is the Python–based equivalent to the Ruby on Rails web development framework. The authors show you how they use this framework to create award–winning web sites. This is the first edition of the Django Book which covers 0.96 version.
Author: Katja Schuerer, Catherine Letondal
Publisher: Pasteur Institute, 2008
This course is designed for biologists who already have some programming knowledge in other languages. The focus is on biological examples that are used throughout the course, as well as the suggested exercises drawn from the field of biology.
Author: Dave Kuhlman, 2003
This document contains discussions of several advanced topics that are of interest to Python programmers: regular expressions, unit tests, extending and embedding Python, parsing, GUI applications, guidance on packages and modules.
Author: Dave Kuhlman, 2008
This document is a syllabus for a first course in Python programming. It contains an introduction to the Python language, instruction in the important features of the language, and practical exercises in the use of those features.
Author: Chris Meyers, 2004
This collection is a presentation of several small Python programs. They are aimed at intermediate programmers - people who have studied Python and are fairly comfortable with basic recursion and object oriented techniques.
Author: Fredrik Lundh, Matthew Ellis
Publisher: PythonWare, 2002
The Python Imaging Library adds image processing capabilities to your Python interpreter. This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities.
Publisher: Python Software Foundation, 2008
This tutorial introduces the reader informally to the basic concepts of the Python language and system. It introduces many of Python's most noteworthy features, and will give you a good idea of the language's flavor and style.
Author: Richard Gruet, 2007
This reference collections cover references for python version 1.52 to version 2.7. It covers invocation options, environment variables, lexical entities, basic types and their operations, advanced types, statements, iterators, generators, descriptors, decorators, built-in functions, built-in exceptions, and more.

Author: Steven F. Lott, 2008
The book will help you build basic programming skills. It is organized in a way that builds up the language in layers from simple concepts to more advanced features. Programming exercises are provided to encourage further exploration of each layer.
Author: Guido Van Rossum
Publisher: Network Theory Ltd., 2003
The definitive language reference for Python. It describes the syntax of Python and its built-in datatypes. It covers advanced topics, and is suitable for readers who are familiar with the details and rules of the Python and its object system.
Author: Bruno R. Preiss, 2004
The primary goal of this book is to promote object-oriented design using Python and to illustrate the use of the emerging object-oriented design patterns. The book shows how these patterns are used to create good software designs.
Author: Allen Downey
Publisher: Green Tea Press, 2008
A concise introduction to software design using Python. Intended for people with no programming experience, this book starts with the most basic concepts and gradually adds new material. The goal is to teach you to think like a computer scientist.
Author: Alan Gauld
Publisher: Addison-Wesley Professional, 2000
Book for hobbyists, self-starters, and all who want to learn the art of computer programming in Python. Data types and variables, debugging, and namespaces are covered. Also includes sample applications that illustrate ideas and techniques in action.
Author: K. Schuerer, et al.
Publisher: Pasteur Institute, 2008
This text teaches programming concepts to biologists. It is aimed at people who are not professional computer scientists, but who need a better control of computers for their own research. This course is part of a course in informatics for biology.
Author: David Mertz
Publisher: Addison-Wesley Professional, 2003
A hands-on tutorial that teaches how to accomplish numerous text processing tasks using Python. Filled with examples, the book provides efficient solutions to specific text processing problems and strategies for all text processing challenges.
Author: Swaroop C H, 2008
This is a tutorial and a guide on Python programming for absolute beginners. If all you know about computers is how to save text files, then this is the book for you. The book is updated for the upcoming Python 3.0 language.
Author: Josh Cogliati
Publisher: Wikibooks, 2005
This free tutorial is designed to be an introduction to the Python programming language. The guide is for someone with no programming experience. The author attempts to teach programming by reading code and writing code.
Author: Steven F. Lott, 2008
This book is a complete presentation of the Python for professional programmers who need to learn the language. The author leads you from a tiny, easy to understand subset of statements to the entire Python language and all built-in data structures.
Author: Fredrik Lundh
Publisher: O'Reilly, 2001
A large collection of useful Python scripts, the best parts of comp.lang.python newsgroup messages, plus hundreds of new scripts. The text covers the standard library, the examples should work on most platforms and Python versions.
Author: Boudewijn Rempt
Publisher: OpenDocs, LLC, 2002
This book covers application development using the library extension PyQt, which forms the basis for GUI programming. First part explains concepts using small examples, in the second part the author develops a complete, complex application.
Author: Mark Pilgrim
Publisher: Apress, 2004
This is a book for experienced programmers, a hands-on guide to the Python language. Each chapter starts with a complete code sample, picks it apart and explains the pieces, and then puts it all back together in a summary at the end.
Author: Guido van Rossum
Publisher: Network Theory Ltd., 2006
This book is an introduction to Python, an easy to learn, powerful programming language. The tutorial explains the basics of the Python, it does not cover every single feature of the language, but introduces the most noteworthy features.
Author: Albert Sweigart
Publisher: Albert\Sweigart, 2008
A programming book for kids interested in learning to program their own computer games with python, a serious computer language which is used by professional programmers also. The book explains programming principles from the source code examples.

Tuesday, 29 December 2015

C programming for Laser

Laser Demo in ‘C’ 



 
 Fig. 1: Laser beam

Fig. 2: Inside an atom

Fig. 3: Emission of light
Here is a program to demonstrate the working of a laser. Laser is a device that creates a uniform and coherent light, unlike an ordinary bulb light. Many lasers deliver light in an almost perfectly parallel (collimated) beam, approaching a single wavelength. Laser light can be focused down to a tiny spot as small as a single wavelength.

How a laser works
Laser is an acronym for ‘Light Amplification by Stimulated Emission of Radiation.’ It emits high-intensity, amplified beam of light due to stimulation of atoms. Laser beam is shown in Fig. 1.

A laser can be as small as a microscopic computer chip or as huge as the National Ignition Facility (NIF), which is three football fields wide.
Lasers are possible due to the way light interacts with atom. In an atom, electrons exist at specific energy levels. Electrons in outer orbit rings are at higher energy levels than those in inner rings. These can be bumped up to higher energy levels by the injection of energy—for example, by a flash of light.

Once an electron moves to a higher-energy orbit, it eventually wants to return to the ground state. When it does, it releases the excess energy as a photon—a particle of light. The emitted photon has a very specific wavelength (colour) that depends on the state of the electron’s energy when the photon is released. Fig. 3 shows emission of light. The light and an electron in an excited energy level produce two photons of the same wavelength and phase.

Standard laser. A standard laser is a tube where a particular substance is held. The atoms in that substance are excited to give off a particular wavelength of light. One end of the tube is heavily mirrored. At the other end is a partially silvered mirror. Photons of light bounce off the mirrors, exciting other atoms as well.
The tube is surrounded by a strong, coiled light source called a flash lamp. When the flash lamp sends a charge of light into the ruby tube, a chain reaction begins on the sub-atomic level causing generation of a large number of highly excited photons.
These photons race back and forth at nearly the speed of light between the two mirrored ends of the tube, producing even more photons until the number of photons exceeds the ability of the partially silvered end of the tube to hold them all. When this point is reached, the photons burst out of the partially silvered end of the tube in the form of a highly intense, concentrated beam of light that we know as laser beam.

Application of lasers 
Lasers are used for everything from media storage to medicine and manufacturing. Their precision and energy allow users to very accurately measure or convey information:
 

Medicines. The pinpoint beam of a laser can focus precisely on a target and make highly delicate incisions. This newfound precision achieved by using lasers has drastically changed medicine. High-precision operations are now possible, thanks to lasers.

Supermarket scanners. In the grocery store these days, the supermarket checkers use laser technology to instantly find the right price and information for your purchases. 3D scanners are also available in the market.

Measurement. Lasers make fantastic rulers. These measure distances with a very high accuracy. There are two major ways a laser can do this. One way a laser can measure distance is by time of flight. The other method makes use of an interferometer.

Military. In military, IR countermeasure systems use lasers to confuse the seeker heads on heat-seeking anti-aircraft missiles. High-power, boost-phase intercept laser systems use a complex system of lasers to find, track and destroy intercontinental ballistic missiles.

Some weapons simply use a laser to disorient a person. One such weapon is the Thales green laser optical warner.

Another military use of lasers is as a laser target designator. This is a low-power laser pointer used to indicate a target for a precision-guided munition, typically launched from an aircraft.

Cutting tools. Lasers produce such an intense and precisely focused energy that they can cut through metals, ceramics, plastics and cloths. They have become popular in many industrial operations because high-precision, computer-controlled lasers are much more accurate than human-operated cutting tools and, unlike traditional tools, laser beams never turn blunt.

Scientific research. Since the laser was patented in 1958, it has become smaller, more precise and more powerful today. Nuclear fusion, spectroscopy and cooling atoms are some of the laser applications in scientific research.

Microscopy. Confocal laser scanning microscopy and two-photon excitation microscopy make use of lasers to obtain blur-free images of thick specimen at various depths. Laser-capture micro-dissection uses lasers to procure specific cell populations from a tissue section under microscopic visualisation.

Software program
 
 Fig. 4: Screenshot of program output
 showing amplification of photons

Fig. 5: Program output showing release of photons

Fig. 6: Program output showing the internal working of a laser
The above laser concepts have been taken into consideration while developing this program. The program is written in ‘C’ language and compiled using Turbo C integrated development environment. Turbo C has a good collection of graphics libraries. This program uses various ‘C’ graphics files including egavga.bgi, scri.chr, trip.chr and tscr.chr. All these files should be stored in the same folder as the executable file.

The different program outputs depict working of a laser as below:
Amplification of photons. The first program output screen demonstrates generation of multiple photons inside the laser due to amplification from a single photon (see Fig. 4).

Release of photons. The second screen demonstrates the stimulation process of an atom where a photon stimulates the atom to release more photons (refer Fig. 5). The arrows have been added in the actual screenshot to show the flow taking place.

Inside the laser. The third screen (Fig. 6) demonstrates the complete process that takes place inside the laser. Proper flow is presented in which photons energise by the application of power supply, amplify with stimulation of the atoms and exit the laser through the semi-silvered mirror. The symbols of the photon and the atom are displayed on the top left.
End of demo. The final screen prompts the user to press any key to exit the program.

Main functions used
Initgraph(&gd,&gm,”c:\\turboc3\\bgi”). Initialises the graphics system by loading a graphics driver from the disk and then putting the system into graphics mode. It also resets all the graphics settings (like colour, palette and current position) to their default values.

*gd. Specifies the graphics driver to be used.

*gm. Specifies the initial graphics mode, unless *gd = DETECT. When *gd = DETECT, initgraph sets the graphics mode to the highest resolution available for the detected driver.

Closegraph( ). Switches the screen back from graphics mode to text mode. It is called after getch( ) function so that the screen doesn’t clear until the user hits the key.

Void projectwork1( ). Demonstrates amplification of photons.

Void projectwork2( ). Demonstrates stimulation of an atom to release photons.
Void projectwork3( ). Demonstrates how laser works.

Void closing. Provides an exit screen to exit the program.
 

Saturday, 26 December 2015

Weather-Forecast

Weather-Forecast Monitoring System 




Weather forecasts play an important role in our day-to-day life. A good weather monitoring system helps in better planning and any preparations that may be required in case of adverse weather.


Fig. 1: Author’s prototype

This project deals with the construction of a weather display system using low-cost components so that any electronics hobbyist can build it. Instead of using sensors to gather the weather data, the project gets the information from professional weather stations located around the world through an international weather data provider. The author’s prototype is shown in Fig. 1.

World weather online
During the past few years several weather data providers have proliferated on the Internet. One such provider is worldweatheronline.com. It offers a free application programming interface (API) that can be used by the developers to get the weather data. A client device is needed to access the worldweatheronline.com API to get weather data by sending a uniform resource locator (URL), simply known as the Internet address.


   
In order to get access to the API one has to register with the weather website. Upon successful registration, a unique access key code is assigned and sent to your email ID. This unique code must be included with the request URL that is sent to the server. One can send approximately 500 requests per hour to the server. The server accepts the client device request and sends the necessary data to the client.

The server provides three types of message formats for weather data: XML, JSON and CSV. The first two formats are a bit difficult to use because one must use format headers and keep track of special string of characters to identify data. The CSV format is simple because it uses readable characters where the data is separated by a comma (,) character.

To request weather data, the URL message shown below is sent to the server.

“GET/free/v1/weather.ashx?q=madurai&format=csv&num_of_days=2&show_comments=no&no&key=yayjgrdysb6hpftc2jwek5c9”;

The response to the URL message is a stream of readable characters that include HTTP protocol information followed by weather data. The HTTP protocol information contained in the weather data is removed by a routine in the client software. The data values that follow are separated by commas. The current data and the forecast are separated by line feed and carriage return. The data layout information is available as comments in the CVS format. The following is an example of response from the server that contains weather data header in CSV format:

HTTP/1.1 200 OK
Cache-Control: public, no-cache=”Set-Cookie”, max-age=120
Content-Type: text/plain; charset=utf-8
Expires: Tue, 14 Jan 2014 06:20:17 GMT
Server: Microsoft-IIS/7.5
Set-Cookie: wwoanon=BameQIJHzwEkAAAANDc0NGEwZmEtOTY5ZC00MzFlLThhNzItNWMzNWQzMWZl
NmQ27xVhqIEhtREITXXX7wBw3Pa5XkM1; expires=Mon, 24-Mar-2014 16:58:17 GMT; path=/;
HttpOnly
X-AspNet-Version: 4.0.30319
hit-for-pass: 1
Date: Tue, 14 Jan 2014 06:18:19 GMT
Age: 0
Connection: close
X-Powered-By: UKFastWebcelerator
X-Cache: MISS



Fig. 2: Block diagram of the weather forecast monitoring system

The following is the CSV data format:

date,tempMaxC,tempMaxF,tempMinC,tempMinF,windspeedMiles,windspeedKmph,winddirDegree,winddir16Point,weatherCode,weatherIconUrl,weatherDesc,precipMM
06:18 AM,29,116,http://cdn.worldweatheronline.net/images
wsymbols01_png_64/wsymbol_0002_sunny_intervals.png,PartlyCloudy ,10,16,37,NE,0.0,60,10,1015,40  2014-01-
14,30,86,21,70,11,17,37,NE,116,http://cdn.worldweatheronline.net/images/wsymbols
01_png_64/wsymbol_0002_sunny_intervals.png,Partly Cloudy,0.1
2014-01-15,31,88,21,70,9,14,30,NNE,116,http://cdn.worldweatheronline.net/images/
wsymbols01_png_64/wsymbol_0002_sunny_intervals.png,Partly Cloudy,0.1


The client software
   
The TCPIP client board, which houses Microchip TCPIP Stack 5.42, is configured to work as client. More detail on the stack can be obtained from www.microchip.com website.

The general TCP Client.c file available in stack is suitably modified to carry out the following tasks:
1. Send required URL to the server 
2. Remove the HTML header from the incoming weather data from the server
3. Store weather data in the EEPROM
4. Send the stored data from the EEPROM to the host PC via COM port

Circuit and working
The block diagram of weather forecast monitoring system is shown in Fig. 2 and circuit diagram of the client board is shown in Fig. 3. The circuit contains Microchip PIC18F4685 (IC1), Ethernet controller ENC28J60 (IC2), EEPROM 25LC256 (IC3), quadruple 3-state buffer 74HCT125 (IC4), dual driver/receiver MAX232 (IC5), 16x2 LCD display and magnetic jack RJ45 Ethernet connector.
Ethernet controller ENC28J60 operates with 3.3V supply, so level-shifter IC 74HCT125 is used to maintain proper TTL levels between PIC and ENC via SPI bus. LCD is wired in a 4-bit mode with data lines connected to port pins RD0 through RD3 of the microcontroller IC1. The control lines RS, R/W and EN are connected to RD4, RD5 and RA5. Status LED2 connected to RA2 is used to indicate working of the stack by blinking.


Fig. 3: Circuit diagram of the client board

Pins RC3, RC4 and RC5 are used for SPI communication. Pins RC6 and RC7 are used as TX and RX lines for serial communication. Dual driver/receiver MAX232 provides necessary voltage levels for serial communication between the PC and the client board. RB3 and RB4 pins act as CS lines for the ENC and EEPROM, respectively. Pin RB5 acts as reset line for ENC28J60. EEPROM 25LC256 is used for storing incoming weather data.
 

The client board should be connected to the Internet through Ethernet port of the modem or router.


Fig. 4: Power supply


Fig. 5: Delphi front panel display

Power supply. The client board circuit is powered by 5V and 3.3V supplies (refer Fig. 4). A 9V DC supply is fed to the 5V regulator 7805 (IC6). This 5V supply drives LM3940 (IC7) and the other circuit including PIC18F4685 microcontroller, LCD display and level shifter 74HCT125. LM3940 is a 5V to 3.3V converter. ENC28J60 is powered by the 3.3V supply. LED1 is used to indicate the presence of power in the circuit.
Host software
The host software is developed using Delphi language, which is simple to use and does not require DLL files like VB for running its application exe. The Delphi exe file can run on any windows platform. Delphi front panel view of the weather monitor is shown in Fig. 5.


Fig. 6: An actual-size, double-side, solder-side PCB layout of the client board


Fig. 7: Component-side track layout of the PCB


Fig. 8: Component layout of the client board circuit

The Setting button at the screen’s bottom is used to configure the COM port parameters such as port number and baud rate. The Open button opens the relevant COM port, sends City Name in the edit box window and character ‘S’ to the client board which initiates the start of the client program. The Show button is enabled only after all the processing is over; it enables the user to view the data in the Report List. If a query is sent for a city whose weather data is not available, the server sends ‘Unavailable’ message to the client. That information is passed on to the user by displaying the message through a pop-up window.
Free third-party COM port library, SDL component Report List library and Scroll Message library are used, which are freely available on the Internet for download. The incoming CSV data format from EEPROM via COM port is stored in a string array. Simple software routines are included in the Delphi program to extract individual weather data from the CSV format and displayed in Report List.
 

Reset button is used to reset the Delphi form. The user has to change the COM port number available in his PC and baud rate is fixed to 19200.

Construction and testing
An actual-size, double-side, solder-side PCB layout of the client-board is shown in Fig. 6, component-side track layout in Fig. 7 and the component layout in Fig. 8. An actual-size, single-side PCB layout for the power supply is shown in Fig. 9 and its component layout in Fig. 10.

Mount the components on the PCBs to save time and minimise assembly errors. Check proper connections before connecting the 5V and 3.3V supplies to the PCB at CON4 and CON5, respectively.


Fig. 9: An actual-size PCB layout of the power supply


Fig. 10: Component layout of the power supply PCB



If your PC does not have a serial COM port, you can connect it to USB port by using a USB-to-serial converter. In that case, first you need to install appropriate driver in your PC. After connecting the client board to your PC, launch the weatherdisplay.exe Delphi program. A window screen will open up similar to the one shown in Fig. 5 with blank data columns.


In the display panel of this window click on the Setting button and choose the COM port. Note that your PC COM port baud rate should be 19200. Enter the city name in the edit box, for instance, Madurai. Now switch on the client board. The ‘TCP-Client’ message should appear on the LCD. Vary VR1 to adjust the contrast of the LCD to get clear visibility of the message.
Next connect one end of the Ethernet cable to the RJ45 connector in the client board and the other end to the Ethernet port of your broadband modem/router which has Internet connection. You need to configure your Internet connection in your PC from the control panel. You should disable wireless Internet connection. If Internet connection is successful, you will see the blinking of LED3 and LED4.

Now, click on Open button at the bottom of the screen. The IP address (192.168.0.102 in our case) should appear on the LCD. The Show button will be inactive first but after a few seconds it will get enabled and ‘Remote server connected’ message will appear at bottom of the screen. Upon clicking on the Show button weather data will get displayed in the report sheet as shown in Fig. 5.

At any time, if you face any problem in the circuit, refer Table II for troubleshooting.

Further applications
Some other applications of this system could be:
1. Apart from the weather data one can get different types of weather analysis by sending relevant URL request to the server by referring to the full document available on the website.
2. It can be made into a portable system by interfacing it to a 10.2cm (4-inch) TFT colour LCD display and making it wireless using MR24WBOMA instead of ENC28J60
3. This design may be better than a backyard weather station because you receive accurate professional weather forecasts.
4. One can modify the design to connect with other data providers to display important data such as news headlines and stock market information.