Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5

"Palmy Weather" Goes live with WeatherDuino Pro2
#21

I have made another change to my weather station. I have upgraded the rain gauge to something that is more accurate than what the original "Fine Offset" gauge offered.

This rain gauge has a much deeper catchment, preventing splash out. It is also round rather than rectangular making catchment even, no matter what way the weather is coming from.

Mounting has also been an issue until now. With the rain gauge mounted on the main anemometer mast, false rain readings would be recorded due to vibration of the mast or wind blowing beneath the rain gauge.

The new positioning of the rain gauge will see this greatly reduced. Wind will not be able to cause false tips and with the firm mount on the roof, vibration is also eliminated. It is also in a much more open and clear position; I know that a roof top rain gauge is not idea, but due to my location, this actually provides the most open space. The lip of the rain gauge is in line with the pitch of the roof.

Why is the rain gauge such an odd shape with vents? Well it is part of a stand-alone wireless rain gauge with built in temperature sensor. Sadly it does not follow the "Auriol" wireless protocol so it has been modified to work on a cable. No additional calibration required as this unit also holds the 0.3mm of rain like the "Fine Offset" gauge did.

               
Reply
#22

Very nice installation!

Have you noticed any difference in the readings between the FO rain gauge and the new one?
Reply
#23

On the last day it rained, it was bang on with the local airport readings which was great to see. Usually there can be a little bit of variation, but I guess you would expect that anyway as they read a few kilometres north of my location. I will keep you posted as time goes along.
Reply
#24

(09-12-2015, 08:51)Palmyweather Wrote:  Just in case people are interested, I have attached a video of the receiver at work with a bit of a text explanation which might give some people ideas for their own system.


As you can see from the video, I have changed the way the LCD screen displays the information. I have the temperature at the top of the screen which cycles between indoor and outdoor.

In the middle, I have the wind speed and direction which displays the wind gust information rather than the average wind speed. This maximises the frequency of updates from the outside unit (every 5 seconds); one of the most frequent updated pieces of information this station has.

The last line cycles through the barometric pressure, rain fall, solar radiation and UV index reading. This is information which, although important, changes slower/less frequently than other aspects and therefore a slower cycle time between data being displayed can be afforded.

I am very happy with how this shows the information for what I require but I understand that this might now be what everyone is after. That is the benefit of this system, it is fully customisable to your needs.

Hi,
I think your configuration of the LED information is probably the most logical. Is it possible you could explain the changes to the software to me
As you said the wind is one of the most variable pieces of info and the barometric pressure, rain etc the least likely to change at any pace.
Thanks
Jim
Reply
#25

Hi Jim

This is the code I am currently using to display the information on my LCD. Basically there is a loop running in the background to update the display. Each time the loop runs, the first thing it does is update the wind speed. Next there are four switch cases; these are case statements which run when called and the easiest way of doing this is to work with numbers as we can increment the numbers after each run.

Within each case statement, it will print the temperature and other weather veritable. I have four case statements: One for pressure, second for rain, third for Solar Radiation and fourth is the UV index. within each of these cases I will add a temperature/humidity reading. For the even numbers I display the inside temperature/humidity and for the odd numbers I display the outside information.

This is an example of a case statement:

Code:
case 1:
    {  
      lcd.setCursor(0,3); //Set text to line 3 and display pressure information
      lcd.print(F("Press:"));

        lcd.print(SeaLevel_ATM, 2);
        lcd.print(F(" mB"));

lcd.setCursor(0,1); // set text to line 1 and display temperature information
  lcd.print(F("T"));
  lcd.write(B11011111);   // Degree Symbol
  lcd.print(F("IN :              "));

  if (Output_T_Int >= 100) lcd.setCursor(6,1);
   else if (Output_T_Int < 0) lcd.setCursor(6,1);
        else lcd.setCursor(7,1);
  lcd.print(Output_T_Int / 10.0, 1);
  lcd.write(B11011111);   // Degree Symbol
  lcd.print(F("C"));
  lcd.setCursor(14,1);
  lcd.print(Output_H_Int / 10.0, 1);
  lcd.print(F("%H"));
      L_info = 2; // Change case number from 1, to 2 so that the next case will run
      break; // Get out of this case and carry on with the routine
    }


Writing and re-writing information to the LCD screen and processing all that extra information is SLOW and I do not necessarily recommend it because this is a modification not proved to be stable for any system.

There are probably a number of other ways this could be better executed, but it is what has worked for me. I know Werk_AG and others probably won't approve of making the LCD code so heavy.

You will notice in my full code that there is also a check to see if it is night or day based upon the solar radiation readings. This will turn off/not display the solar and UV information during the night, instead looping between pressure and rain only. This is a feature of the original code and is very useful.

This is the code I am currently running:
Code:
#if DisplayType == 0
  
void write_LCD()
{
  if (FirstRunInit != 0xAC)
  {
    lcd.setCursor(4, 2);
    lcd.print(F("Initializing"));
    lcd.setCursor(2, 3);
    lcd.print(F("Auto-Reboot soon!"));
    lcd.setCursor(17, 1);
    lcd.print (bitRead(MainSensorsRX, 0));
    lcd.print (bitRead(MainSensorsRX, 1));
    lcd.print (bitRead(MainSensorsRX, 2));
    return;
  }
  else if (StartUp == true)
  {
    lcd.setCursor(7, 1);
    lcd.print(F("Wait!"));
    lcd.setCursor(0, 2);
    lcd.print(F("Don't start weather"));
    lcd.setCursor(3, 3);
    lcd.print(F("software yet! "));
    lcd.print (bitRead(MainSensorsRX, 0));
    lcd.print (bitRead(MainSensorsRX, 1));
    lcd.print (bitRead(MainSensorsRX, 2));    
    return;
  }

  lcd.setCursor(0,3);
  lcd.print(F("                    "));
  lcd.setCursor(0,2);
  lcd.print(F("                    "));

lcd.setCursor(0,2);
      lcd.print(F("Wind :"));
      if (Output_WGust >0.72 )
      {
        if (Output_WGust <= 9.99){lcd.print(Output_WGust, 2); }
        else{lcd.print(Output_WGust, 1);}
        #if Wind_Display_Unit == 0
          lcd.print(F(" km/h  "));
        #endif
        #if Wind_Display_Unit == 2
          lcd.print(F(" m/s  "));      
        #endif        
        #if Wind_Display_Unit == 3
          lcd.print(F(" Kts  "));      
        #endif
        lcd.print(vaneDirectionsText[(Unit[WIND_OutUnit].Wind_dir % 3600) / 225]);
       }
      else {lcd.print(F("Calm       "));
      lcd.print(vaneDirectionsText[(Unit[WIND_OutUnit].Wind_dir % 3600) / 225]);}

  
  switch (L_info)
  {
  case 1:
    {  
      lcd.setCursor(0,3);
      lcd.print(F("Press:"));

        lcd.print(SeaLevel_ATM, 2);
        lcd.print(F(" mB"));

lcd.setCursor(0,1);
  lcd.print(F("T"));
  lcd.write(B11011111);   // Degree Symbol
  lcd.print(F("IN :              "));

  if (Output_T_Int >= 100) lcd.setCursor(6,1);
   else if (Output_T_Int < 0) lcd.setCursor(6,1);
        else lcd.setCursor(7,1);
  lcd.print(Output_T_Int / 10.0, 1);
  lcd.write(B11011111);   // Degree Symbol
  lcd.print(F("C"));
  lcd.setCursor(14,1);
  lcd.print(Output_H_Int / 10.0, 1);
  lcd.print(F("%H"));
      L_info = 2;
      break;
    }
  case 2:
    {
      lcd.setCursor(0,3);
      if (Output_RToday != 0 )
       {
         lcd.print(F("Rain :"));
         lcd.print(Output_RToday, 2);
         lcd.print(F(" mm"));
       }
      else
       {
         lcd.print(F("Rain :"));    
         lcd.print(DaysWithoutRain);
         lcd.print(F(" Dry Day(s)"));    
       }  

         lcd.setCursor(0,1);
    lcd.print(F("T"));
  lcd.write(B11011111);   // Degree Symbol
  lcd.print(F("OUT:              "));

  if (Output_T_Out >= 100) lcd.setCursor(6,1);
   else if (Output_T_Out < 0) lcd.setCursor(6,1);
        else lcd.setCursor(7,1);
  lcd.print(Output_T_Out / 10.0, 1);
  lcd.write(B11011111);   // Degree Symbol
  lcd.print(F("C"));
  lcd.setCursor(14,1);
  lcd.print(Output_H_Out / 10.0, 1);
  lcd.print(F("%H"));

    if (SRUV_OutUnit != 9 && Solar_Sensor == 1 && Output_SRad != 0) L_info = 3;
    else L_info = 1;
  
     break;
    }
  #if SRUV_OutUnit != 9
  case 3:
    {
      lcd.setCursor(0,3);
      lcd.print(F("Solar:"));      
      lcd.print(Output_SRad);
      lcd.print(F(" W/m^2"));

      lcd.setCursor(0,1);
    lcd.print(F("T"));
  lcd.write(B11011111);   // Degree Symbol
  lcd.print(F("IN :              "));

  if (Output_T_Int >= 100) lcd.setCursor(6,1);
   else if (Output_T_Int < 0) lcd.setCursor(6,1);
        else lcd.setCursor(7,1);
  lcd.print(Output_T_Int / 10.0, 1);
  lcd.write(B11011111);   // Degree Symbol
  lcd.print(F("C"));
  lcd.setCursor(14,1);
  lcd.print(Output_H_Int / 10.0, 1);
  lcd.print(F("%H"));
  L_info = 4;
      break;
    }
  case 4:
    {
      lcd.setCursor(0,3);
      lcd.print(F("UVI  :"));      
      lcd.print(Output_UV / 1000.0, 1);
      lcd.print(F(" UVI"));

               lcd.setCursor(0,1);
    lcd.print(F("T"));
  lcd.write(B11011111);   // Degree Symbol
  lcd.print(F("OUT:              "));

  if (Output_T_Out >= 100) lcd.setCursor(6,1);
   else if (Output_T_Out < 0) lcd.setCursor(6,1);
        else lcd.setCursor(7,1);
  lcd.print(Output_T_Out / 10.0, 1);
  lcd.write(B11011111);   // Degree Symbol
  lcd.print(F("C"));
  lcd.setCursor(14,1);
  lcd.print(Output_H_Out / 10.0, 1);
  lcd.print(F("%H"));
  L_info = 1;
      break;
      }
#endif
  }
}

This is just an example of what can be done with a little bit of code tinkering to the original project which is why the WeatherDuino Pro2 system is fantastic; customise it to what you want.
Reply
#26

Indeed, this is very interesting to be able to customise the code and therefore the LCD display.

Will give it a try!
Reply
#27

Palmy,
Thanks a lot for that, much appreciated, I will edit the file and upload it but will not be for a couple of weeks as I am away. Let you know how it goes
Thanks again
Jim
Reply
#28

You can remove the last:

lcd.print(vaneDirectionsText[(Unit[WIND_OutUnit].Wind_dir % 3600) / 225]);

in the "wind" section, so you do not print the wind direction whenever it is calm Smile
Reply
#29

(19-09-2016, 01:18)Barrow4491 Wrote:  Palmy,
Thanks a lot for that, much appreciated, I will edit the file and upload it but will not be for a couple of weeks as I am away. Let you know how it goes
Thanks again
Jim

Palmy,
I have edited the file, compiled and uploaded it but i have a couple of issues. I wonder if you could suggest what the problem may be as with my limited knowledge of code I can't find any errors.
I have attached a photo and as you will see the word "Press:" is missing the first two letters and in the wind line it does not show the speed type which in my case should be Kts
Reply
#30

Hi Jim

Thank you for getting back to me, sorry to see that it was not a smooth transition to the code example I provided. I use km/h as my wind unit of measure and have not tested it under any other option.

I will start with the pressure. I think this will be resolved once we get the wind line right. Any text overflow flow from the line above, will spill onto the next line. For example, the screen you are using is a 20 character by 4 lines. If you try to print 21 characters to the LCD screen, the 21st character will flow onto the next line. Therefore with 2 letters missing on the "Pressure" line, I think this is 2 characters of overflow from the wind line above it.

Also I notice that there is not a space between the text "Wind" and the colon which makes me wonder a little bit about the formatting of the code.

Jim, could you do me a favour? I know it is not your desired unit of measure, but could you change in your settings to display km/h as a wind unit of measure under "Config_RX" and see if this changes the display to like mine?

I have resubmitted just the wind code below. One thing I have changed is added an extra space at the end of the "m/s" and "Kts" as these only use 3 characters of text where as km/h uses 4 (to keep the line formatting the same). I have also added some additional notes in line to try and help.

Code:
lcd.setCursor(0,3); // Set cursor to line 3, position zero
  lcd.print(F("                    ")); //print 20 characters of white text
  lcd.setCursor(0,2); // Set cursor to line 2, position zero
  lcd.print(F("                    ")); //print 20 characters of white text

lcd.setCursor(0,2); // Go back to line 2, position zero

lcd.print(F("Wind :")); // Start writing wind info by printing "Wind :"
      
          if (Output_WGust >0.72 ) // If the wind gust value is greater than 0.72, then we want to print this on the LCD screen (else we will print calm later on).
      {
        
          if (Output_WGust <= 9.99){lcd.print(Output_WGust, 2); } // Print the numerical value. IF it is below 9.99, display the wind value with TWO decimal points.
        
          else{lcd.print(Output_WGust, 1);} // ELSE the wind speed must be greater than 9.99, therefore we only want to have ONE decimal point (this keeps the formatting standard again and all the text in a line.
        
          #if Wind_Display_Unit == 0 // If the unit of km/h has been chosen, print this unit of measure with 1 space before, and 2 spaces after the text
          lcd.print(F(" km/h  "));
        #endif
        #if Wind_Display_Unit == 2 // If the unit of m/s has been chosen, print this unit of measure with 1 space before, and 3 spaces after the text
          lcd.print(F(" m/s   "));      
        #endif        
        #if Wind_Display_Unit == 3 // If the unit of Kts has been chosen, print this unit of measure with 1 space before, and 3 spaces after the text
          lcd.print(F(" Kts   "));      
        #endif

        lcd.print(vaneDirectionsText[(Unit[WIND_OutUnit].Wind_dir % 3600) / 225]); // Finally print the wind direction text
       }

      else {lcd.print(F("Calm       ")); //This is where we print the "Calm" value if the wind speed is below the predetermined 0.72. Note the white space that follows, this makes up 11 characters including the letters so that the wind direction will print in the same position as if there were wind blowing.
      lcd.print(vaneDirectionsText[(Unit[WIND_OutUnit].Wind_dir % 3600) / 225]);} // Some people will probably find this pointless, but I have added the wind direction value again so that it displays next to the "calm" text; although it is calm, I still find it interesting to know where the wind was coming from.

I have attached two example photos to show how the colons, km/h and wind direction always stays in the same place as different wind speeds come through. Notice how the decimal point also changes as the wind speed drops below/above the preset 9.99 (I have not factored in if I get a wind gust greater than 100, I think I will have other things to worry about if that happens).

I hope this helps Smile
Reply




Users browsing this thread: 1 Guest(s)