Aug 25, 2009

Data Acquisition and Logging System


Introduction

This project tells you, how to design your own data acquisition cum logging hardware plus software. Temperature from different locations are the data items to be logged onto the PC. Ofcourse the data from the sensors are analog and most of the cases. I’ve used temperature sensors as data generators, one can measure any kind of physical parameter like sound level, distance etc. I’ve used ATmega32 from MegaAVR family by ATMEL because it has 8 channels of 10 bit resolution Analaog to Digital Convertor which is used to digitized the analog data from the sensors.

Digital data is sent to the PC from the microcontroller using inbuilt full duplex UART channel of mega32. Data can br read on the GUI dash board designed using VB 6.0, The source code for both AVR frimware and VB software is provided in the download section.

Schematic

Hardware


Complete hardware schematic diagram in PDF is available above. Main heart component of the circuit is the ATmega32 microcontroller form MegaAVR family. temperature sensor used is LM335 which is calibrated by 10mv per degree kelvin. LCD is attached to display the data on each channel rael time at the site of installation of device. As data from the controller is sent to the PC using serial channel a signal level convertor MAX232 is used, to convert RS232 signals into TTL signal and vice versa. 16 MHz crystal oscillator is used to provide master clock to the system. LC network is attached for noise reduction in ADC. LM335 needs kind of calibration, for that purpose a preset of 10K in series with a 1K resistance is used.

LCD is connected to PORTC, you must disable JTAG using fuse bit settings to let the display work.

PCB Layout (DipTrace)

Download complete source code for AVR, VB interface here, take it use it..modify it. If found useful to you. Do reply me at devesh@electroons.com



Aug 24, 2009

Duck Hunt Game on CRO (Oscilloscope)






Hello Friends...
This is a very interesting project infact its a game for you. Lets see what it is??

What it is???
This is a very interesting project. You all must have played the game “Duck Hunt” in video game . Here is a circuit that let you play the same shooting game but now the display device is not your television while it is a C.R.O. that is Cathode Ray Oscilloscope.

How to Do it Yourself ???
Yes it is another simple application using our very well known friend "AVR Micro Controllers". We used a ATmega32 with a clock of 16 MHz to generate some signals (Of course digital). These signals converted into corresponding DC voltage using an Digital to Analog converter. Although the DAC modules in the form of IC DAC0808 is available in market but we preffered to make our own DAC using Operational Amplifiers. Here is the circuit diagram of DAC it is popularly known as R-2R ladder type Digital to analog converter.
In our case we have used buffers to couple microcontroller’s output to the DAC input, this is because while doing experiments we were facing some problems because of unbalance in the R-2R ratio of DAC circuit. Now buffer properly isolates the microcontroller output to the DAC input.For buffer we used 74HCT541 IC you can go for some other also.

To couple the analog output from DAC to the CRO input we used MIC 50 ohm cable, and ofcourse CRO needs BNC connectors for input. The most important thing is we are using CRO display in X-Y mode of operation. Each of two DAC generates analog signals corresponding to X and Y input respectively.

Source Code
Download Complete Source Code Compiled using WinAVR here. This source code includes functions to generate object by raster scanning on CRO screen. If you can use this code Do it...but if proved to be a good helper to you do reply me first. Thanks !!!


How it Works ???
Now the most important part, How to make a gun for Shooting and how the system actually works. The behind is very simple, Our gun has a sensor for green light at its tip. Sensor senses the green light and send the feedback to microcontroller. When i press the trigger of gun infront of any moving object on CRO screen, sensor sends a feed back to the microcontroller and microcontroller sounds the buzzer. This is how we detected the duck on the screen. Comparator is used to generate a tuned feed back to the microcontroller.


Contact- devesh@electroons.com

Aug 23, 2009

Digital Code Lock using AT89S52


We all know about the electronic code locking security system, here is the same concept of electronic code lock using AT89S52 i.e. 8051 family of micro controller. it has a 4×3 keypad for user input of password which will be numeric and a 20×4 alphanumeric LCD is used for user interface.

There are two kind of passwords one is the user password and the other is master password. when any user try to open the lock he must enter the right password which is of 5 digits. the user will be given 3 chances to enter the correct code otherwise he will be asked for the master password which is 10 digits long

LCD Commands for 20×4 Alphanumeric LCD are as follows:

Goto first line - 0×80

Goto second line - 0xC0

Goto Third line - 0×94

Goto Fourth Line- 0xD4

Code for this project includes Keypad interfacing and logic for password check, as well as LCD routines.

Download the complete source code as well as schematic for the project.

Download Schematic PDF here

for more details visit http://www.electroons.com