A forum dedicated to design and program aquatic tanks
It is currently Tue Feb 20, 2018 10:22 pm

All times are UTC - 5 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Jan 25, 2017 1:23 pm 
Site Admin

Joined: Fri Nov 30, 2012 1:54 pm
Posts: 275
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.


// 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;

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

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



Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 1 guest

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:  
Powered by phpBB® Forum Software © phpBB Group
Copyright 2noodles LLC 2012