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

WeatherDuino Pro2 'PLUS' Build
#41

Connecting a ILI9341 2.8" TFT Display with Touch Panel

For those who wish to connect a 2.8" TFT Display with Touch Panel, this is a similar process although there are a few more connections.  Go slow making your connectings, and double check the connections before you power up for the first time.   Below is a legend to show you which pins on the WeatherDuino Receiver board connection to which pins on the TFT display:

Screen             Pro Plus Board
T-IRQ -----------T-IRQ
T-DO--------- T-MISO
T-DIN-------- T-MOSI
T-CS ------------ T-CS
T-CLK----------- T-SCK
SDO(MISO)---- Not connected
LED--------------LED+
SCK--------------SCK
SDI(MOSI)------MOSI
D/C---------------DC
RESET-----------RST
CS----------------CS
GND-------------GND
VCC--------------5V
N/C--------------3.3V - leave unconnected


Also ensure that you have selected the TFT screen in the user options:

// --------------------------------------------------------------------------------------
//   Define your Display type
// --------------------------------------------------------------------------------------
#define DisplayType       3       // 1= LCD 20x4, 3= TFT 320x240 ILI9341

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


   
Reply
#42

(23-01-2017, 11:29)Zack_ster Wrote:  
(22-01-2017, 03:44)Werk_AG Wrote:  
(21-01-2017, 22:02)AllanG Wrote:  Interesting! My BMP280 board has 6 pins, (all that I saw at the time I ordered it were also 6 pin) the additional 2 being CS and MISO/SDO as the module can use both I2C and SPI modes. By default the address is 0x76 but it can be changed to 0x77 by tying pin 6 to VCC. Alternatively, the address could be changed to 0x76 in the Meduino sketch, Werk_AG??

Hi AllanG

If the default address of your BMP280 is 0x76 (and it should be), don't worry it will work.
In the unlikely case you need to change the default address, it can only be done in the library (BMP280.h).
If needed PM me.

Hi AllanG,

Just to confirm Werk's comments above, I have the same 6 pin module as you and I can confirm it works fine and there is no need to tie pin 6 high.

Regards,

Zak

That's good to know Zak, thanks.

Allan.
Reply
#43

User Options - Global Location

The WeatherDuino station uses your location to tell Cumulus where you are located on earth (via longitude, latitude and elevation), so set it as close to your actual location as you can, within reason.  Also ensure that your elevation is set correctly as it uses this to set the Mean Sea Level pressure correctly.


// --------------------------------------------------------------------------------------
//   Define your Weather Station location
// --------------------------------------------------------------------------------------
#define LATITUDE      -273    // Put here your Station latitude in tenths of degrees North
#define LONGITUDE     1530    // Put here your Station longitude in tenths of degrees (minus for West)
#define ELEVATION     10    // Put here your Station height above sea level in Meters


The latitude and longitude have to be entered into the user options in tenth of degrees (not degrees, minutes & seconds).  If you are located in the northern hemisphere of the earth the latitude will be given as a positive number, and a negative number for the southern hemisphere.  The longitude value will given as a positive number for East and a negative number for West.

Finding Your Location

First up we need to find our location coordinates, and dont worry for now if they are in degrees and minutes, as we'll work on that next.  Here's where Mr. Google will be your friend, and it shouldn't take you too long to get your location co-ordinates.  In the past I've used Elevation Finder at Freemaptools, to find both the location and the elevation in one quick search.  Use simply enter a physical street address and click the find button, then click a pin on the map and your location and elevation will be given within seconds.

Freemaptools Elevation Finder URL:
https://www.freemaptools.com/elevation-finder.htm  

Converting to Decimal

Now that you have your location co-ordinates, you'll need to convert them to decimal if they are in degrees and minutes (as given from Freemaptools Elevation Finder).  The following website makes it pretty quick and easy to do this conversion:

Conversion calculator - degrees, minutes, seconds to decimal degrees
https://data.aad.gov.au/aadc/calc/dms_decimal.cfm

Now that you have your location in decimal degrees, you need to convert it to tenths of degrees.  This simple means move the decimal point one place to the right, and truncate the remainder.  

For example, if your location was:   Latitude -27:22:56 (South),  Longitude 153:03:13  (East)
Convert to decimal degrees:      Latitude -27.382222,   Longitude 153.053611
Convert to tenths of degrees:     Latitude -273,   Longitude 1530

So in the example above, the numbers that we will enter into the User Options are Latitude -273,   Longitude 1530.
Reply
#44

User Options - Weather Station ID's

The weather stations IDs give a unique identifier to the radio comms path or channel, between the Transmitter to the Receiver, and the Receiver to the Wireless Display. The transmitted packets are effectively 'tagged' with this identifier. This effectively 'pairs' or 'couples' up your units. You need to ensure that you set the same station ID (eg. 0xA1) in your TX station and the 'Station_ID' in your receiver station User Options. And also set the same station ID (eg. 0xB3) in your Wireless Display and the 'Relay_ID' in your receiver station User Options. The default IDs are 0xA1 and 0xB3.

// --------------------------------------------------------------------------------------
// Define ID's for this weather station
// --------------------------------------------------------------------------------------
#define Station_ID 0xA1 // Station_ID, use the same value in all TX units
#define Relay_ID 0xB3 // Relay_ID, use the same value in all WD units
Reply
#45

User Options - Day Light Savings

This section is pretty self explanatory and straight forward, and the examples show you how to enter the details.  You need to set your timezone names or labels (eg. PST, GMT or AEDT, AEST), the correct date that your timezones changes over to daylight savings, and the amount of offset for your timezones.


// --------------------------------------------------------------------------------------
//   Define rules for Auto Summer Time Display, and clock adjustment
// --------------------------------------------------------------------------------------
// Example for Australia Eastern Time Zone (Sydney, Melbourne)
// TimeChangeRule aEDT = {"AEDT", First, Sun, Oct, 2, 660};    //UTC + 11 hours
// TimeChangeRule aEST = {"AEST", First, Sun, Apr, 3, 600};    //UTC + 10 hours
// Timezone myTZ(aEDT, aEST);

// Example for Portugal
// TimeChangeRule PST = {"PST", Last, Sun, Mar, 1, 60};   //Portuguese Summer Time -  "UTC + 1" or GMT + 1
// TimeChangeRule GMT = {"GMT", Last, Sun, Oct, 2, 0};    //Portuguese Winter Time -  "UTC + 0" or GMT
// Timezone myTZ(PST, GMT);

TimeChangeRule aEDT = {"AEDT", First, Sun, Oct, 2, 660};    //UTC + 11 hours
TimeChangeRule aEST = {"AEST", First, Sun, Apr, 3, 600};    //UTC + 10 hours
Timezone myTZ(aEDT, aEST);




If you timezone does not have daylight savings, just configure one of the "TimeChangeRule" lines, defining the amount of time offset for your zone and then pass the same rule twice to the constructor, for example: 

// Example for Brisbane, Australia
TimeChangeRule aEDT = {"AEDT", First, Sun, Oct, 2, 660};    //UTC + 11 hours 
TimeChangeRule aEST = {"AEST", First, Sun, Apr, 3, 600};    //UTC + 10 hours 
Timezone myTZ(aEST, aEST);
Reply
#46

User Options - Meteorological Day

This User Option lets you define the start of the Meteorological Day in your area, as not all locations use a Midnight start for their 'weather recording' day. In Australia the Meteorological Bureau (BOM) use a day start of 9am, so for consistency I also use this start time. In Australia some variables such as maximum wind gust, hours of bright sunshine, and weather phenomena (snow, fog, hail, dust, frost, thunder) are measured from midnight to midnight, whilst "most" other daily elements are measured over the 9 am to 9 am period.

A quick search with Mr. Google should confirm the start time for the Meteorological Day in your area.


// --------------------------------------------------------------------------------------
// Define Roll Over Hour for Meteorological Day
// --------------------------------------------------------------------------------------
// Example below for Australia
#define MeteoDay_HStart 9 // Use values from 0 to 23
Reply
#47

User Options - Wind Speed and Wind Gust resolution

This setting is a bit of a trade-off and is due to the Davis protocol measuring wind speed resolution to 1 mile per hour.  If you don't expect high wind speeds in your area in excess of 91.8km/h and want a greater resolution in your readings then set VP2_WindRes to "1", otherwise set VP2_WindRes variable to "2".

Note that a wind speed of 91.8km/h is "very" high and would be equivalent to a storm rating that is stronger than a gale but less than a hurricane.  This would also be equivalent to a "10" on the Beaufort scale and such wind speeds on land in Australia are pretty rare.

// --------------------------------------------------------------------------------------
//   Define Wind Speed and Wind Gust resolution
// --------------------------------------------------------------------------------------
// This setting only have effect when the software is used in Davis VP emulation mode
#define VP2_WindRes     1    // If set to 2, set Cumulus Wind Speed and Wind Gust multipliers to 0.448. Wind Resolution 0.72 Km/h
                            // If set to 1, set Cumulus Wind Speed and Wind Gust multipliers to 0.224. Wind Resolution 0.36 Km/h
                            // WARNING !!! Setting this variable to 1 allows a better wind speed and gust resolution,
                            // but also limits both of them, to a maximum reading of just 91.8 Km/h
                            // If set to 0, system uses Standard Davis 1 mph wind resolution.
Reply
#48

User Options - Optional Solar Radiation / UV Sensor

In the interest of optimising code execution and processor performance, if you are "not" connecting an optional outside Solar Radiation / UV sensor to the transmitter station then we should set these options to Not Used / Not Present.  Set the "SRUV_OutUnit" option to 9 for not used, and set "Solar_Sensor" and "UV_Sensor" options to 0 for not present.

// --------------------------------------------------------------------------------------
//   Define the source of your main outside sensors
// --------------------------------------------------------------------------------------
// ---- If you have all the sensors connected to only one TX board, always select Unit 0 as source
// ---- Define the source of your main Temperature / Humidity sensor
#define TH_OutUnit       0   // 0 for Temp/Hum sensor connected to TX_Unit 0, 1 for Temp/Hum sensor connected to TX_Unit 1
// ---- Define the source of your Main Wind sensor
#define WIND_OutUnit     0   // 0 for Wind instruments connected to TX_Unit 0, 1 for TX_Unit 1
// ---- Define the source of your main Rain Gauge
#define RAIN_OutUnit     0   // 0 for Rain Gauge connected to TX_Unit 0, 1 for TX_Unit 1, 3 for Auriol RF Rain Gauge
// ---- Define the source of your main Solar / UV sensores
#define SRUV_OutUnit     9   // 0 for Solar Rad / UV sensors connected to TX_Unit 0, 1 for TX_Unit1, 9 for not used
// ---- Define installed Solar / UV Sensors
#define Solar_Sensor     0   // 0 for not present; 1 for present
#define UV_Sensor        0   // 0 for not present; 1 for present
#define UV_Transmission 65   // UV Transmission percentage of UV sensor cover material
Reply
#49

User Options - Extra Sensors

Once again, in the interest of optimising code execution and processor performance, if you are "not" connecting extra sensors to the transmitter station then we should set these options to 9 for Not Used.  

// --------------------------------------------------------------------------------------
//   Extra Sensors Settings and Mapping
// --------------------------------------------------------------------------------------
// ---- Define the source and sensor number of each of the seven extra sensors, insert 9 if not used.
// ---- Source 0 (up to 3) means TX unit0, 1 means TX unit1... (sensor type SHT21 or HTU21D is number 0, sensor type SHT1x or DHT22 is number 1)
// ---- Source 6 is for OneWire sensors
// ---- Source 7 is for BIOS Sensor (Only Temp is get)
// ---- Source 8 is for Dust Density sensor. 0 is Temperature / Humidity, 1 is Dust Density / AQI
// ---- First field = Sensor source, Second field = Sensor number (0 or 1 for TX units)
// ---- Example:
// ----                          ES0   ES1   ES2   ES3   ES4   ES5   ES6    
//#define ExtraSensors_Source { {0,1},{1,1},{9,9},{6,3},{9,9},{9,9},{9,9} }
//               {0,1} - First extra sensor (ES0), will be sensor 1 from TX unit0
//               {1,1} - Second extra sensor (ES1), will be sensor 1 from TX unit1
//               {9,9} - Third extra sensor (ES2), not used - not mapped
//               {6,3} - Fourth extra sensor (ES3), will be OneWire sensor number 3 (OneWire sensors are numbered from 0 to 3)
//
//-----                        ES0   ES1   ES2   ES3   ES4   ES5   ES6    
#define ExtraSensors_Source { {9,9},{9,9},{9,9},{9,9},{9,9},{9,9},{9,9} }
Reply
#50

User Options - BIOS Soil Moisture Sensor

In the interest of optimising code execution and processor performance, if you are "not" connecting a BIOS Soil Moisture Sensor to the transmitter station then we should set this options to 0 for Not Used.  

// --------------------------------------------------------------------------------------
//   BIOS soil moisture sensor settings
// --------------------------------------------------------------------------------------
// ---- Please use the included BIOS_ID_Scanner sketch to find you BIOS Device ID
#define BiosSensor_ID 0   // Device ID in HEX format(0xE), or 0 not used
Reply




Users browsing this thread: 1 Guest(s)