Julian Rogers Home Radiometer 1

Under Construction

Radiometer 2

ZTX450

Adafruit ads1015 analog to digital module.

Adafruit bmp280 air pressure and temperature module.

Sparkfun level shifter.

2 x 7555 timer ICs.

Circuit PCB

Cover / box

This rather ropey-looking box or cover for the circuit was made on my new Balco 3-D printer (purchased from Aldi!?)

The box was designed on FreeCAD which has a steep learning curve!

Black PLS filament seems to show up all the texture and slight imperfections of the print. However, you can’t easily see the base as it’s under the base!

// radiometer + air pressure and temp on UNO

// 6.12.18

// runs at about 500 samples / sec

// val is variable holding raw adc values. count is number of adc samples

// period is time sampled. rpm is raw val / adj factor.

// exact value to be determined by calibration

// srpm is averaged rpm. prpm srpm converted to integer.

// pv is adc reading from photo voltaic cell.

// Adafruit module output is degrees C * 10 and millibars *10

// radiometer is on channel 0, pv on channel 3 of of Adafruit asd1015 module


long val = 0, adj = 8, count = 0, srpm = 0, tempture, pressure;

unsigned long timeNow;

int rpm = 0, prpm = 0, pv = 0, period = 2000, temp, pres;

int rpms[5];

String dataStr = "";


#include <Wire.h>

#include <Adafruit_ADS1015.h>

#include <SPI.h>

#include <Adafruit_Sensor.h>

#include <Adafruit_BMP280.h>

 

// set I2C address - link to SDA

Adafruit_ADS1015 ads1015(0x4A);

Adafruit_BMP280 bme; // operating on I2C

//---------------------------------------------------------------

void setup() {

  

  //ads1015.setGain(GAIN_EIGHT);      // 8x gain   +/- 0.512V  1 bit = 0.25mV

  // without above, gain will be default which is 2/3

  Serial.begin(9600);

  ads1015.begin();

  bme.begin();

}

//----------------------------------------------------------------

void loop() {

 

  timeNow = millis();


  while(millis() < timeNow + period){

    val = val +  ads1015.readADC_SingleEnded(0);

    count++;

  }


  val = val / count; // average the reading


  count = 0;

  rpm = int(round(val / adj));

  // shift up previous results

  for(int i = 4; i > 0; i--){

    rpms[i] = rpms[i-1];

  }

  

  // store the result in array

  rpms[0] = rpm;

  // produce a running average

  for(int i = 0; i <= 4; i++){

    srpm = srpm + rpms[i];

  }

  srpm = srpm / 5;  // provisional adjustment factor is 5 pending calibration

  prpm = int(round(srpm));

  pv = ads1015.readADC_SingleEnded(3);

  tempture = bme.readTemperature();

  temp = int(round(tempture * 10));

  pressure = bme.readPressure();

  pres = int(round(pressure/10));


  dataStr += String(prpm);

  dataStr += ":";

  dataStr += String(pv);

  dataStr += ":";

  dataStr += String(temp);

  dataStr += ":";

  dataStr += String(pres);

  // output on serial for reception by RPi running a Python program

  Serial.println(dataStr);

        

  dataStr = "";


}

//-------------------------------------------------------


The software below runs on an Arduino type board and outputs the rotation, pv voltage, air pressure and temperature over serial. I intend this to be received by a Raspberry Pi running a Python program which will process the data. Exactly how it will do this remains to be decided.

To analyse the “horticultural effect” of the sun I need to calculate the total energy falling on the radiometer over, say, a year. One way to get an indication might be simply count the number of revolutions and then insert this number into a formula. However, I have designed the system to, in effect, output instantaneous values so this won’t be possible.

Another thought, perhaps I also need to measure the time the energy was over a certain level?