Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Atmega16 Wattmeter How to make

Status
Not open for further replies.

Michael_N

Member level 2
Joined
Jan 11, 2012
Messages
47
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Denmark
Activity points
1,685
Hi,

I'm trying to make a wattmeter with an atmega16 processor.
I'm pretty new to programming, I have some experience using the adc as an voltmeter.

How can I make the wattmeter?
I have to measure one a DC 0-99V up to 250W

I have searched on the topic and there is a lot of posts, but most are regarding PIC processors.

Any help is appreciated:)

Best Regards
Michael
 

It is not a problem that the examples you found are all implemented using PIC uc. Once you understand the code and how it works you can write it to work with any uc.
There is an important question : Do you know how to write a simple programs for example to blink LED's?

Abeer :twisted:
 

It is not a problem that the examples you found are all implemented using PIC uc. Once you understand the code and how it works you can write it to work with any uc.
There is an important question : Do you know how to write a simple programs for example to blink LED's?

Abeer :twisted:

Hi,

Yes I can make leds blink... turn them on and off with the switches and/or by gates.
I have just began to play with interrupts

But there is a lot of things I dont know.... But I have to start somewhere:)

thanks for your reply
 

So, you've used it for 0 to 5V?

Then, use a voltage divider to step down the voltage so that 100V corresponds to 5V. Have a zener diode at the output to prevent over voltage damage.
So, now, 100V corresponds to 5V.
So, 1V corresponds to 5/100 V = 1/20V

5V -> 1023
So, 1/20V -> 51.15 (rounded off to 51).

So, 1 step in your 10-bit ADC represents (51/1023) * 5 = 0.249V ≈ 0.25V

Then, use this info in your code and do ADC result processing as required.

You may change the scaling factor (100V:5V) as required.

Hope this helps.
Tahmid.
 

Thanks.

Actually I have already done that, when I made a voltmeter. I wanted to measure a voltage above 5V.
I'm aware of making a voltage divider.

But how would you measure the energy consumption?
One of my ideas is to put a coil around the cable to be measuered, and then use the inducted voltage to measure from.
Or I have read that you can put a resistor on the load and then measure a voltage across the resistor. But I read that it wouldn't be linear so it probaly wont work.



So, you've used it for 0 to 5V?

Then, use a voltage divider to step down the voltage so that 100V corresponds to 5V. Have a zener diode at the output to prevent over voltage damage.
So, now, 100V corresponds to 5V.
So, 1V corresponds to 5/100 V = 1/20V

5V -> 1023
So, 1/20V -> 51.15 (rounded off to 51).

So, 1 step in your 10-bit ADC represents (51/1023) * 5 = 0.249V ≈ 0.25V

Then, use this info in your code and do ADC result processing as required.

You may change the scaling factor (100V:5V) as required.

Hope this helps.
Tahmid.
 
Last edited:

I have never worked with a Hall effect sensor before... I will look into it.

Thanks alot for your help.

Best regards
Michael
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top