When we mention Prof. Dogan Ibrahim on these pages it’s usually to announce yet another mikroC-themed book from the prolific professor. Today we’re sharing an example of his practical work: a multifunctional weather station based on a MikroElektronika StartUSB board.

Professor Ibrahim’s weather station

The professor’s radio telemetry mini weather station is a data logging equivalent of a swiss army knife, measuring:

· Relative humidity
· Ambient temperature
· Atmospheric pressure
· Ambient carbon monoxide concentration
· Solar ultraviolet radiation
· Ambient nitrogen dioxide level
· Ambient air quality
· Wind direction

Additionally, Altitude and Dew point are also derived from the sensor measurements.

The StartUSB board equipped with PIC18F2550 (1) is the brain. The environmental measurements are handled by a mix of analog and digital sensors, as described by Professor Ibrahim himself in the following few passages.

(We slightly edited the professor’s words for brevity. Resulting errors, if any, are ours and not his.)

2. RHT03 humidity and temperature sensor. The digital output is connected to MCU port pin RB0 through a 4.7K pull-up resistor. After measuring the humidity and the temperature we can calculate the Dew point easily.

Now, just to interrupt the professor for a moment here. StartUSB is an older MikroElektronika board. Our newer hardware with the mikroBUS™ socket and click boards is much more convenient for designs like these. Clicker 2 boards come to mind here. As for click boards, temperature and humidity sensors are available with HTU21D click and DHT22 click.

Back to Prof. Ibrahim:

3. MPX4115 Pressure sensor chip, connected to analog input RA0 (channel AN0, or 0). The chip outputs an analog voltage proportional to the ambient Pressure.

4. MQ–7 carbon monoxide sensor. The chip requires its heater to be supplied with alternating voltages: 60 seconds at full power of +5V and 90 seconds at +1.4V. The analog output — connected to analog port pin RA1, channel A1 or 1 — is read at the end of the low cycle. The heater voltage is controlled from port pin RA4 (digital) through a transistor switch.

Our series of sniffing sensor include CO click which has exactly the same sensor.

5. ML8511, UV radiation sensor. Analog output, connected to MCU analog input port RA2 (channel AN2, or 2). The +3.3V power supply is derived by using three series connected diodes to the +5V supply (all other sensors on this weather station are operated from +5V).

UV click uses the same sensor.

6. ICS2710 nitrogen dioxide sensor. The sensor requires its heater to be heated constantly. Outputs an analog signal to analog input port RA3 (channel AN3, or 3) of the MCU.

7. TGS2600 air quality sensor (measures concentrations of CO, hydrogen, methane etc). The sensor requires its heater to be powered continuously. The analog outpus is connected to MCU analog input RA5 ( channel AN4, or 4).

Air-quality click is the mikroBUS™ solution here. Other “sniffing” sensors include Methane click, Hydrogen click, Alcohol click, air quality click.

8. Vortex Wind Speed: A rotating cup wind speed sensor based on a Hall Effect switch (closed once at every rotation of the cups). The digital output is connected to MCU port pin RC0. The sensor’s output pulses are measured for 10 seconds. The wind speed is then calculated in mph.

A series of Hall effect sensor click boards are available. For switches, check UNI HALL click and BI HALL click. For linear measurements check LIN HALL click.

9. E-vane Wind Direction: This sensor is a rotating vane. The sensor gives out an analog voltage which is proportional to the direction. The North direction is set to 0V. By reading the output voltage through an ADC we can find the actual direction the sensor is pointing to. The output of the sensor is connected to MCU analog pin RB2 (channel AN8, or 8).

The data read from the sensors are sent to the receiving stations using a Radiometrix transmitting modem chip. In this kit the TXL2 modem module is used, but any other model could also be used. The data is sent in RS232 serial format through the UART of the MCU.

The receiving side is based on the compatible RXL2 radio telemetry receiver module.

Now that you’ve read all this, you can do one of the following: use it as small-talk material if a stranger in an elevator starts talking to you about the weather (yeah, speaking about the weather, let me tell you about this 8-bit PIC microcontroller weather station…)

Or, a better option is to get inspired to make something on your own. Would you build a more streamlined or a more versatile weather station? For option A, check out the mikromedia WiFi weather station on Libstock.

If you want to learn more about professor Dogan Ibrahim — and learn more about mikroC for PIC in the process — check out some of his books. We presented the majority of them in an article from last year. For a complete list visit the publications section on our site.

Yours sincerely,

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn