(→‎Hugh Piggott wind turbine: fixing WYFSD reference)
m (Standardize wikitext)
 
(40 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<br clear="all" />
[[File:Dcenergymonitor01.jpg|thumb]]


[[Image:Dcenergymonitor01.jpg|thumb|right|The DC energy monitoring electronics]]
{{Project data
[[Image:Dcenergymonitor08.jpg|thumb|right|The wind turbine]]
| authors = User:TrystanLea
| completed = 2009
| made = Yes
| replicated = No
| instance-of = Arduino
}}


==Introduction==
[[File:Dcenergymonitor08.jpg|thumb|The wind turbine]]


The electronics and software detailed here measures quantities related to DC electrical energy production from micro-renewables. Including: Voltage, Current and Power. (It will soon measure total energy produced and a few other useful quantities)
The electronics and software detailed here measures quantities related to DC electrical energy production from micro-renewables. Including: Voltage, Current and Power. (It will soon measure total energy produced and a few other useful quantities)


These values are useful for:  
These values are useful for:
Sizing the loads - how many lights, computers, batteries etc can be connected. Monitoring the state of charge of the batteries. Monitoring the performance of the system. Identifying any faults.  
Sizing the loads - how many lights, computers, batteries etc can be connected. Monitoring the state of charge of the batteries. Monitoring the performance of the system. Identifying any faults.


'''Note:''' Initial rough tests seem good, further calibration and more detailed tests to find out the performance and accuracy are needed however.  
'''Note:''' Initial rough tests seem good, further calibration and more detailed tests to find out the performance and accuracy are needed however.


This project is work in progress, it is part of: [http://openenergymonitor.org The open energy monitor project] - a project to develop and build open source energy monitoring and analysis tools for energy efficiency and distributed renewable microgeneration.
This project is work in progress, it is part of: [http://openenergymonitor.org The open energy monitor project] - a project to develop and build open source energy monitoring and analysis tools for energy efficiency and distributed renewable microgeneration.


==How it works and how to build it==
== How it works and how to build it ==


'''Some brief theory'''
'''Some brief theory'''
Line 25: Line 30:
The DC energy monitor detailed here uses the current sensing resistor (also known as a shunt) method to measure the current. It uses an Arduino to process the output of the initial voltage and current sensing circuit and to send values for voltage, current and power to a computer for graphing via USB.
The DC energy monitor detailed here uses the current sensing resistor (also known as a shunt) method to measure the current. It uses an Arduino to process the output of the initial voltage and current sensing circuit and to send values for voltage, current and power to a computer for graphing via USB.


From the [http://www.arduino.cc/ Arduino website:]
From the [https://www.arduino.cc/ Arduino website:]
''Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.''  
''Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.''


The DC energy monitor is best described in 3 parts:
The DC energy monitor is best described in 3 parts:
Line 35: Line 40:
* The Computer based software
* The Computer based software


===Electronics side===
=== Electronics side ===


[[Image:DCcurrentSense.jpg |thumb|right|Circuit schematic: electrical energy production monitor]]
[[File:DCcurrentSense.jpg|thumb|Circuit schematic: electrical energy production monitor]]


I came across the circuit design and a lot of good circuit examples of DC current sensing and advice on the linear technologies website [http://www.linear.com/ad/current_sense.jsp here]. The circuit above is half of the battery current monitor circuit which can be found in their [http://www.linear.com/ad/08-dc.pdf DC pdf]. Half is only needed since for measuring current flowing from a micro-generator to a load the current only flows in one direction. The battery monitoring circuit measures current flowing in two directions: current flowing to the battery - charging and current flowing from the battery discharging. I have built the battery monitor circuit so that I can use it for both applications if I need to and the added expense is small. When measuring the total output of the turbine only half of the circuit is needed.
I came across the circuit design and a lot of good circuit examples of DC current sensing and advice on the linear technologies website [http://www.linear.com/ad/current_sense.jsp here]. The circuit above is half of the battery current monitor circuit which can be found in their [http://www.linear.com/ad/08-dc.pdf DC pdf]. Half is only needed since for measuring current flowing from a micro-generator to a load the current only flows in one direction. The battery monitoring circuit measures current flowing in two directions: current flowing to the battery - charging and current flowing from the battery discharging. I have built the battery monitor circuit so that I can use it for both applications if I need to and the added expense is small. When measuring the total output of the turbine only half of the circuit is needed.


====Voltage measurement====
==== Voltage measurement ====


The voltage is measured using a simple voltage divider to bring the voltage within 0-5V Arduino input voltage requirements. A 12V wind turbine's voltage will vary depending on wind speed and on the load placed on the output. The output of the voltage divider is connected to analog pin 0 of the Arduino.
The voltage is measured using a simple voltage divider to bring the voltage within 0-5V Arduino input voltage requirements. A 12V wind turbine's voltage will vary depending on wind speed and on the load placed on the output. The output of the voltage divider is connected to analog pin 0 of the Arduino.


I'm using resistor values of RVDa = 100kΩ and RVDb=10kΩ for the voltage divider this scales the voltage down just under 11 times keeping it well within the Arduino range.
I'm using resistor values of RVDa = 100kΩ and RVDb=10kΩ for the voltage divider this scales the voltage down just under 11 times keeping it well within the Arduino range.


====Current measurement====
==== Current measurement ====


The current is measured by measuring the voltage drop across a low resistance current sensing resistor placed in between the positive terminal of the load and the positive terminal of the micro-generator (also known as high side current sensing).
The current is measured by measuring the voltage drop across a low resistance current sensing resistor placed in between the positive terminal of the load and the positive terminal of the micro-generator (also known as high side current sensing).
Line 61: Line 66:
<math>V_{out} = I_L(R_B/R_A)R_{sense}</math>
<math>V_{out} = I_L(R_B/R_A)R_{sense}</math>


Taking the example of the 500W Hugh Piggott wind turbine. If the voltage at 500W is 12V then the current will be about 42Amps. I ordered my shunt from farnell and the cheapest one they had available that was rated above 42Amps was [http://uk.farnell.com/datel/3020-01099-0/shunt-50mv-100a/dp/1339340 this one]. Its resistance is 0.0005Ω (0.5mΩ) which dictates along with the voltage out needed the values of RA and RB. If used RA = 1kΩ and RB = 220kΩ which gives a voltage out of 4.62V at 42Amps.
Taking the example of the 500W Hugh Piggott wind turbine. If the voltage at 500W is 12V then the current will be about 42Amps. I ordered my shunt from farnell and the cheapest one they had available that was rated above 42Amps was [https://web.archive.org/web/20161201101501/http://uk.farnell.com:80/datel/3020-01099-0/shunt-50mv-100a/dp/1339340? this one]. Its resistance is 0.0005Ω (0.5mΩ) which dictates along with the voltage out needed the values of RA and RB. If used RA = 1kΩ and RB = 220kΩ which gives a voltage out of 4.62V at 42Amps.


'''To build:'''
'''To build:'''
Line 73: Line 78:
  '''2x''' 1kΩ resistors for RA. (4x for battery monitor)
  '''2x''' 1kΩ resistors for RA. (4x for battery monitor)
  '''1x''' 100kΩ resistors for RVDa
  '''1x''' 100kΩ resistors for RVDa
  '''1x''' 10kΩ resistors for RVDb
  '''1x''' 10kΩ resistors for RVDb
  '''1x''' 2N3904 transistors. (2x for battery monitor)
  '''1x''' 2N3904 transistors. (2x for battery monitor)
  '''1x''' stripboard (for mounting the above)
  '''1x''' stripboard (for mounting the above)
Line 82: Line 87:
Here are some close-ups of the my board, if you need any guidance on layout, something that's always a challenge...
Here are some close-ups of the my board, if you need any guidance on layout, something that's always a challenge...


[[Image:Dcenergymonitor04.JPG|thumb|left|Circuit layout: bottom]]
[[File:Dcenergymonitor04.JPG|thumb|left|Circuit layout: bottom]]
[[Image:Dcenergymonitor05.JPG|thumb|none|Circuit layout: top]]


===Software side===
[[File:Dcenergymonitor05.JPG|thumb|none|Circuit layout: top]]


====On the Arduino====
=== Software side ===
 
==== On the Arduino ====


The Arduino reads in the signals connected to its analog input pins 0,1. It converts the analog signals to digital information which can be manipulated within the program uploaded to the Arduino.
The Arduino reads in the signals connected to its analog input pins 0,1. It converts the analog signals to digital information which can be manipulated within the program uploaded to the Arduino.
Line 103: Line 109:
# Check that values are being sent from the Arduino in the Arduino serial monitor.
# Check that values are being sent from the Arduino in the Arduino serial monitor.


====On the Computer====
==== On the Computer ====


The ArduinoComm java program (link below) reads the values sent from the Arduino. The program outputs the values to the terminal window. Terminal is then used to write the printed data to a file for storage. The data file can be opened simultaneously by KST for real-time graphing.
The ArduinoComm java program (link below) reads the values sent from the Arduino. The program outputs the values to the terminal window. Terminal is then used to write the printed data to a file for storage. The data file can be opened simultaneously by KST for real-time graphing.


KST is a free and open source scientific data graphing software that can be downloaded from their [http://kst.kde.org/ site].  
KST is a free and open source scientific data graphing software that can be downloaded from their [http://kst.kde.org/ site].


'''To do this:'''
'''To do this:'''


# Download the ArduinoComm java program [http://openenergymonitor.org/emon/node/53 here.]
# Download the ArduinoComm java program [https://web.archive.org/web/20120419004351/http://openenergymonitor.org:80/emon/node/53 here.]
# Compile the program. For a 'How to' on compiling and running java programs have a look [http://openenergymonitor.org/emon/node/11 here].
# Compile the program. For a 'How to' on compiling and running java programs have a look [http://openenergymonitor.org/emon/node/11 here].
# Run the program with $ java programName >tmp.dat. The addition of >tmp.dat at the end of the run command line writes the data outputed by the java program to a file for storage.
# Run the program with $ java programName >tmp.dat. The addition of >tmp.dat at the end of the run command line writes the data outputed by the java program to a file for storage.
Line 117: Line 123:
# Configure KST to open the tmp.dat file.
# Configure KST to open the tmp.dat file.


==Testing==
== Testing ==
 
=== Hugh Piggott wind turbine ===
 
[[File:Dcenergymonitor06.JPG|thumb|Wind turbine under test]]


===Hugh Piggott wind turbine===
[[File:Dcenergymonitor07.JPG|thumb|The monitoring setup]]


[[Image:Dcenergymonitor06.JPG|thumb|right|Wind turbine under test]]
[[File:Dcenergymonitor08.png|thumb|Graph output of power]]
[[Image:Dcenergymonitor07.JPG|thumb|right|The monitoring setup]]
[[Image:Dcenergymonitor08.png|thumb|right|Graph output of power]]


The DC energy monitor was needed to measure the output of two wind turbines I helped build over the last two years: The North Wales wind turbine built on a week long workshop organised by myself, V3 Power and [http://www.dyfodol.org/ Dyfodol] (formerly the WYFSD), and the [http://cardiffwind.blogspot.com/ wind turbine] built as a training project with the Cardiff branch of Engineers Without Borders. Both wind turbine are [http://scoraigwind.com/ Hugh Piggott] designed 12V DC machines. They can produce up to around 500W of power.  
The DC energy monitor was needed to measure the output of two wind turbines I helped build over the last two years: The North Wales wind turbine built on a week long workshop organised by myself, V3 Power and [https://web.archive.org/web/20160305215348/http://dyfodol.org/ Dyfodol] (formerly the WYFSD), and the [https://cardiffwind.blogspot.com/ wind turbine] built as a training project with the Cardiff branch of Engineers Without Borders. Both wind turbine are [http://scoraigwind.com/ Hugh Piggott] designed 12V DC machines. They can produce up to around 500W of power.


The DC energy monitor was connected up between the wind turbine and the battery, the wind blew, and the results can be seen in the graph of output power. Hitting 500W was very exiting!
The DC energy monitor was connected up between the wind turbine and the battery, the wind blew, and the results can be seen in the graph of output power. Hitting 500W was very exiting!


==Contact==
== Contact ==


Please don't hesitate to contact me if you have any questions.
Please don't hesitate to contact me if you have any questions.


My email is: trystan dot lea at googlemail dot com  
My email is: trystan dot lea at googlemail dot com
or on the discussion page.
or on the discussion page.


Line 144: Line 152:
For more information on Hugh Piggott and his wind turbine designs: http://scoraigwind.com/
For more information on Hugh Piggott and his wind turbine designs: http://scoraigwind.com/


The Arduino project: http://www.arduino.cc/
The Arduino project: [https://www.arduino.cc/ http://www.arduino.cc/]


{{Page data
| keywords = arduino, electricity, micro controller, voltage and current measurement, resistors, stripboard, transistors
| sdg = SDG07 Affordable and clean energy, SDG09 Industry innovation and infrastructure, SDG11 Sustainable cities and communities
| published = 2009
| organizations = Category:Open Energy Monitor
| license = CC-BY-SA-3.0
| language = en
}}


[[Category:Projects]]
[[Category:Electricity]]
[[Category:Electricity]]
[[Category:Energy]]
[[Category:Energy]]

Latest revision as of 12:01, 28 February 2024

Dcenergymonitor01.jpg
FA info icon.svg Angle down icon.svg Project data
Authors Trystan Lea
Completed 2009
Made Yes
Replicated No
Instance of Arduino
OKH Manifest Download
The wind turbine

The electronics and software detailed here measures quantities related to DC electrical energy production from micro-renewables. Including: Voltage, Current and Power. (It will soon measure total energy produced and a few other useful quantities)

These values are useful for: Sizing the loads - how many lights, computers, batteries etc can be connected. Monitoring the state of charge of the batteries. Monitoring the performance of the system. Identifying any faults.

Note: Initial rough tests seem good, further calibration and more detailed tests to find out the performance and accuracy are needed however.

This project is work in progress, it is part of: The open energy monitor project - a project to develop and build open source energy monitoring and analysis tools for energy efficiency and distributed renewable microgeneration.

How it works and how to build it[edit | edit source]

Some brief theory

Taking an example of a basic micro-renewable energy installation: A 12V DC wind turbine connected to a 12V battery. It is possible to measure two quantities directly: the voltage of the turbine and battery and the current flowing between the turbine and the battery. If we take a reading of these quantities at any instant and multiply them together we get a value for power, the rate at which energy is transmitted, from the wind turbine to the battery.

Brief overview of method

The DC energy monitor detailed here uses the current sensing resistor (also known as a shunt) method to measure the current. It uses an Arduino to process the output of the initial voltage and current sensing circuit and to send values for voltage, current and power to a computer for graphing via USB.

From the Arduino website:

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.

The DC energy monitor is best described in 3 parts:

  • The Electronics
  • The Arduino based software
  • The Computer based software

Electronics side[edit | edit source]

Circuit schematic: electrical energy production monitor

I came across the circuit design and a lot of good circuit examples of DC current sensing and advice on the linear technologies website here. The circuit above is half of the battery current monitor circuit which can be found in their DC pdf. Half is only needed since for measuring current flowing from a micro-generator to a load the current only flows in one direction. The battery monitoring circuit measures current flowing in two directions: current flowing to the battery - charging and current flowing from the battery discharging. I have built the battery monitor circuit so that I can use it for both applications if I need to and the added expense is small. When measuring the total output of the turbine only half of the circuit is needed.

Voltage measurement[edit | edit source]

The voltage is measured using a simple voltage divider to bring the voltage within 0-5V Arduino input voltage requirements. A 12V wind turbine's voltage will vary depending on wind speed and on the load placed on the output. The output of the voltage divider is connected to analog pin 0 of the Arduino.

I'm using resistor values of RVDa = 100kΩ and RVDb=10kΩ for the voltage divider this scales the voltage down just under 11 times keeping it well within the Arduino range.

Current measurement[edit | edit source]

The current is measured by measuring the voltage drop across a low resistance current sensing resistor placed in between the positive terminal of the load and the positive terminal of the micro-generator (also known as high side current sensing).

This voltages is in turn amplified by the LT1495 op amp chip and the 2N3904 transistor. The LT1495 is quite an expensive chip, it would be good to find a cheaper one sacrificing on accuracy a little. The op-amp needs to be able to take above supply input voltages.

The amplified output voltage corresponding to the current going to the load is then connected to analog pin 1 of the Arduino.

The range of current that can be measured by the circuit is defined by Rsense, RA and RB. The output voltage needs to be again between 0 and 5V.

The Voltage out from the current sensing circuit is given by:

Taking the example of the 500W Hugh Piggott wind turbine. If the voltage at 500W is 12V then the current will be about 42Amps. I ordered my shunt from farnell and the cheapest one they had available that was rated above 42Amps was this one. Its resistance is 0.0005Ω (0.5mΩ) which dictates along with the voltage out needed the values of RA and RB. If used RA = 1kΩ and RB = 220kΩ which gives a voltage out of 4.62V at 42Amps.

To build:

List of components required
1x Arduino
1x LT1495 Opamp
1x 8pin DIL chip holder
1x 0.0005Ω current sensing resistor (Rsens).
1x 220kΩ resistors for RB. (2x for battery monitor)
2x 1kΩ resistors for RA. (4x for battery monitor)
1x 100kΩ resistors for RVDa
1x 10kΩ resistors for RVDb
1x 2N3904 transistors. (2x for battery monitor)
1x stripboard (for mounting the above)
Wire, connectors...

Layout suggestion

Here are some close-ups of the my board, if you need any guidance on layout, something that's always a challenge...

Circuit layout: bottom
Circuit layout: top

Software side[edit | edit source]

On the Arduino[edit | edit source]

The Arduino reads in the signals connected to its analog input pins 0,1. It converts the analog signals to digital information which can be manipulated within the program uploaded to the Arduino.

The first step is to convert this raw analog input information into voltage and current values. The power can then be calculated simply by multiplying the voltage value with the current value.

The Voltage, Current and Power values are then sent along the USB to the computer.

This is all detailed in full in the Arduino sketch (program).

To implement:

  1. Download the Arduino sketch here
  2. Compile and upload the Arduino sketch to the Arduino. For a 'How to' on compiling and uploading the sketch to the Arduino, have a look here
  3. Check that values are being sent from the Arduino in the Arduino serial monitor.

On the Computer[edit | edit source]

The ArduinoComm java program (link below) reads the values sent from the Arduino. The program outputs the values to the terminal window. Terminal is then used to write the printed data to a file for storage. The data file can be opened simultaneously by KST for real-time graphing.

KST is a free and open source scientific data graphing software that can be downloaded from their site.

To do this:

  1. Download the ArduinoComm java program here.
  2. Compile the program. For a 'How to' on compiling and running java programs have a look here.
  3. Run the program with $ java programName >tmp.dat. The addition of >tmp.dat at the end of the run command line writes the data outputed by the java program to a file for storage.
  4. Open KST for graphing.
  5. Configure KST to open the tmp.dat file.

Testing[edit | edit source]

Hugh Piggott wind turbine[edit | edit source]

Wind turbine under test
The monitoring setup
Graph output of power

The DC energy monitor was needed to measure the output of two wind turbines I helped build over the last two years: The North Wales wind turbine built on a week long workshop organised by myself, V3 Power and Dyfodol (formerly the WYFSD), and the wind turbine built as a training project with the Cardiff branch of Engineers Without Borders. Both wind turbine are Hugh Piggott designed 12V DC machines. They can produce up to around 500W of power.

The DC energy monitor was connected up between the wind turbine and the battery, the wind blew, and the results can be seen in the graph of output power. Hitting 500W was very exiting!

Contact[edit | edit source]

Please don't hesitate to contact me if you have any questions.

My email is: trystan dot lea at googlemail dot com or on the discussion page.

External links[edit | edit source]

For the version of this page documented on openenergymonitor have a look here: 12V DC Invasive

The open energy monitor project: http://openenergymonitor.org

For more information on Hugh Piggott and his wind turbine designs: http://scoraigwind.com/

The Arduino project: http://www.arduino.cc/

Cookies help us deliver our services. By using our services, you agree to our use of cookies.