# Source code for measuring volts and current in a circuit

did anyone having the source for measuring volts and current??

Google Openenergymonitor the site has it all

i can't find the source code there ,,,can you provide me the link.

Source code for measuring volts and current in a circuit

What circuit? What kind of voltage? AC or DC? Using what current sensor?

i dont have any knowledge about circuits ,,,but i have to measure current 1amp,and volts upto 9

raghul_emcee:
i dont have any knowledge about circuits ,,,but i have to measure current 1amp,and volts upto 9

AC or DC?

dc

The Arduino can real DC voltage in the range 0 to 5V. You'll need a voltage divider to get your 9V into range.

As far as reading the current, you need external hardware.

i want to measure between 220-240v,5A ,,,what are the sensors needed and what is the source code??
can you help me with this??

Hi,
What is your application, what do you want to do?

What is yout
(1) electronics
(2) programming
(3) arduino
(4) hardware
experience?

Is this a school/college/university project?

If you don't have a knowledge of circuits, I would suggest you do not try to measure anything until you do.
Measuring 240V and I doubt if you know the difference between AC or DC is not easy and highly dangerous if you have little or no knowledge.

Tom.....

hi Tom,its my university project, i want to measure the AC 220 5A current and transfer it to the android device via bluetooth ,,im done with data transfer but the electronic part is paused because of this ....can you help me with this?....

For sure, 240VAC you could burn something besides a board and components... like yourself.

i dont have any knowledge about circuits ,,,but i have to measure current 1amp,and volts upto 9

Should be safer and easier if it's steady.

The Arduino can real DC voltage in the range 0 to 5V. You'll need a voltage divider to get your 9V into range.

Suppose the lamp could be part of the voltage divider? Just guessing current could be gotten through Ohm's Law somehow.

Otherwise, if you run current through a wire loop, the field it makes is directly proportional to current and not at all to voltage. A linear Hall sensor could measure the field and watch for change in the case AC.

hey i am searching for a way to do ,,,,is there any options??

Well I am confused now!
You said you wanted to measure 9 volts, DC.
Then you said you want to measure 220 Volts AC.
I must guess, that next you want to measure the distance to the morning star.

Describe what you want to do.
Describe what hardware you have to do it with.
Show us your code as you have it now.
We will be happy to make suggestions.

Sure, you can use a current sensor
These are intended to me mounted somehow, read their output with Arduino (may need some additional interface/conditioning to get a 0-5V output) and then send the results via a Bluetooth module.
http://www.digikey.com/product-search/en?pv45=53&FV=fff4001e%2Cfff801ed%2C10d00019&k=current+sensor&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25

There are also portable measuring meters
http://www.digikey.com/product-search/en/test-and-measurement/equipment-electrical-testers-current-probes/2295024?k=fluke

"Source code for measuring volts and current in a circuit"

Why do you need to be measuring volts, because you already know it is 220 - 240 volts AC.
You do know that that voltage rating is RMS ?
Do you know what the peak voltage for that is?

The arduino can read analog voltage ( but you need to use a voltage divider to get it down to the 0 - 5 volt range)

Hi,
What experience do you have in electrical, electronics, hardware and programming.

When I went to university we had instructors/lecturers to ask these questions, in doing so we showed we were doing our own work towards our projects outcome.
Have you asked the technical guys at your university, that is what they are there for.

Trying to explain how to manage high voltages is difficult via keyboard, you need someone to look over your shoulder if you do not have an idea about what you are doing.

Tom...

he asked for code, here it is.(below)
from the site listed in reply #1

if he is not smart enough to find it from this link

Arduino sketch - voltage and current

my friends, you need to step up and dig deep to teach this guy the difference between DC and AC as well as how to read a web-site.