Possible Green Algae?

Those smart plugs are cool! I bet if you opened one up you would see a ESP8266 or ESP32 chip identical to what we are using.

I bought a similar product a couple years ago and replaced the firmware on it.

You can solder a usb connection to it and flash new firmware if your wanna get real tricky with it

Think I found what was hiccup in the tsl2591 and hope to get it up and functioning before my wife leaves me for spending a week in the office after I come home from work :rofl:

The built in current transducer to measure watts is nice. I could use these on all my major components to keep tract of energy usage.

But then again, I may not want to know! For me it is a hobby I enjoy and most all hobbies cost money.

1 Like

There’s one where knowing the watts amps being drawn will work in your favor :wink:

I try to only use 80% of load so it will be very helpful knowing if I’m pushing too far or not

Yahtzee!

And we’re mobile

Nice! I just added text message capability to mine so I can set up alerts with things are out of whack.

1 Like

Alright so…I am not that tech savvy at all but this just made my year!! Thanks for putting me onto the capabilities we all have if we push towards it

You got it going on like donkey kong!

Glad I could give something back to the forum since it has helped me sooo much!

1 Like

Did the TSL2591 library do the irradiance calculation or did you convert it from the LUX value?

The arduino library has that as an example file, you’ll need to add a few libraries to it as well but not big deal

Can you help me out with a link to the library you are using? I can’t seem to find it on their website or github.

1 Like

We’re you able to find a vpd table to use as a library?

Download arduino

Goto sketch

Include library

At the top of that menu it says manage library’s

Click that and wait for it to load up

Type tsl2591 into the top bar and it should return with files you need

Then hover over them and you’ll see an install function

You need the unified sensors library as well

I had to calculate VDP based on temperature and humidity

here is the code in VB, have to give it temperature in celsius

Dim SVP As Double = 610.78 * (2.71828 ^ ((T / (T + 238.3)) * 17.2694))
VPD = (SVP / 1000) * (1 - (Humidity) / 100))

1 Like

I see; you downloaded the TSL2591MI, which is a different library than what I have.

What is interesting is the author is calculating irradiance w/m^2. If his math works for ‘all’ spectral light sources then converting to photon flux (ppfd) is possible. Sounds too good to be true though.

1 Like

Below is a quote I found:

Some researchers use the approximation 1 W/m2 ≈ 4.6 μmole.m2/s… Par seems to be a value of a given nm range, where as PPFD is a total output of photons over time. It doesn’t seem like an apples to apples comparison.

You have the updated version of the light sensor I have so I can’t use this library. Think I am going to update mine and play around with this some more.

1 Like

Got it off Amazon if you need a link let me know

#include <Arduino.h>
#include <Wire.h>
#include <TSL2591I2C.h>

TSL2591I2C tsl2591;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);

//wait for serial connection to open (only necessary on some boards)
while (!Serial);

#if defined(ESP32)
Wire.begin(SDA, SCL);
#elif defined(ESP8266)
Wire.begin(D2, D3);
#else
Wire.begin();
#endif

if (!tsl2591.begin())
{
Serial.println(“begin() failed. check the connection to your TSL2591.”);
while (1);
}

Serial.print("sensor ID: "); Serial.println(tsl2591.getID(), HEX);

tsl2591.resetToDefaults();

//set channel
tsl2591.setChannel(TSL2591MI::TSL2591_CHANNEL_0);

//set gain
tsl2591.setGain(TSL2591MI::TSL2591_GAIN_HIGH);

//set integration time
tsl2591.setIntegrationTime(TSL2591MI::TSL2591_INTEGRATION_TIME_100ms);
}

void loop() {
// put your main code here, to run repeatedly:

delay(1000);

//start a measurement
if (!tsl2591.measure())
{
Serial.println("could not start measurement. ");
return;
}

//wait for the measurement to finish
do
{
delay(100);
} while (!tsl2591.hasValue());

Serial.print(“Irradiance: “); Serial.print(tsl2591.getIrradiance(), 7); Serial.println(” W / m^2”);
Serial.print(“Brightness: “); Serial.print(tsl2591.getBrightness(), 7); Serial.println(” lux”);
}

TSL2591i2c.h is defined on another tab of this same script and looks like this

#ifndef TSL2591I2C.h
#define TSL2591I2C.h

#include “TSL2591TwoWire.h”

class TSL2591I2C final: public TSL2591TwoWire
{
public:
TSL2591I2C();
~TSL2591I2C();
};

#endif /* TSL2591I2C_H_ */

ive stolen this code and it works great