Project #1 - choosing microcontroller


In every project there are some decisions to make at the beginning which influence all further steps. In small embedded project probably the most important choice is about the microcontroller. At first I wanted to use ARM microcontroller, more specifically Atmel SAM7X. I have experience in programming these μCs in C, they are reliable, powerful, not very expensive, and you don’t need any external programmer to program them (thanks to SAM-BA). I have a minimodule based on SAM7X256 I bought to play with it, but never made anything useful of it, so I thought I’d put it into the thermostat. But on Friday evening I checked everything up once again, and I totally changed my mind. Atmel SAM7X256 is at least 20 times too powerful for a simple project like mine - it would be stupid to waste it to click a relay two times a day.

My natural second choice was Atmel AVR. These μCs are extremely popular in PL among hobbyists. Professionals also widely use them - in commercial applications engineers usually have to cut their costs and use reliable solutions. There are tons of code and resources for AVR on the web, and also official application notes on Atmel’s webpage. I did one little project with AVR Atmega8 about six years ago - it was a basic mobile robot. I used very cheap LPT programmer, and coded robot behaviour in BASCOM - simple BASIC-like language for beginners. Nowadays LPT port is quite uncommon. Luckily I have an ISP programmer, which I bought to play with some other stuff, but never made anything useful of it (there seems to be some pattern here). I’m also not going to use BASCOM anymore - I feel that C has the right power to ease of use ratio for me.

After choosing μC I decided that I’ll be making my circuit board from scratch by etching. I always did my circuits on protoboards using greenwire (kynar) to make point-to-point connections. It’s great for prototyping, but it’s slower and less reliable. Using a protoboard is also bad psychologically - I want to finish my thermostat fast, not prototype it forever.

The next step is to choose some CAD software for PCB design, and get to some real work.