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.
I build the flash detector that was developed by Peter during his weather station project. Details can be found here.
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.
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:
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.
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.
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.
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.
Returns the version string of the software in the device.
Retrieves the next stored record from the internal data store. The parameters returned are:
Returns the general device state. The parameters returned are: