Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Troubleshooting Watt Meter

Status
Not open for further replies.

scomi

New Member
Watt Meter

Project reference: **broken link removed**

ASM code: **broken link removed**

Schematic: **broken link removed**

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:
**broken link removed**

*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:
**broken link removed**


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?

**broken link removed**

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.
 

Attachments

  • Troubleshooting Watt Meter.pdf
    35.5 KB · Views: 971
You haven't supplied enough information.
For instance, where is R15?
Are you taking the RPM from a wattmeter?
 
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.

You are correct. Load voltage is read at pin 17, RA0. Load current is measured as a voltage drop across a known resistor (the 1 ohm shunt) at pin 18, RA1. These two values are scaled and then multiplied to give the power in watts in the load.

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?

The voltage reading should be there all the time. Current should be zero unless a load is attached. You should not connect Load+ directly to Load- without a load resistor. I don't know about the last question.



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.
A reasonable range of load would be 20 ohms or higher. For testing, use a value of 100 ohms so that the battery lasts a few hours.
 
Last edited:
The last part of question 2 is like this:

I see from the asm codes, i found out that the reading is taken three times per second. So does that means, within one second, there are 3 readings (each time it displayed is the multiplication of V and I on that particular instant) for W and A?

And without connect any load to it, yes i get a zero values for all except V, once connected, the readings accumulated for Ah. But after I remove the load, the reading still keeps on increasing with small value. Is it caused by the internal or external circuitry? I tested that, a RF module does affect the reading as wireless got its power strength that may affect the reading.

And for most, question 3 is important to me. Anyone can guide me with it?

Anyway, really appreciate your help. Reputation given. Thanks again.:)
 
Last edited:
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:
calc_Ah:
	add1632	Amps,AmpSum	; AmpSum = accumulated Amps
	mov32	AmpSum,dd
	movi16	3600*3,aa	; 3 reads per second, 3600 seconds per hour
	call	Div32		; AmpHours = AmpSum  / (reads per hour)
store_Ah:
	mov16	dd+2,AmpHours

And here is the part to display the reading at a 16x2 line LCD
Code:
.....
call	Show_AmpHours 	; "9999.9W 99.99Ah"
.....

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?

I am just leaving this particular part, can someone kind enough guide me?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top