The WORKBENCH part 1

Hey borroz. Dit you implement the varistor for peak current handling in your design? The exampe in the link with the fuses has one in the design. Could well be that the coffee maker gives a peak on the ac line.

Greets,

Ewoud

1 Like

first major hardware update … :sunglasses:

x535

the humidity from the bme280 sensor seems stuck @100%

1 Like

I had a similar problem with bme280 where the reported pressure did permanently stick at about 30% less than the actual value. It somehow got defective.

without switching it off and opening the enclosure I can think of one thing to try … hot air :sunglasses:

i’ll try tomorrow

1 Like

the hot air ‘repair’ worked :rofl: I think

sensorrepair

my conclusion : the protective enclosure was accumulating moisture, the node is running now in it’s 4 th week, transmitting 28 bytes @ SF7 every 5 minutes on a single 1.5 v battery

humidity-hotair

  • it’s going up like crazy again, so I don’t know if this BME280 sensor is defect
2 Likes

you got the schematics and code to share ? :wink:

I don’t know if the HW designer, Rocket Scream , will make this open source… at this moment it’s a betatest and the node performs very well (only the BME280 sensor s*cks)

Click to see test code
// -----------------------------------------------------------------------
// TTN OTAA        temperature / humidity / battery voltage
// 328P / rn2483 / BME280 
// RocketScream-02.2 testnode 1.5 v 5 min public
// BoRRoZ oct 2017                  
// -----------------------------------------------------------------------

  #include <TheThingsNetwork.h>
  #include <CayenneLPP.h>
  #include <AltSoftSerial.h>
  #include "SparkFunBME280.h"
  #include "Wire.h"
  #include <LowPower.h>

  int count = 0;
  float temp;
  float hum;
  float volt;
  //float pres;
  //float alt;
  
  BME280 bme;
   
// -----------------------------------------------------------------------
  const char *appEui = "0000000000000000";
  const char *appKey = "00000000000000000000000000000000";
// -----------------------------------------------------------------------
  #define loraSerial Serial
  AltSoftSerial debugSerial;      // Rx 8 Tx 9 
// -----------------------------------------------------------------------
  #define SLEEP_PERIOD 300000    // max = 4294967296 - 49.7days
  //  1 min = 60000
  //  5 min = 300000*
// -----------------------------------------------------------------------
  #define freqPlan TTN_FP_EU868
  TheThingsNetwork ttn(loraSerial, debugSerial, freqPlan);
  CayenneLPP lpp(51);

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

  void setup()
  {
    
  bmeSetup();
  
  loraSerial.begin(57600);
  debugSerial.begin(9600); 
     
  pinMode(2, INPUT);                // sleep interrupt
  pinMode(4, OUTPUT);               // reset rn2483
  
  pinMode(LED_BUILTIN, OUTPUT);     // 13
  digitalWrite(LED_BUILTIN, HIGH);  // LED on = joining
      
  digitalWrite(4, LOW);             // reset rn2483
  delay(500);
  digitalWrite(4, HIGH);
  
  while (!ttn.join(appEui, appKey)) {
  delay(10000);
  }
 
  //debugSerial.println(F("-- [setup complete]"));
  //ttn.showStatus();
  
  digitalWrite(LED_BUILTIN, LOW);   // LED off = we OTAA joined yeah
  
  }

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

  void loop()
  {
  
  readSENSORS();
  //debugInfo();  
  transmitDATA();
  
  ttn.sleep(SLEEP_PERIOD);
  debugSerial.flush();
  
  attachInterrupt (digitalPinToInterrupt(2), awake, LOW);
  LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
    
  Wire.begin();
  delay(50);
     
  }
  
// -----------------------------------------------------------------------  

  void bmeSetup()
  {
  
  bme.settings.commInterface = I2C_MODE;
  bme.settings.I2CAddress =0x76;
  
  bme.settings.runMode = 0;
   
  //  0, Sleep mode
  //  1 or 2, Forced mode
  //  3, Normal mode
 
  bme.settings.tStandby = 0;
  
  //  0, 0.5ms
  //  1, 62.5ms
  //  2, 125ms
  //  3, 250ms
  //  4, 500ms
  //  5, 1000ms
  //  6, 10ms
  //  7, 20ms
    
  bme.settings.filter = 0;
  
  //  0, filter off
  //  1, coefficients = 2
  //  2, coefficients = 4
  //  3, coefficients = 8
  //  4, coefficients = 16
  
  bme.settings.tempOverSample = 1;
  
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 
  
  bme.settings.pressOverSample = 1; 
  
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 
  
  bme.settings.humidOverSample = 1;
  
  //  0, skipped
  //  1 through 5, oversampling *1, *2, *4, *8, *16 

  bme.begin();
  
  delay(10);
  
  }
  
// -----------------------------------------------------------------------  

  void readSENSORS()
  {

  rTEMP();
  rBATTERY();     
    
  }
  
// -----------------------------------------------------------------------

  void rTEMP()
  {

  bmeForceRead();
   
  temp = bme.readTempC();
  hum = bme.readFloatHumidity();
  //pres = bme.readFloatPressure() / 100.0F;
  //alt = bme.readFloatAltitudeMeters();
     
  }
  
// -----------------------------------------------------------------------

  void bmeForceRead() {
 
    // set the BME280 sensor in "forced mode" to force a reading.
    // after the reading the sensor will go back to sleep mode as set before.
    
    uint8_t value = bme.readRegister(BME280_CTRL_MEAS_REG);
    value = (value & 0xFC) + 0x01;
    bme.writeRegister(BME280_CTRL_MEAS_REG, value);
 
    // Measurement Time (as per BME280 datasheet section 9.1)
    // T_max(ms) = 1.25
    //  + (2.3 * T_oversampling)
    //  + (2.3 * P_oversampling + 0.575)
    //  + (2.4 * H_oversampling + 0.575)
    //  ~ 9.3ms for current settings
    delay(10);

  }

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

  void rBATTERY()
  {
  int counter;
  int adcReading;
  int voltage;
  
  adcReading = analogRead(A6);    
  adcReading = 0;
  for (counter = 10; counter > 0; counter--)
  {
  adcReading += analogRead(A6);
  }
  adcReading = adcReading/10;
  // convert to volts
  volt = adcReading * (3.3 / 1023.0);

  }

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

  void debugInfo()
  {
  debugSerial.println("");
  debugSerial.print("BATTERY     : ");
  debugSerial.print(volt);
  debugSerial.println(" v");
  
  debugSerial.print("TEMPERATURE : ");
  debugSerial.print(temp);
  debugSerial.println(" c");
  debugSerial.print("HUMIDITY    : ");
  debugSerial.print(hum);
  debugSerial.println(" %");
  
  //debugSerial.print("PRESSURE    : ");
  //debugSerial.print(pres);
  //debugSerial.println(" mb");
  //debugSerial.print("ALTITUDE    : ");
  //debugSerial.print(alt);
  //debugSerial.println(" mtr");
    
  debugSerial.print("PAYLOADS    : ");
  debugSerial.print(count);
  debugSerial.println(" ");
  debugSerial.print("-------------------------------[ ");
  }
  
// -----------------------------------------------------------------------

  void transmitDATA()
  {
    
  lpp.reset(); 
  
  lpp.addTemperature(1, temp);
  lpp.addRelativeHumidity(2, hum);
  lpp.addAnalogInput(3, volt);
  lpp.addLuminosity(4, count);
  //lpp.addBarometricPressure(5, pres);
    
  ttn.sendBytes(lpp.getBuffer(), lpp.getSize());

  count++;      // update frames transmitted

  }
  
// -----------------------------------------------------------------------

  void awake()
  {
  
  }
// -----------------------------------------------------------------------
// ----------------------------------------------------------------------- 

the 1,5 VAA battery from the start (24-10) till now (18-11) :
b2410-1811rs1

1 Like

I have heard comments that condensation can build up within the body of the BME280 sensor; not good for a humidity sensor - this came from an engineer who evaluated the Bosch sensors for a global asset tracking solution.

Have you tried the SHT31-DIS from sensirion? This comes with a strong recommendation from the same engineer.

https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/2_Humidity_Sensors/Sensirion_Humidity_Sensors_SHT3x_Datasheet_digital.pdf

no I didn’t :sunglasses:

I have that sht31 sensor here, have to try that (real I2c !), I tried the SH10 allready but that has no sleepmode, switching the power on/off generates a problem with the I2c bus waking up.
all in all not very happy with the (china) BME280 outdoors @ the moment

x536

so I haven’t found the right combination of sensor / outdoor construction that is accurate and reliable for a longer period, how do they do it then ?

2 Likes

Hi jezd,
Will be open source once released for public. :slight_smile:

3 Likes

Even better is SHT31-DIS with Membrane Option which protects the sensor from water and dust and allows it to be used under harsh environmental conditions.

https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/2_Humidity_Sensors/Sensirion_Humidity_Sensors_SHT3x_Datasheet_Filter_Membran_v1.pdf

(I have not yet seen modules with SHT31-DIS membrane option on AliExpress unfortunately.)

2 Likes

I think the positioning of your BME280 is the biggest issue at this moment (the one positioned at the bottom). That location is error prone.
SHT31-DIS + BMP280 should be a good combination. Using SHT31-DIS for temperature and humidity and use BMP280 for barometric pressure only (not temperature).

SHT31 - https://www.ebay.com/itm/SHT31-SHT31-D-Temperature-Humidity-Sensor-Breakout-Board-Weather-for-Arduino/142466510913
SHT35 - https://www.ebay.com/itm/ClosedCube-SHT35-D-Digital-I2C-Humidity-Temperature-Sensor-Breakout-/182501935370

caps !
https://www.sensirion.com/en/environmental-sensors/humidity-sensors/filter-cap-sf2/

I just ordered two Grove dust sensors for fine particle testing and am hoping to build something to measure pollution (fijnstof) here in Amsterdam. Anyone already working with these?

grove is the connector… what is the sensor type ?

Right…
It’s this one:


tnx for the link btw

x537

yeah baby yeah !! … 4 hardware uarts in a little box :sunglasses:
3V3 PRO MINI version of Mega 2560. Built on the Atmel ATmega2560 microcontroller.

Nice. And standard 16MHz with 3.3V instead of just 8MHz like Pro Mini.

So, do you have any special application in mind with 4 UARTS? :grinning:

:wink:

uart 1 - debug / program
uart 2 - GPS
uart 3 - Nextion touchscreen
uart 4 - LoRa module

2 Likes

we’ve just sent you a post on twitter about when we can get hold of one for testing