Recommended Microcontrollers?

Discussion in 'Embedded Systems and Microcontrollers' started by bumclouds, Aug 11, 2008.

  1. bumclouds

    Thread Starter Active Member

    May 18, 2008
    82
    0
    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!! :)
     
  2. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    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
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  4. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Its good to buy some cheap microcontrollers from e-bay even if they have more inputs/outputs
     
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    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.
     
  6. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    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
     
  7. RiJoRI

    Well-Known Member

    Aug 15, 2007
    536
    26
    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
     
  8. roddefig

    Active Member

    Apr 29, 2008
    149
    0
    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.
     
  9. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    144
    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
     
  10. bumclouds

    Thread Starter Active Member

    May 18, 2008
    82
    0
    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.
     
  11. John Luciani

    Active Member

    Apr 3, 2007
    477
    0
    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 *)
     
  12. yubyub

    Member

    Aug 13, 2008
    19
    6
    In my opinion atmels are pretty much all the same, you basically chose one for more functionality or number of pins.
     
  13. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    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
     
  14. bumclouds

    Thread Starter Active Member

    May 18, 2008
    82
    0
    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?
     
Loading...