DIY Arduino meter for Apogee SQ-120 Sensor - The Planted Tank Forum
 4Likes
  • 1 Post By mistergreen
  • 1 Post By mistergreen
  • 1 Post By jeffkrol
 
LinkBack Thread Tools Display Modes
post #1 of 7 (permalink) Old 01-25-2017, 06:30 PM Thread Starter
Children Boogie
 
mistergreen's Avatar
 
Join Date: Dec 2006
Location: Cincinnati
Posts: 16,743
DIY Arduino meter for Apogee SQ-120 Sensor

You can use a voltmeter to get the mV output of the sensor and * 5 to the reading to get the PAR value.
I realized you can use an Arduino to read mV so I made a meter for the sensor.
I had a spare CEP meter I can mod.

First, I needed to break the VCC connection. It's easier to heat the area with a soldering iron then scrape with a x-acto knife until the connection is broken.




Then connect it to Ground




Remove these resistor and Pot





And then connect the sensor into the meter.



Code:
// get PAR for apogee SQ-120
// black & clear go to ground
// red go to A0
// Code also includes provision for seial output of PAR values to a PC.


#include <LiquidCrystal.h> 

float average = 0;    // gets average of PAR(photons) / second - give more stable readings
unsigned long time_sec; 
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_sec = millis();
  
  // set up the LCD's number of rows and columns: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("SQ-120 PAR Meter");
  pinMode(bkl, OUTPUT);
  digitalWrite(bkl, HIGH);
  // initialize the serial communication:
  Serial.begin(115200); // Max for Arduino Uno

   analogReference(INTERNAL); //UNO
  //analogReference(INTERNAL1V1) // mega
  
}

void loop() {

  int sensorValue = analogRead(A0);
  // Convert the analog reading (which goes from 0 - 1023) * 1.1V reference for Volt * convert to mV * 5 to get PAR
  float par = sensorValue * (1.1 / 1023.0) * 1000 * 5;
      
  average += par;
  counter++;

  //every second or 1000 millis
  if(millis() > time_sec+1000) {
      average = average/counter;

      // 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(average);
      lcd.print("   ");
      
      
      // send PAR data to the Serial output.
      Serial.print(average);

      //reset timer & counter to get ready for the next second.
      time_sec = millis();
      counter = 0;
  }

  
  delay(5);

}
IUnknown likes this.


Last edited by mistergreen; 01-25-2017 at 08:09 PM. Reason: +
mistergreen is online now  
Sponsored Links
Advertisement
 
post #2 of 7 (permalink) Old 01-25-2017, 08:57 PM
Algae Grower
 
KarenSoCal's Avatar
 
Join Date: Jun 2016
Posts: 36
@mistergreen
I am in complete agreement with your post, and am impressed by it! Now, in English, could you give me a tiny hint what it is about?? LOL! Just teasing, but I really did not understand 1 word!
KarenSoCal is offline  
post #3 of 7 (permalink) Old 01-25-2017, 09:11 PM Thread Starter
Children Boogie
 
mistergreen's Avatar
 
Join Date: Dec 2006
Location: Cincinnati
Posts: 16,743
Quote:
Originally Posted by KarenSoCal View Post
@mistergreen
I am in complete agreement with your post, and am impressed by it! Now, in English, could you give me a tiny hint what it is about?? LOL! Just teasing, but I really did not understand 1 word!
lol, basically,
It's a PAR sensor meter. It's cheaper if you just buy the sensor and make your own meter

Different sensors will require different setup and code.
KarenSoCal likes this.

mistergreen is online now  
 
post #4 of 7 (permalink) Old 01-25-2017, 09:20 PM
Algae Grower
 
Vinster8108's Avatar
 
Join Date: Sep 2016
Location: Columbus, OH
Posts: 21
What sensor are you using for this?

Vinster8108 is offline  
post #5 of 7 (permalink) Old 01-25-2017, 10:46 PM
Algae Grower
 
KarenSoCal's Avatar
 
Join Date: Jun 2016
Posts: 36
Ok, so you know and understand lights!

Is intensity vs length of time on inversely proportional? In other words, if I dim my lights 50%, can I leave them on twice as long and get the same exposure for my plants? Remember...English! LOL!
KarenSoCal is offline  
post #6 of 7 (permalink) Old 01-25-2017, 10:52 PM
Planted Tank Guru
 
Join Date: Jun 2013
Location: WI
Posts: 6,648
Yes, simplistically speaking..
KarenSoCal likes this.

"A man with a watch knows what time it is. A man with two watches is never sure."
jeffkrol is online now  
post #7 of 7 (permalink) Old 01-25-2017, 11:53 PM Thread Starter
Children Boogie
 
mistergreen's Avatar
 
Join Date: Dec 2006
Location: Cincinnati
Posts: 16,743
Quote:
Originally Posted by Vinster8108 View Post
What sensor are you using for this?
in the title, Apogee SQ-120 Sensor.
It's not very good with LED lights though.

Quote:
Originally Posted by KarenSoCal View Post
Ok, so you know and understand lights!

Is intensity vs length of time on inversely proportional? In other words, if I dim my lights 50%, can I leave them on twice as long and get the same exposure for my plants? Remember...English! LOL!
yes,
light PAR is measured in photons per second and square meter (μmol m-2 s-1).
So it's per area per time, time and area does affect each other.


Last edited by Darkblade48; 01-26-2017 at 02:52 PM. Reason: Please use the edit function for back to back posts to keep threads cleaner
mistergreen is online now  
Reply

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the The Planted Tank Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in









Human Verification

In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.



Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome