lcd_multimeter.pdf

Upload: jose-david-castro

Post on 02-Jun-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 LCD_multimeter.pdf

    1/14

    LCD

    MULTIMETERFOR YOUR SHACK

    MEASUREMENT U, I, P, Ah

    FOR GREEN ENERGY -WIND TURBINE, SOLAR PANELS

    MEASUREMENT U, I, P, Ah, kWh

    www.sp2dmb.cba.pl [email protected]

  • 8/10/2019 LCD_multimeter.pdf

    2/14

    MULTIMETER - ATMEGA8Piotr Bryl SP2DMB www.sp2dmb.cba.pl [email protected]

    Measurement:U, I, P, Ah U, I, P, Ah, kWh

    for Hams shack - to wind turbine, solar panels

    PARAMETERS:

    - voltage 30V (50Vmax), resolution 0,05V- current version - current 25A, res. +/- 0,1A

    3A, res. +/- 0,01A - power 750W max, res. 1W8A, res. +/-0,02A - 999Ah, res. 0,1Ah

    25A, res. +/- 0,1A - 999kWh, res. 0,1kWh- power 750W max, res. 0,1W

    - 99Ah, res. 0,001Ah

    This project is for the construction of a simple multimeter with ATMEGA8microprocessor . In addition on the board there is a place for the temperature sensorDS18B20.

    PCB allows the construction of a meter to measure voltage, current, power, amphours, kilowatt hours and the temperature. In addition, the plate pins are available thatcan be used to control such relays buttons.

    PCB is ideal for your own projects and learn programming processors !

    The construction is traditional THT. Dimensions: 80x50mm. The PCB is one-sided, plated with solder mask and component assembly drawing.

  • 8/10/2019 LCD_multimeter.pdf

    3/14

    DESCRIPTION

    1 Power supply

    Power supply of multimeter is on the 7805 controller based (TO220) This isbecause of the fact that the maximum voltage supplied system, can be up to 35V.

    At the beginning of the track is a 1N4148 diode, which protects the system againstreverse connection of power supply. The minimum supply voltage is 8V.A tile can be supplied in two ways. With an external power supply, the switch SW1is in position 1 The second way is to capture the power supply voltage sourcedevice - the so-called. Common power.SW1 is then in position 2 For measurements below 7.5 V, use an external powersupply (item 1 SW1)

    2 Processor

    The meter uses the processor ATMEGA8-16PU. It works together with external

    8MHz quartz. On the board are additional pins that are used for programming (1-RST, 7 - 5 V, 17-MOSI, MISO 18-19-SCK, minus the weight). Available pins are:PD0, PD1, PC5, PC4, PC3 and PC2.The reference voltage is 5V and is applied to the CPU by 100uH choke.The processor is mounted on the stand DIL28.Setting the fuse bits: CKSEL: 1111:1111, 0CKOPT: 0

    3 Display

    Used typical LCD display 2x16 characters. This amount is sufficient to show thevarious types of measured values. The display device driver must be compatible

    with the HD44780. The diagram given for the design, configuration pins to display.Resistor R10 limits the current supplied to the display backlighting. PotentiometerP3 - 10k set the contrast. Before connecting the power to set the slider in themiddle. After connecting to adjust in order to obtain a clear view characters.Display dimensions: 80 x 36mm.

    4 Voltage measurement.

    Measured voltage reaches the divider R3, P2, R4. Helipot type potentiometer isused to adjust the voltage value displayed properly. For calibration, use a anotherdigital meter. The displayed value should be the same on both gauges.To processor can not be provided a voltage higher than 5V. Therefore, in thevoltage measurement circuit is diode Zener 5V1 which cuts voltage greater thanthis value. It follows that, we can do measurement with this resistor divider to 50V.However, in this case supply of the multimeter by switch SW1 position 2 isprohibited because to stabilizer will come in voltage greater than 35V!The measured voltage goes to the ADC input - 23 pin.

    5 Current measurement

    Here is applied technical method, that is measurement voltage on the resistor,

    through which current flows . I= U/RThe measurement is taken at the track ground power unit.Measuring Resistors R11 and R12 are soldered SMD and are from the paths(dotted line in the diagram assembly).The voltage drop is given by the resistor R6 to the input of operational amplifier

  • 8/10/2019 LCD_multimeter.pdf

    4/14

    LM358 or MCP607. Amplification is in the range G = 6 to 15. Amplified tensiongoes to the ADC input processor PC1 - pin 24

    6 Schematic diagram of the MULTIMETER

  • 8/10/2019 LCD_multimeter.pdf

    5/14

    7 Installation diagram:

    *- current version

    8 Connect the multimeter to the power measurement.

    The measured voltage and current connected from the tracks. In the picture aboveyou will find connecting pads - dotted line (they are from the bottom).+ INP - plus here is connected with the power supply. It passes through the fuseF1 to the + OUT and then to the receiver-INP - that we give less of power - it is the weight.-OUT - output minus the power supply to the receiver

    In the case of engine power, there may be interference with the microprocessor.

    9 Temperature measurement

    Measurement of temperature is possible.At the bottom of the left side (seeinstallation diagram) are goldpins to connect the sensor DS18B20.The signal should be given to the free port of the microprocessor. You can useanother sensor, but you should pay attention to the correct connection of powersupply and signal output.

    INSTALLATION NOTES

    Due to the low power consumption by MULTIMETER, 7805 Stabilizer does notrequire refrigeration.

  • 8/10/2019 LCD_multimeter.pdf

    6/14

    Electrolyte C3 - 100uF mounted in a horizontal position.On the assembly scheme shown in broken lines potentiometer P1. If we do nothave it in the version of the 3296X (the knob on the side), you can solder the3296W version. The pins should be bend 90 degrees and mounted horizontally.Over the processor's patch. It provides a 5V voltage operational amplifier andillumination matrix.For IC is best to use the stand. This will facilitate their removal in case of damage.

    Display combine with a PCB with a connector HEADER 1x16 - plug + socket. Inaddition, we combine the four screws from the display board. In addition, we usespacers 12mm in length. The protruding screw (for display) fix another sleeve withinternal threads M3 with a length of 6-8mm. The bush will allow us to install themeter to the chassis.For power, access to inputs microprocessor and sensor are used connectors typegoldpin.The executed model is using car fuse. Female connectors soldered to the board.These pads + + INP and OUT. Connectors must be cut off and put a fuse. Thensoldered to the board.

    ACCURACY OF MEASUREMENTS

    Accuracy is dependent on the applied processor and an operational amplifier anda resistor.

    PROCESSOR - like any AVR shows errors in the calculation and the writing of theprogram should be taken into account. When testing the finished appliance makeadjustments in the program. The applied reference voltage on the metermeasurement resolution imposed on us.

    1024bit = 5V, which gives 0.0048 V / bit

    AMP - current measurement

    Can be successfully used the popular LM358. But we must remember that he issaddled with a large offset at the start sheet. What does that mean? If we measurethe very small voltage, they will not be equally amplified. The output voltage is notadequate to set the gain. Practice shows that the linear LM358 begins work onok.10mV at the amplifier input. So the voltage below 10mV amplified e.g 10 timesdo not show the correct value.Moreover, the power amplifier 5V, it can be strengthened voltage to a maximum of3.6 V. This means that the maximum input voltage is 0.36 V. The calculationsassume 3V.Non-linearity of the amplifier can be avoided in two ways. Programmatically - use ifan amendment to the output voltage of the amplifier and hardware.The measurement accuracy of the block affects the final result, not only thedisplayed power, but the power supplied and taken ampere!

    Correction of hardware.

    Building a measure we must assume its scope. Operational amplifier worksmeasuring resistor R11 (R12).

    Below is an example of how to correctly choose the desired input range span andthus maximize accuracy (resolution ADC when VREF = 5V).

  • 8/10/2019 LCD_multimeter.pdf

    7/14

    Assumptions:Current measurement up to 3A.Maximum input voltage to 0.3 V amplifier (Uwyj. = 3V, G = 10)

    From Ohm's Law:

    U = R x I

    R = V / I is R = 0.1 ohm

    Power resistor is: P = R x I ^ 2 P = 0.1 x 9 = 0.9 W

    Heat emission affects the accuracy of measurement and we need to ensure stableoperation of the resistor. For this purpose, the resistor must be used morepowerful. Available in SMD are 3D and so you must use the meter.

    The amplifier MCP607 is an order of magnitude better performance and works well

    with smaller input voltages.

    However, you must always seek to maximize the resolution of the ADC inATMEGA8.

    NOTES FOR PROGRAMMING

    The following listing must include a written program. It contained herein LCDcontrol configuration used on the board:

    Config Lcd = 16 * 2

    Config Lcdpin = Pin = Portd.5 DB4, DB5 = Portd.6, DB6 = Portd.7, Db7 =PORTB.0, E = Portd.3, Rs = PORTD.2

    Video on You Tube: http://www.youtube.com/watch?v=EW20V_z7s38

    ASSEMBLY INSTRUCTIONS

    An integral part of the meter is ATMEGA8 processor and LM358 operationalamplifier. The program in the processor is configured toproper amplifier.

    Installation and commissioning

    Installation of the unit, perform the installation diagram. Before inserting the chipstand and display, connect voltage to goldpins "Plus" and "Minus". Scope ofsupply: 7.5 - 30V with respect to ground.Contacts SW1, normally are set to supply additional external.Check the voltage on leg 7 ATMEGA-i and leg 8 - operational amplifier. It shouldbe about 5V.Disconnect voltage and load integrated circuits as terminals. Replace the display.Reconnect the tension.

    Potentiometer P3 - 10k set the contrast of the display.Connect the voltage source, which will be measured. The display will show thevoltage "U".Another measure we measure the voltage source. Display on the meter to adjustthe potentiometer P2 - helipot.

  • 8/10/2019 LCD_multimeter.pdf

    8/14

    No-load current indication should be 0.00 A. Potentiometer P1 - helipot (under thedisplay) to adjust the indication to that value.The exact adjustment of current measurement proceed as follows.The output meter connected in series: a light bulb and an ammeter.We make an adjustment potentiometer P2 current indications. They must be thesame on LCD 2x16 and the ammeter.Top adjustment made in the mid range. For example, 3A range - Adjustable at 1.5

    A, the range 8A - adjustable to 4A, etc.Due to the non-linearity of the CPU (resolution) and the amplifier display may haveslight variations in readings.Precise setting voltage and current readings is essential for the indication ofmeasuring power supplied and the number of ampere-hours taken by the receiver.

    Reversing the test voltage can damage the system!Use a fuse appropriate for the range!

    The display is mounted on the spacer sleeves. Internal threaded bushings, providea simple way for the installation of such a power supply or charger.

    Ready MULTIMETER (size: 80x50x27mm)

    VIDEO on YouTube:

    http://www.youtube.com/watch?v=IQj8jljOMqs&feature=em-upload_owner

  • 8/10/2019 LCD_multimeter.pdf

    9/14

  • 8/10/2019 LCD_multimeter.pdf

    10/14

  • 8/10/2019 LCD_multimeter.pdf

    11/14

  • 8/10/2019 LCD_multimeter.pdf

    12/14

  • 8/10/2019 LCD_multimeter.pdf

    13/14

    For DC power supply:

    For wind turbine, solar panels:

    If You need ! [email protected]

  • 8/10/2019 LCD_multimeter.pdf

    14/14

    Component list

    C1,C2,C7,C8,C9,C10,C11,C12,C13,C14 = 10 x 100nC3,C4 = 2 x 100

    C5,C6 = 2 x 33p

    D1 = 1 x 1N4148D2 = 1 x 5,1V

    IC1 = 1 x ATMEGA8DIL-28 = 1 xGoldpin = 11 x 1

    L1 = 1 x 100HF goldpin = 16 x 1M goldpin = 16 x 1

    LCD 16*2 HD44780= 1 x

    P1 helip. = 1 x 10kP2 helip. = 1 x 5kP3 trim. = 1 x 10K

    Q = 1 x 8MHz

    R2 = 1 x 6,8kR4 = 1 x 8,2kR8 = 1 x 1kR9 = 1 x 27KR10 = 1 x 510R13 = 1 x 10kR14 = 1 x 4,7kR1,R3 = 2 x 100kR11,R12 = 2 x *see documentationR5,R6,R7 = 3 x 47k

    SW1 = 1 x 1 UMGoldpin = 3 x 1

    T sensor1* = 1 x DS18B20 - optionGoldpin = 4 x 1

    U1 = 1 x LM358, MCP607DIL8 = 1 x

    VR1 = 1 x 7805Goldpin. = 2 x 1