Recommended Microcontrollers?

Thread Starter

bumclouds

Joined May 18, 2008
81
Hey guys,

Im looking into designing something for a Uni project. What we have in mind is a "Home Automated System". What we are going to do is find a model house (perhaps a doll house) that resembles a real house and design a system that can remotely control door locks, blinds/curtains, lights and heating.

With the heating we're obviously not going to use a real heater, just something like an LED that shows the user that the "heater" has been switched on.

My question to you guys is this: What microcontroller would you suggest for this job?

These are some of the things we will probably need to take into account when choosing our microcontroller:

  • We don't have very much experience at coding assembly language, however we've had a fair bit of experience with coding of C and C++.
  • Cost isn't really much an issue.
  • With the heating, we plan to use a thermistor such as the LM335Z to indicate to the system whether or not the room needs to be heated. So the microcontroller might have to have analogue inputs.
  • We will be using stepper motors for the blinds/curtains.
  • And electromagnets for the door locks
  • We may think about adding in a security feature to the system such as an access pin at some later date.

Any recommendations for a microcontroller would be greatly appreciated! Something that is easy to use and program would be absolutely ideal!!!

Thankyou!! :)
 

mik3

Joined Feb 4, 2008
4,843
You have to tell us how many outputs and inputs you need. A fairly good one with many inputs/outputs is the PIC16F877A. Another more powerful i used is the PIC18F4685
 

SgtWookie

Joined Jul 17, 2007
22,230
As Mik3 was inferring, Microchip's PIC line is quite popular, and gaining more popularity by the day it seems. You can even get started pretty inexpensively with a PICkit 2.

You can do most of the programming in a version of C. A somewhat limited version of HI-TECH's C compiler is included along with the MPLAB IDE that's shipped on a CD with the PICkit 2. They have a debugging kit version of the PICkit 2 that comes with a 44-pin SMT version of the PIC16F887 on a dev board; not a bad deal at all for under $50. The 16F887 has 35 I/O pins. It's available in a 40-pin DIP version as well.

You CAN program them in a version of Basic, but the compiler runs around $250.

Another option might be a Parallax Basic Stamp BS2p40; however these are quite pricey just for the uC itself at $89. Also, since they run in "interpreted" mode (tokenized code is looked up in an onboard library), they are quite slow compared to a PIC which runs native machine code.

But first, you will need to define what all of your inputs and outputs will be. That will eventually result in a minimum specification for a controller.
 

beenthere

Joined Apr 20, 2004
15,819
In case there seem to be an unmanageably large number of inputs (all the window sensors, for instance), don't forget that the sensor states can be stored in external registers that can be read by the uC with many fewer pins required.
 

hgmjr

Joined Jan 28, 2005
9,027
I would take a look at ATMEL's AVR family of microcontrollers in addition to Microchip's PIC family. Here is a link to a post with all of the pertinent links in it.

You can get started with AVR software and hardware development for less that $100. The assembler and the c-compiler are FREE.

hgmjr
 

RiJoRI

Joined Aug 15, 2007
536
I hope you realize there are items on the market that do this already! It's an alarm system with access control and X-10 functionality. Some alarm systems come with a Home Control interface to allow communication with a computer. (I know this, 'cause I write the control programs for the alarm systems. :p )

Almost any controller will work. We've used Nat.Semi HPC chips (no longer available), 8051-derivatives, and ARM-7 chips. The hardwired protection zones are limited to less than 10 zones; after that we use a serial loop for up to 250 zones.

We developed a Thermostat module that used a Dallas Semiconductor digital thermometer. It was simpler for us to get the temperature from the chip than to try to do A/D conversions.

A dead-end we looked into was sunrise-sunset timers for controlling lights. It was just too complex in a stand-alone operation; also, the question of heavy clouds (or mountains) -- cases when a real human would keep the lights on for longer -- was also a problems. A light-detector would have been better.


HTH,
--Rich
 

roddefig

Joined Apr 29, 2008
149
You can get started with AVR software and hardware development for less that $100. The assembler and the c-compiler are FREE.
I should add that the C compiler is gcc, so you get a powerful C compiler, a well done standard library, and great documentation IMHO. And, if you're already familiar with gcc you can skip the initial downtime spent figuring out the development process and language idiosyncrasies.

As far as requirements you mentioned, almost any microcontroller with enough pins will fit the bill, just make sure you pay attention to the function(s) of each pin (read the datasheet carefully) so you don't end up in situation where the only pin with an ADC needs to be used for something else.
 

Dave

Joined Nov 17, 2003
6,969
Another more powerful i used is the PIC18F4685
I'll second the suggest of the PIC18Fxxx series of microcontrollers - gives more than enough bang for the buck. Get over to Microchips website and get the free student version of the C18 compiler which works with the 18-series of PICs (but not the 16 series).

Dave
 

Thread Starter

bumclouds

Joined May 18, 2008
81
Okay guys thanks for all the advice. I'm thinking about either the 18-series of PIC's or the Atmel AVR family at this stage.

Out of the Atmel AVR's which are the most commonly used/most popular? The reason why I ask this is because I would like to use a uP with lots of community support.
 

John Luciani

Joined Apr 3, 2007
475
Okay guys thanks for all the advice. I'm thinking about either the 18-series of PIC's or the Atmel AVR family at this stage.

Out of the Atmel AVR's which are the most commonly used/most popular? The reason why I ask this is because I would like to use a uP with lots of community support.
The ATmega168 (28 pin dip) is very well supported. There are a variety of PCBs available
and the Arduino tools work with this chip. Using the Arduino bootloader and an FT232
serial-to-USB converter you can to development using a PC running Linux, MAC or
windows. A lot of the Arduino compatible boards have USB ports.

I have some schematics and application information for my board (ZB1) at
http://www.wiblocks.com

(* jcl *)
 

hgmjr

Joined Jan 28, 2005
9,027
bumclouds said:
Out of the Atmel AVR's which are the most commonly used/most popular? The reason why I ask this is because I would like to use a uP with lots of community support.
To elaborate on what has already been said, once you have familiarized yourself with one AVR 8-bit mcu you will pretty much know them all. They all share the same common architecture and the same programming method. The difference is one of memory capacity as you go up the family tree.

hgmjr
 

Thread Starter

bumclouds

Joined May 18, 2008
81
Okay I've chosen the atmega324P microcontroller because it has plenty of memory and I/O pins, and it also works with the AVRDragon debugger. I've also decided to go with this development board. Sweet looking dev board huh?
 
Top