LED wind indicator Using atmega8 Microcontroller

wind indicator

I have something with the weather. I always like to know how warm or cold it is, how much rain has fallen, how hard the wind blows and from what direction,… and so there are lots of sensors around our house to keep me up to date. These sensors give only a limited range of data, so I still need the internet to inform me about everything I want to know.
I am lucky because one of the national weather data collecting points is located in the village where I live. And all its data is to be found on the internet, together with the data of all other collecting points and predicions for the upcoming days in a very handy XML-file.

wind indicator

The only drawback is that you always need a computer to acces that data. So I decided to start buiding a device to display the data without a pc. This wind indicator is a testversion, displaying only the wind direction, its force and a prediction for the next day. It is connected to a pc via a USB to RS232 converter, but the future project should be able to work as a stand alone version.

What do you need

  • 31 LED’s
  • 10 x 150Ohm resistor
  • 1 x 1K5 resistor
  • 1 button
  • 2 screwterminals
  • 1 isp 10pins connector
  • an atmega8
  • a 100nF capacitor
  • a USB to RS232 cable or something similar. ( I use the RX and TX pins of an xbee to USB connector)
  • a programmer
  • python 2.6

I made this project with smd components, but it can be build with thru hole parts. I also used a lot of copper thru hole links. These are completely optional, you can use a soldered wire to connect the 2 layers.

The circuit for this project is very simple.
28 leds are arranged in two matrixes.

  • One is a 4×4 matrix connected to Port B of the microcontroller. Those leds will point the direction on the compass card.
  • One is a 3×4 matrix connected to Port C of the microcontroller. Those leds will display the force of the wind on the Beaufort scale.

The 3 remaining leds are used as indicators

  •  Two leds on PortD.3 and PortD.4 indicate indicate whether it is actual data or a forcast.
  •  One led on PortD.7 flashes when new data is received.

Don´t forget the 150Ohm resistors for the leds,

The button is connected to Pind.2 (the INT0 pin) with a 1K5 pullup resistor on one side and ground on the other side.

The ISP connector is added to the miso, mosi and sck pins Port B and with the reset pin.

RX and TX (PortD.0 and PortD.1) are connected with a screwterminal. This will enable us to add our RX an TX lines from the USB to RS232 cable.

Add a screwterminal for power and don’t forget a 100nF capacitor between the lines.

Read more: Using atmega8 Microcontroller: LED wind indicator

Leave a Comment

Your email address will not be published. Required fields are marked *