Right microcontroller

Discussion in 'Embedded Systems and Microcontrollers' started by nathomas, May 5, 2011.

  1. nathomas

    Thread Starter Member

    Mar 3, 2011
    82
    0
    My need is a microcontroller with

    - 3 analog inputs
    - 6 outputs
    -1 relay driving
    -1 pwm
    -1 analog
    -2 digital reading
    -2 led outputs

    Could anyone recommend a microcontroller for the purpose which is easy to program and i could buy the programming and test kit fast.

    Thanks.
     
  2. BillO

    Well-Known Member

    Nov 24, 2008
    985
    136
    Sounds like you are new to the game.

    If ultimate speed is not a major concern, I'd recommend the PICAXE 20M2. Costs about $6. It needs no programmer, just a serial cable, and the development environment and BASIC language are free.

    If speed is a major concern, the the pic it is based on (don't know off hand the part number) would be a better choice, but you'll need to buy a programmer. A limited version of 'C' is available for it for free, but for anything complex, you will have to pay.
     
  3. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    You will almost certainly need a transistor for the relay, so a normal output can be used.
    How fast and how accurate do the analog inputs and output need to be? Analog output is fairly rare but if it doesen't need to be very fast then pwm and a filter can be used.
     
  4. nathomas

    Thread Starter Member

    Mar 3, 2011
    82
    0
    This is a temp control circuit. Using an rtd. I have used microcontrollers before but a long time back and those were for measly projects. The circuit should be fairly accurate to around 1deg change and speed is not a major concern. but eventually i might change the analog reading to digital that is why i need the digital led outputs too. i would need pwm to control a fan. the other thing is whether a pic is easier in programming or is ther anything better. i am good at c programming. this has to be sturdy and reliable. what abt the atmega 16L8au. or the pic 18f452.?
     
  5. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Grab an arduino or a picaxe.

    $30 and you are off and running.

    Picaxe can be programmed in BASIC and the Arduino in C-ish ;)

    Both have enough to do what you want.

    Flipping a coin will be MUCH easier than asking for the best. Too many fanboys.
     
  6. nathomas

    Thread Starter Member

    Mar 3, 2011
    82
    0
    well the problem with the arduino or the picaxe is that I want this on a breadboard that fits my specs. as a development kit it is fine but eventually i need to know which microcontroller i can use.
     
  7. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    The PICAXE chips are just that, available in DIP or surface mount, so you can use them on your own boards.
    If you want to use a PIC with C then you can download MPLab IDE and one of the C compilers for free to test it out without buying anything. I think the same is true for Amtel.
    They are probably both about as easy (or hard) to use.
    I'm still a bit confused about the outputs. Is the analog output for a panel meter? What is the digital LED output device that you wanted to use?
     
  8. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    I don't think any common microcontroller has an analog output. As Markd77 said, you can fake it with PWM if it's not a high-performance situation.

    My favorite is the PIC16F690; it has lots of stuff in a 20-pin chip. But in general the best advice in selecting a processor is "whichever one you feel most comfortable with". Because if you have to learn the processor and write the program at the same time, you've got two intersecting problems.
     
  9. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    You will be able to do all you want to do with AVR or PIC microcontrollers. The relay drive will entail the use of a driver stage with either of these microcontrollers. The suggestion of PICAXE or ARDUINO are good ones if you want to avoid the need to design your own board. I can speak to the fact that with the Arduino you will not need to buy either programming software or a microcontroller programmer. Either PICAXE or ARDUINO are great ways to get near instant gratification.

    hgmjr
     
  10. BillO

    Well-Known Member

    Nov 24, 2008
    985
    136
    The PICAXE 20M2 has a DAC. This chip will fit his needs for under $10 total.

    Go here : http://www.rev-ed.co.uk/picaxe/ and look for the 20M2.

    EDIT: Just checked. Looks like they have been working hard to make a liar out of me. The PICAXE-20M2 has now been superseded by the PICAXE-20X2, which does not have a DAC. However, it does have 2 high precision PWM outputs, so they might work just fine with filtering. You might aslo still be able to get the 20M2 from old stock somewhere.
     
    Last edited: May 5, 2011
  11. HallMark

    Member

    Apr 3, 2011
    89
    5
    If we are talking about the cost then TI's Launch PAD kit is nearly about 4$ but have to check the IO is enough or not.
     
  12. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Get a PICKIT 2 or 3 programmer. Then bread-board with any chip that suit you. Do not go down the PICAXE alley. PICAXE is just flim-flam.
     
  13. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    You can pull the arduino off of the board and use it on the breadboard.

    You can also use many AVR(Atmel) chips and load the Arduino bootloader on to it, (requires a friend with a programmer ;) )
     
  14. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    If you do that. put a an extra socket on the MCU. So you are working on the socket, not the chip. The you take it in and out of the circuit. The chip pins will very quckly break. If you do not protect them in a socket.
     
  15. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Very true.
     
  16. nathomas

    Thread Starter Member

    Mar 3, 2011
    82
    0
    Thanks everyone. I ended up buying the PicKit 2 starter kit. I think it suits me fine. Got it for $50.
     
  17. terra

    New Member

    May 12, 2011
    13
    0
    You can buy Cortex M0 or M3 MCU from NXP, ST, TI or many more with inbuild ADC tless than $3
     
Loading...