As you can see on Filderwetter.de the weather related data (outside temp, rain, wind, etc.) is handled by the ELV hardware and the corresponding 434MHz data-receiver.

My old ELV hardware does not support a light meter, so i decided to build one by myself. The hardware is based on a very simple ATMEGA 8 board by Olimex.

The device is capable of taking measurements in a defined interval and storing the data in its internal buffer. As an additional feature the device support a lightning detector device and a real-time clock.

The device is connected to the weather server via a simple serial link (RS232). The power supply is a simple wall-mount type.

For a quick status info a text LCD is mounted on the front of the device.

Hardware

Base hardware

front view flash_ctrl_front rear view flash_ctrl_rear mainboard flash_ctrl_top

Lightning detector

I build the flash detector that was developed by Peter during his weather station project. Details can be found here.

The schematic i used: .flash_ctrl_det

Software

Communication

The communication with the server is handled via a simple serial RS232 link. The weather controller is a passive device, it will never send data over its serial link without an request from the server. The communication is a simple ASCII protocoll, which is easy to implement and to test on both sides.

Protocol

The protocol is completely based on ASCII characters. A data block sent to the device by the host or vice versa is always started with the $ (dollar) character and terminated with the # (number) character.

The following commands are supported by the weather controller:

t

Return the current time of the internal real time clock. The devices answers with t and the actual time in seconds since 1.1.1970 00:00:00 as ASCII string.

Host>device: $t#
device>Host: $t1234557#

T

The time is set in the unit. The host has to provide the number of seconds since 1.1.1970 00:00:00 in ASCII format. The device responds with the new time in the device in seconds since 1.1.1970 00:00:00.

Host>device: $T1234455#
device>Host: $t1234455#

i

Return the number of seconds between to measurements taken by the device. The device answers with i and the number of seconds in ASCIII format.

Host>device: $i#
device>Host: $i60#

I

Sets the new measurement interval in the device. The host has to provide the interval in ASCII format. The devices responds with i and the number of seconds set in the device.

Host>device: $I70#
device>Host: $i70#

v

Returns the version string of the software in the device.

Host>device: $v#
device>Host: $v1.2#

n

Retrieves the next stored record from the internal data store. The parameters returned are:

  • the timestamp of the recorded data
  • the value of analog channel 1
  • the value of analog channel 2
  • the value of analog channel 3
  • the value of analog channel 4
  • the lightning ticks received in this interval
Host>device: $n#
device>Host: $n12345,1024,2048,3192,256,32131#

s

Returns the general device state. The parameters returned are:

  • The timestamp when the next data is stored
  • The size of the internal ring buffer
  • The write pointer position in the ring buffer
  • The read pointer position in the ring buffer
  • The number of seconds between measurements
Host>device: $s#
device>Host: $s1234567,32,10,2,60#

Links

2014 CW (Morse Telegraphy) was added to the German Nationwide Inventory of Intangible Cultural Heritage.

Logo