Weather Station
Posted: Mon Aug 29, 2016 11:21 am
My latest project is a Weather Station with remote sensor and real time clock.
Currently the system only has 1 remote sensor, but this can be expanded.
This project is only compatible with Flowcode 7 as the nRF24L01 component is not included in earlier versions.
Equipment Required.
Remote Sensor(s)
1 EB-006 V9 Multi-programmer
1 EB-005 LCD E-Block
1 EB-016 Proto-Board
1 nRF24L01 RF Module (With suitable aerial) (Sparkfun)
1 HTU210 (SHT21 Sensor) Temperature / Humidity Module (Adafruit)
1 Ribbon Cables (M-F)
The RF and Temperature Sensors can be sourced from several places; I have just named the type I’m using.
Matrix also supply a Thermo-Hygrometer board using the SHT21 sensor. (EBM016)
Connections
HTU210 Thermo-Hygrometer
This uses the I2C Bus to connect to the microcontroller.
Port B4 SDA
Port B5 SCL
Power is taken from the 5V supply on the EB-006
nRF24L01 RF Module
Port C0 LED
Port C2 CE
Port C3 SCK
Port C4 MIOS
Port C5 MOSI
Port C7 CSN
This module has a 3.3v regulator on board so can be connected directly to the 5V supply from the EB-006.
Cheaper (E-Bay) modules are often only 3.3V so care must be taken when connecting them up.
I have built a customised E-Block with the remote sensor on this part of the project.
This is configured using the same type of “Patch System” built into most E-blocks.
Alternatively, it can be connected using the EB-016, in the same way as the HTU210 used on the Main Board
Note, if this method is used then a pair of ribbon cables will be needed as a single EB-016 cannot be connected to ports B and C simultaneously.
The LED is used to indicate when the board is transmitting.
It is simply turned on & off in the Flowcode program at a suitable point.
EB-005 LCD Display
This is just connected to Port D To give a local reading of the data being sent over the RF Link.
Main Board
1 EB-006 V9 Multi-programmer
1 EB-016 Proto-Board
1 nRF24L01 RF Module (With suitable aerial) (Sparkfun)
1 HTU210 (SHT21) Temperature / Humidity Module (Adafruit)
1 DS1307 Real Time Clock Module (Adafruit)
1 Custom 4 x 20 LCD Display
3 Ribbon Cables (M-F)
Connections
HTU210 Thermo-Hygrometer
This uses the I2C Bus to connect to the microcontroller.
Port B4 SDA
Port B5 SCL
Power is taken from the 5V supply on the EB-006
DS1307 Real Time Clock
This uses the component developed by Jordy
This uses the I2C Bus to connect to the microcontroller.
Port B4 SDA
Port B5 SCL
Power is taken from the 5V supply on the EB-006
Because of the delays between each page of data displayed on the LCD, display seconds has been turned off in the flowchart. Currently a 2 second delay between each page plus system overheads would make the seconds display inaccurate.
nRF24L01 RF Module
Port C2 CE
Port C3 SCK
Port C4 MIOS
Port C5 MOSI
Port C7 CSN
Port D Custom LCD Display
This uses a standard 4 x 20 LCD display, using the same control chip as the Matrix EB005
Operation
This is a simplified description of the operation of the Flowcode programs stored in the PIC connected to each EB-006.
For a full description of the operation of each component visit the Matrix TSL help pages.
Remote Unit
After initialising the various modules, the program goes into a loop.
Read the temp and humidity values from the HTU210 as integers.
Calculate Dew Point
This is done as an approximation
Dew Point = Temperature – ((100 – Humidity)/5)
An accurate calculation uses a quite complex formula, which is more than the requirement for this project.
Store Temperature, Humidity & Dew Point as Byte 0, Byte 1, & Byte 2 in the Transmit buffer of the nRF2401
It can store up to 32 bytes
The buffer is then transmitted
The Temperature & Humidity values are then displayed on the LCD
Short Delay
Clear LCD
Display Dew Point on the LCD
Short Delay
Clear LCD
The LED on the nRF24L01 is flashed.
The loop then starts again and reads the next set of data.
Main Board
After initialising the various modules, the program goes into a loop.
Read the Local Temperature & Humidity values from the Local HTU210 as Floats
Convert these to strings for displaying on the LCD
Read the buffer received from the remote sensor.
Store Byte 0 as Remote Temp
Store Byte 1 as Humidity Values
Store Byte 2 as Dew Point
Display both local, remote data values & the RTC values in 3 pages , with a short delay between them on the custom LCD display.
The remote values are sent as integers as the nRF24L01 cannot send floats directly.
If the sensor is offline a message showing this rather than the data is displayed.
This is done by checking for a signal at the start of the loop and jumping to a different path to show this.
Currently the system only has 1 remote sensor, but this can be expanded.
This project is only compatible with Flowcode 7 as the nRF24L01 component is not included in earlier versions.
Equipment Required.
Remote Sensor(s)
1 EB-006 V9 Multi-programmer
1 EB-005 LCD E-Block
1 EB-016 Proto-Board
1 nRF24L01 RF Module (With suitable aerial) (Sparkfun)
1 HTU210 (SHT21 Sensor) Temperature / Humidity Module (Adafruit)
1 Ribbon Cables (M-F)
The RF and Temperature Sensors can be sourced from several places; I have just named the type I’m using.
Matrix also supply a Thermo-Hygrometer board using the SHT21 sensor. (EBM016)
Connections
HTU210 Thermo-Hygrometer
This uses the I2C Bus to connect to the microcontroller.
Port B4 SDA
Port B5 SCL
Power is taken from the 5V supply on the EB-006
nRF24L01 RF Module
Port C0 LED
Port C2 CE
Port C3 SCK
Port C4 MIOS
Port C5 MOSI
Port C7 CSN
This module has a 3.3v regulator on board so can be connected directly to the 5V supply from the EB-006.
Cheaper (E-Bay) modules are often only 3.3V so care must be taken when connecting them up.
I have built a customised E-Block with the remote sensor on this part of the project.
This is configured using the same type of “Patch System” built into most E-blocks.
Alternatively, it can be connected using the EB-016, in the same way as the HTU210 used on the Main Board
Note, if this method is used then a pair of ribbon cables will be needed as a single EB-016 cannot be connected to ports B and C simultaneously.
The LED is used to indicate when the board is transmitting.
It is simply turned on & off in the Flowcode program at a suitable point.
EB-005 LCD Display
This is just connected to Port D To give a local reading of the data being sent over the RF Link.
Main Board
1 EB-006 V9 Multi-programmer
1 EB-016 Proto-Board
1 nRF24L01 RF Module (With suitable aerial) (Sparkfun)
1 HTU210 (SHT21) Temperature / Humidity Module (Adafruit)
1 DS1307 Real Time Clock Module (Adafruit)
1 Custom 4 x 20 LCD Display
3 Ribbon Cables (M-F)
Connections
HTU210 Thermo-Hygrometer
This uses the I2C Bus to connect to the microcontroller.
Port B4 SDA
Port B5 SCL
Power is taken from the 5V supply on the EB-006
DS1307 Real Time Clock
This uses the component developed by Jordy
This uses the I2C Bus to connect to the microcontroller.
Port B4 SDA
Port B5 SCL
Power is taken from the 5V supply on the EB-006
Because of the delays between each page of data displayed on the LCD, display seconds has been turned off in the flowchart. Currently a 2 second delay between each page plus system overheads would make the seconds display inaccurate.
nRF24L01 RF Module
Port C2 CE
Port C3 SCK
Port C4 MIOS
Port C5 MOSI
Port C7 CSN
Port D Custom LCD Display
This uses a standard 4 x 20 LCD display, using the same control chip as the Matrix EB005
Operation
This is a simplified description of the operation of the Flowcode programs stored in the PIC connected to each EB-006.
For a full description of the operation of each component visit the Matrix TSL help pages.
Remote Unit
After initialising the various modules, the program goes into a loop.
Read the temp and humidity values from the HTU210 as integers.
Calculate Dew Point
This is done as an approximation
Dew Point = Temperature – ((100 – Humidity)/5)
An accurate calculation uses a quite complex formula, which is more than the requirement for this project.
Store Temperature, Humidity & Dew Point as Byte 0, Byte 1, & Byte 2 in the Transmit buffer of the nRF2401
It can store up to 32 bytes
The buffer is then transmitted
The Temperature & Humidity values are then displayed on the LCD
Short Delay
Clear LCD
Display Dew Point on the LCD
Short Delay
Clear LCD
The LED on the nRF24L01 is flashed.
The loop then starts again and reads the next set of data.
Main Board
After initialising the various modules, the program goes into a loop.
Read the Local Temperature & Humidity values from the Local HTU210 as Floats
Convert these to strings for displaying on the LCD
Read the buffer received from the remote sensor.
Store Byte 0 as Remote Temp
Store Byte 1 as Humidity Values
Store Byte 2 as Dew Point
Display both local, remote data values & the RTC values in 3 pages , with a short delay between them on the custom LCD display.
The remote values are sent as integers as the nRF24L01 cannot send floats directly.
If the sensor is offline a message showing this rather than the data is displayed.
This is done by checking for a signal at the start of the loop and jumping to a different path to show this.