AquaticTechTank.net

A forum dedicated to design and program aquatic tanks
It is currently Tue Jan 16, 2018 8:18 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: DIY PAR meter
PostPosted: Mon Jan 21, 2013 6:49 pm 
Offline
Site Admin

Joined: Fri Nov 30, 2012 1:54 pm
Posts: 275
*Edit 3-27-2015
See this post for final product and code.
viewtopic.php?f=11&t=150&start=10#p508

Final product list:

Photodiode: VTB8441BH
price: $5.20
http://www.alliedelec.com/search/produc ... U=70219652

Cosine diffuser: 1/8" thickness, 2447 white plexiglass
price: varies, get the sample or buy a big sheet of it.
http://www.eplastics.com/Plastic/Ple...lack_and_White
http://www.usplastic.com/catalog/item.aspx?itemid=23681

Basic 16x2 Character LCD - Black on Green 5V
price: $14 but you can get it cheaper on e b a y
http://www.sparkfun.com/products/255

Arduino Uno
price: $30
http://www.sparkfun.com/products/10356
http://www.sparkfun.com/products/11021 (newer model)


Diagram
Where there are the 4k & 1K resistors to control the brightness of the LCD, there should be a potentiometer there. Here's tutorial on how to user the LCD library and hookup.
http://arduino.cc/en/Tutorial/LiquidCrystal

Attachment:
PAR_diagram.jpg
PAR_diagram.jpg [ 47.29 KiB | Viewed 11228 times ]


or

use HJ1602A LCD with this schematic
Image



Final Code
Code:
// CLOSE ENOUGH PAR Written in Arduino 23 By MISTERGREEN

#include <LiquidCrystal.h> // modified by O2surplus to include correct LCD pinout for "CLOSE ENOUGH PAR Meter" V1.0
                           //  Code also includes provision for seial output of PAR values to a PC.
float average = 0;
float output = 0;
float factor = 1.52;
unsigned long time;
int counter = 0;
// create the LCD
LiquidCrystal lcd(8, 7, 5, 4, 16, 2);
// set up backlight
int bkl = 6; // backlight pin

void setup() {
  time = millis();
  // set up the LCD's number of rows and columns:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("CLOSE ENOUGH PAR");
  pinMode(bkl, OUTPUT);
  digitalWrite(bkl, HIGH);
  // initialize the serial communication:
  Serial.begin(115200); // Max for Arduino Uno
}

void loop() {

  int sensorValue = analogRead(0);
  average += sensorValue;
  counter++;

  //every second or 1000 millis
  if(millis() > time+1000) {
    //corrections to fit par
    average = average/counter;

    if(average <= 560) {
      factor = 1.55;
    }
    else {
      factor = 1.36;
    }
    //corrects for high PAR
    output = average * factor;

    // set the cursor to column 0, line 1
    // (note: line 1 is the second row, since counting begins with 0):
    lcd.setCursor(0, 1);
    // print the number of seconds since reset:
    lcd.print(output);
    // send PAR data to the Serial output.
    Serial.println(output);
   
    //reset timer & counter to get ready for the next second.
   time = millis();
   counter = 0;
   average = 0;
   
  }

}


Top
 Profile  
 
 Post subject: Re: DIY PAR meter
PostPosted: Mon Jan 21, 2013 6:52 pm 
Offline
Site Admin

Joined: Fri Nov 30, 2012 1:54 pm
Posts: 275
The project started very humbly with a photodiode with a wide range that wasn't up to reading PAR.

Image

Image

I then found other projects out there.
http://www.colorado.edu/eeb/facultysite ... niel03.pdf
http://citeseerx.ist.psu.edu/viewdoc/do ... 1&type=pdf


Top
 Profile  
 
 Post subject: Re: DIY PAR meter
PostPosted: Mon Jan 21, 2013 6:57 pm 
Offline
Site Admin

Joined: Fri Nov 30, 2012 1:54 pm
Posts: 275
I then found the VTB8441BH and thought about userbility and things went under way for building a nifty gadget.
Image

Image

Image

Image

Image

Image


Top
 Profile  
 
 Post subject: Re: DIY PAR meter
PostPosted: Mon Jan 21, 2013 7:01 pm 
Offline
Site Admin

Joined: Fri Nov 30, 2012 1:54 pm
Posts: 275
I soon realized I needed a PAR meter to make calibrations with and can't rely on readings from other people. Light bulb, and reflector vary in output. The 27K resistance needed to be flexible too for calibration purposes. So a pot is in place of the 27K. It's easier than messing with the code with every unit.

Image

Image


Top
 Profile  
 
 Post subject: Re: DIY PAR meter
PostPosted: Mon Jan 21, 2013 7:06 pm 
Offline
Site Admin

Joined: Fri Nov 30, 2012 1:54 pm
Posts: 275
With the help of O2Surplus, we went ahead and made the sensor more easy to produce if anybody wants one.

Image

The final product.
Image


Top
 Profile  
 
 Post subject: Re: DIY PAR meter
PostPosted: Tue Jan 22, 2013 4:21 am 
Offline

Joined: Mon Jan 14, 2013 11:36 pm
Posts: 9
Any chance at getting the pcb file uploaded so that anyone can get the board made who wants one?


Top
 Profile  
 
 Post subject: Re: DIY PAR meter
PostPosted: Tue Jan 22, 2013 9:48 am 
Offline
Site Admin

Joined: Fri Nov 30, 2012 1:54 pm
Posts: 275
JairunCaloth wrote:
Any chance at getting the pcb file uploaded so that anyone can get the board made who wants one?


I'll have to get it from o2surplus.


Sent from my iPad using Tapatalk HD


Top
 Profile  
 
 Post subject: Re: DIY PAR meter
PostPosted: Tue Jan 22, 2013 10:46 am 
Offline

Joined: Mon Dec 10, 2012 5:46 pm
Posts: 4
mistergreen wrote:
JairunCaloth wrote:
Any chance at getting the pcb file uploaded so that anyone can get the board made who wants one?


I'll have to get it from o2surplus.


Sent from my iPad using Tapatalk HD


Here's both versions-


Attachments:
CLOSE ENOUGH PAR METER.zip [128.33 KiB]
Downloaded 586 times
Top
 Profile  
 
 Post subject: Re: DIY PAR meter
PostPosted: Tue Jan 22, 2013 5:34 pm 
Offline

Joined: Mon Jan 14, 2013 11:36 pm
Posts: 9
Awesome, thanks a bunch O2Surplus.
When I find a new job and have a bit of spare cash I will probably get a few boards made.
FYI: Anyone who attempts to use this in Ubuntu 12.04. The version of eagle in the repo is too old to work with these files. You will want to download and install the latest version manually.


Top
 Profile  
 
 Post subject: Re: DIY PAR meter
PostPosted: Sun Jan 27, 2013 12:37 am 
Offline

Joined: Sun Jan 27, 2013 12:03 am
Posts: 5
I was watching this over on TPT. Awesome work and great idea!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Copyright 2noodles LLC 2012