Wednesday 13 November 2013

Simple Light Meter for Photography

he light meter circuit is a tool, measure the quantity of light, widely used to a photography, To decide the correctness of the exposure.
Sometimes, we are use with other works, such as my son likes to use in science experiments, which do not need to have high quality.
This simple light meter in figure 1 is a example circuit form LM134/LM234/LM334 datasheet of National Semiconductor (most popular IC), It takes very little equipment,
Features of circuit, when there is a lot of light level, an ammeter will show a high current, but a little light it will lower the current.
We use the light sensor device is the LDR( Light Dependent Resistors) which Normally the resistance of a LDR is very high, but when the light hits it, that has a lower resistance.
The LM334z is 3-Terminal Adjustable Current Sources, that the output of 1µA to 10mA with a resistor between pin 1 and 3, and used the power supply voltage input is wide range of 1V to 40V.

CIRCUIT DIAGRAM
 
The ammeter may be used the 0-1mA Analog DC Current Panel Meter Ammeter
0-1mA Analog DC Current Panel Meter Ammeter

AT89SXX ISP SERIAL PROGRAMMER

Introduction   

Welcome to the world of Microcontrollers, and the first thing you need is a Device Programmer. This In System Programmer is RS232 (serial port) based but can indirectly be used with USB using USB to RS232 converter. If you need something like this you need to assemble a very simple circuit (Programmer Unit).

Hardware

Figure 1 shows  the  Block diagram of the in-system programmer interface,  the programmer can be self powered or target powered it depends on how you plan to use it.
Figure 1:   Block Diagram of the ISP Programmer
Figure 2  shows  the  actual circuit  diagram. The Programmer has just two ICs. IC1 = AT89C2051, IC2 = MAX 232. Few Resistors, LEDs, capacitors etc. The value of the crystal is critical and must be 11.0592 MHz.  

Figure 2:   Circuit Diagram of the ISP Programmer

Firmware.

Assemble the circuit and burn the firmware into an AT89C2051(you will need a conventional parallel Programmer to Program the AT89C2051).

Software

The Software is a Windows GUI application and supports all programming functions. When you run the software for the first time it looks for a valid programmer on COM1. If the Programmer is connected to say COM2 you will receive an error message but when the application starts select Options->Settings on the Menu and specify the correct COM Port.
Following are the main features of this software,


  • Device Supported - AT89S51, AT89S52, AT89S8252, AT89S8253.
  • Read and write  Intel Hex files.
  • Chip Erase.
  • Verify.
  • Lock.
  • Read Device Signature.
  • Advanced Device Specific Functions.
  •          
    Download
    For AT89SXX ISP Flash Programmer Software and Firmware for AT89C2051 download 
              AT89C2051 FIRMWARE FOR PROGRAMMER
              AT89SXX HEX DOWNLOADER

    AVR ISP SERIAL PROGRAMMER


    This simple COM PORT based  AVR atmega Programmer will allow you to painlessly transfer hex programs to most ATMEL AVR microcontrollers
    without sacrificing your budget and time. It is more reliable than most other simple AVR programmers available out

    there and can be built in very short amount of time.

    AVR programmer consists of in-circuit serial programmer (dongle) and small pcb with a DIP socket where you can fit
    your microcontroller and have it quickly programmed.

    You may also use this programmer as a stand alone in-circuit serial programmer that can be used to conveniently
    program AVR microcontrollers without removing them from the target circuit.

    Entire AVR programmer has been build with using common parts and fits in the case of the serial connector. The socket pcb has been created to fit a 28-DIP AVR ATmega8 microcontroller, but you can build a socket pcb for any other AVR microcontroller out there. This AVR programmer is compatible with a popular PonyProg software that shows you a status bar of the programming progress.



    AVR In-Circuit Serial Programmer Schematic








    Ensures that the chip is receiving exactly +5V voltage it ensures error free programming.

    +5V voltage supply for AVR chip may be provided from external power supply or even better - directly from USB

    Pony Prog :The Programming software


    To be able to send hex file from your computer to AVR microcontroller you will need to download and install PonyProg2000. After the installation, the first thing you will need to do is configure PonyProg to work with our AVR Programmer. To do this go to "Setup" menu and select "Interface Setup". The following window will be shown and highlighted areas show you exactly which options should be selected.



    In the next step select "AVR micro" and your microcontroller type that you will be programming (ex. ATmega8





    At this point PonyProg configuration is complete and we can open hex program with which AVR microcontroller will be flashed. Go to "File" menu, select "Open Program (FLASH) File ...", and point to the hex file to open it up. You should see hex numbers as shown on the screen below. If you haven't connected AVR Programmer dongle to your computer's serial port yet, then now is the time. Make sure that AVR Programmer is physically connected to your AVR microcontroller through Socket PCB or through ICSP 6-PIN connector. Finally click on the highlighted icon "Write Program Memory (FLASH)", or go to "Command" menu and select "Write Program (FLASH)".

    !! IF your Flash(.hex) file have special configuration bits Then you have to configure those bits manually.




    Click on "Yes" button to confirm the programming.
    Now sit tight, relax and watch the programming progress on the status bar. PonyProg will program AVR microcontroller and verify if the hex file was transferred without any errors. For your information this process shouldn't really take more than 10 to 30 seconds. This depends on the size of the program that you're trying to flash.






    After programming is completed "Write successful" window will be shown letting you know that AVR microcontroller has been programmed, and is now ready to be used.






    Programming The Security and Configration Fuse bit (if needed)


              First click on the sercurity and configration button in the tool bar,  a dilog box will apper as shown in the image blow.



    To read the current security bit from the devive please click Read button in the securit and configration bits dialog box

    now you are ready to change the configration bits
    To caclulate these ceck box values accoring to your needs or to claculte by use hfuse and lfuse

    just check and uncheck the boxes accoring to your setting and click write button.