Case: Environment sensing, part 1

Posted on ke 28 kesäkuu 2017 in Articles

First counter with hard core embedded programming

Point of this project was to do something somewhat useful while learning the basics of embedded programming in low level and using microcontrollers instead of a computer. We decided to do a weather station almost from scratch.

What is microcontroller? It is tiny computer that is built in one small chip. Microcontroller has microprocessor (device that actually executes the code, see, IO module (thing that drives microcontrollers pins high and low), memory and other stuff (peripherals, like serial port or AD converter == analog to digital converter =voltage meter).

How microprocessor then works?

Basically, microprocessor takes command, executes the command, stores result to the memory. Command can be almost anything but all the basic possibilities are defined in manual. These commands are not so low level that most of them could be easily defined in physical way but most are still pretty simple. So, microcontroller is just like a computer but it just has more limited possibilities. This also means it most likely will do exactly what you want and has less bugs and viruses as they are quite simple (and stupid).


We used my company’s board as platform because it was simple and let us to go deep into the basic details of such a project. Also, easy access to help was one considered point 😊

First, we planned what the weather station should do: Have multiple sensors (mainly temperature and humidity) that we could connect as many as we wanted to create heatmaps from changes affecting for example one room. Could be interesting to see how moisture or heat spreads across the room.

Second, we drew diagrams etc. so show how physically the system would look like and what connectors or cables we were gonna use:

Third, we got all needed parts from my company: boards, programming tool, sensor components, cables…


Fourth, we got to know to the process of designing and etching PCBs (process is its own story) as we needed PCBs underneath of our sensors. Those PCBs were not ready for us, so they needed to be created.

Fifth, we did the code.