Troubleshooting Watt Meter

Discussion in 'The Projects Forum' started by sanwa, Feb 26, 2009.

  1. sanwa

    Thread Starter Active Member

    Jan 18, 2009
    36
    0
    Watt Meter

    Project reference: http://homepages.paradise.net.nz/bhabbott/wattmeter.html

    ASM code: http://homepages.paradise.net.nz/bhabbott/watt/wattmeter.asm

    Schematic: http://homepages.paradise.net.nz/bhabbott/watt/Wattmeter.gif

    My Watt meter:
    I am using the schematic as shown above, however there is minor change where I didn’t use any switches (S1, S2, and S3) and the shunt resistor, R15 used is 1 Ω. I’d asked the author of this project, he mentioned I can neglect the rpm input at RB0 pin 6 of PIC16F88. So basically the overall idea is to measure the power dissipated in terms of watt.

    After the schematic has been connected, I manage to get this on the LCD screen:
    [​IMG]

    *However, sometimes I may have readings even without connecting any load to it.
    Question 1: May I know what cause this?


    Then, I tried to connect both the LOAD + and LOAD – together, what I get is:
    [​IMG]


    The maximum value allowed by the author and the project.

    All values are constant while the Ah value keeps on increasing. (I think it is because I want to measure watt, so timer is needed here).

    There are several questions that I really need to know regarding this project as I am an ASM language numb. I really appreciate your help on this.

    1. May I know the overall concept on how this watt meter is built? As I know to get Watt (power), I need to know voltage, current, and resistance. In this project, there are two parts, one on the shunt current (if not mistaken), and the one connected to the PIC16F88 measuring the voltages. So computation on the reading (watt) is done by getting the analog values of both and do the analog to digital (ADC) within the PIC.
    2. I see there are changes when load is connecting to the watt meter. Only the voltage reading 25.58V keeps constant on the LCD while other changing. Ah (Ampere hour) is increasing secondly and both the watt (W) and current (A) have the values changes. May I know is the watt and ampere value are being shown simultaneously each time the calculation done instantaneously?

    [​IMG]

    3. Refer to the connection as shown above; there are 4 outputs from the PIC to the LCD. RA4 to DB7, RB1 to DB6, RB2 to DB5, RB3 to DB4. As this watt meter using a 16x2 line LCD, so as I know 2 data buses are corresponding to the characters displayed on the LCD and the other two are used to control the LCD. May I know which two data buses responsible for this? I need these two data buses to connect to the digital IO of my RF module.
    4. I am using a 9V battery as the input. Providing the facts of using shunt resistor of 1Ω, I wonder what the range of the load I might use. And I found that for the four data buses, DB7 is the only one with high voltage of 3.8V. May I know what does that mean? Leak?


    Well, I had gone through the progress of implementing the hardware until now. So hopefully I can have someone guide me and advice me on my debug progress. I really appreciate your help. Thank You. By the mean time I will also trouble shoot it on my own. Guidance and help are needed. Thanks again.
     
  2. sanwa

    Thread Starter Active Member

    Jan 18, 2009
    36
    0
    Well, this is the nightmare to me. As I am numb at ASM. So if serial is being used, means there will be only one output to my RF module isn't it? Because I am not sure what the 4 IO for ... s until now i cant make my decision on making the interfacing to my RF module. :(
    Can any ASM programmer guide me?
     
    Last edited: Feb 26, 2009
  3. sanwa

    Thread Starter Active Member

    Jan 18, 2009
    36
    0
    Oh ya, it is versatile ....
    it has one serial input ....
    and 7 digital IO..
    for digital IO, no further modification needed ..
    As for me, i will need to know which data buses involved in sending the values.

    for serial, uart routine needed.
     
  4. sanwa

    Thread Starter Active Member

    Jan 18, 2009
    36
    0
    I am getting this when i emailed the author months ago...i wonder what does it means:
     
    • 67.PNG
      67.PNG
      File size:
      18.6 KB
      Views:
      31
  5. sanwa

    Thread Starter Active Member

    Jan 18, 2009
    36
    0
    Well.... it is OK. Thanks for the reply.
    Which means using programming, i can set RB0 as a single Digital output from the PIC? ;)

    Any assembly master here?
     
  6. sanwa

    Thread Starter Active Member

    Jan 18, 2009
    36
    0
    I just figured out that ..... for the meter, when I use my finger to touch on the LOAD + and step on the floor .. there is data transmitting over the RF module but no reading at the meter .. strange... what phenomena is that pls?
     
  7. sanwa

    Thread Starter Active Member

    Jan 18, 2009
    36
    0
    From the asm source code, there are calculations on the watt and ampere hour.
    But for my project, i intended to get only the ampere hour reading out. So I tried my best to study the asm code though i am numb in asm.

    Calculating the ampere hour
    Code ( (Unknown Language)):
    1.  
    2. calc_Ah:
    3.     add1632    Amps,AmpSum    ; AmpSum = accumulated Amps
    4.     mov32    AmpSum,dd
    5.     movi16    3600*3,aa    ; 3 reads per second, 3600 seconds per hour
    6.     call    Div32        ; AmpHours = AmpSum  / (reads per hour)
    7. store_Ah:
    8.     mov16    dd+2,AmpHours
    9.  
    And here is the part to display the reading at a 16x2 line LCD
    Code ( (Unknown Language)):
    1.  
    2. .....
    3. call    Show_AmpHours     ; "9999.9W 99.99Ah"
    4. .....
    5.  
    But the code is intended to display it on the LCD. How to modify it so that i can directly get a single stream for only the ampere hour data out from a PIC?
     
Loading...