This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Which one?

Other Parts Discussed in Thread: ENERGIA

Hello:

Thank you for reading my post.

I am a retired electrical engineer and physicist now working as a freelance consultant. I have been asked by a client to redesign the control system for some ultrasonic cleaning tanks. It will require several selectable timing cycles and contro of temperature of the bath. The inputs will be from panel label switches, temperature sensors. There will be a drain and filter cycle.

I have completed several projects using Arduino but would now like to use a microcontroller for this system. Can anyone suggest which microcontroler to start with? any available starter kits? programming manuals?

Thank you very much.

Bela

bkalaska

  • Hello Bela

    That's a big question!  I'm surprised to see that no-one has yet offered any advice.  Here are my thoughts though.

    If you intend to invest time and perhaps a modest sum in learning a microcontroller family, you will want to get the maximum return for your trouble.  Return here comes in the form of being able to apply what you've learned (and bought) to not just the initial task but also ones to come.  You also ideally want to choose a family that has a good range of devices so that if you have a project that needs a certain mix of peripherals on the microcontroller, the vendor has a chip with that mix.  There's also the cost of development tools to consider, including compilers (if you intend to program in C rather than assembler - C is faster to write and I prefer it).

    At the risk of offending TI devotees, there are several choices available including what are probably the most popular families: Microchip PIC and Atmel AVR.  These are both 8 bit families but each vendor also offers 16 bit and larger families (up to 32 bit, I think - as do TI).   I've used both PIC and AVR and there is plenty of choice.  There's a free compiler for AVR called WinAVR but I don't think there's a free one for PIC.

    My most recent project called for a peripheral mix that was a bit expensive on PIC or AVR, so I turned to MSP430 'value line' - a bit cut down but nevertheless very featured.  I have to say I have found this an excellent choice.  There's a free compiler (Code Composer Studio - CCS) and a big range of devices with all sorts of peripherals.  Moreover being 16 bit devices, they are good performers and have a lot of flexibility in the power they use.  I certainly intend to use them more often in future because of the power features.

    Whichever family you choose, you'll need a programmer/debugger to let you get code into the chip and allow you to halt the program to inspect why it's not working as you think it should.  For PIC: ICD3.  For AVR: Dragon.  For MSP430: MSP-FET430UIF.  Prices are on the repective websites (or Farnell).  These all allow in-circuit debugging (provided you keep the required pins free for this purpose) so you can debug on your final hardware quite easily.

    If you will produce your own PCB for the controller, then you really only need a development board for playing around with the microcontroller - to see if your software ideas work in principle.  Some of these boards (most, in fact) can be hooked up to external circuitry to allow the micro to interact with your hardware - whether finished boards or breadboard, or a combination of both.

    Some of the development boards could be used complete as they are, as a component in your application.  It might be worth exploring this approach if you're not making many of the controllers.  You can get things like USB connectivity (will they ever need to connect a laptop for diagnostics/calibration?), Ethernet, LCD displays etc that can all make life easier.

    From what you've said, my choice would be to purchase a TI Launchpad for MSP430 from Farnell for about £4, then download CCS and try out your ideas by connecting the micro to your external hardware.  If the micros that come with the kit run our of steam, you could buy a more powerful one or switch to another family without having spent a fortune (I don't think this is likely from your description of the application - the Launchpad comes with quite a powerful device - I would guess it will do what you want.  Look up its features to see if you think it might do the job).  http://www.ti.com/tool/msp-exp430g2  If you like it, you could invest in the programmer/debugger tool for when you gat boards made.  This is exactly what I did in my current project and I'm very happy with everything - now just putting the finishing touches to the design.

    I did find the documentation on the MSP430 hard to get to grips wtih at first (and I think this is a bit of a hurdle for most newcomers) but don't let that put you off.  There's the investment!  Download the User Guide for the micro family and the data sheet for the individual chip.  If you use the Launchpad, start with the most featured microcontroller - you can always downscale once you know you need less memory/peripherals.

    Hope that helps in some way!

  • Bela Kaltenekker said:
    I have completed several projects using Arduino but would now like to use a microcontroller for this system. Can anyone suggest which microcontroler to start with?

    Isn't Arduino based on microcontroller? (just curious)

    [edit] All microcontrollers are more or less similar. What you need to know - what's inside and how they work. Basically Arduino (which is just abstraction layer) depends on microcontroller rules so you are already familiar with most of what you shall know. The rest is just implementation differences/details. When I started - I red the books :)

  • Hi Tony:

    Thank you for this very valuable information. Do you maybe have an email address I can contact you on? Mine is bkalaska@yahoo.com.

    Thanks again,

    Bela

  • Tony Payn said:
    At the risk of offending TI devotees,


    You don't (at least not me)
    Tony Payn said:
    there are several choices available including what are probably the most popular families: Microchip PIC and Atmel AVR.  These are both 8 bit families but each vendor also offers 16 bit and larger families (up to 32 bit, I think - as do TI).

    The key for selection is in the requirements. If the application requires low power, especially if battery driven, the MSP is definitely the way to go. Much bang for the buck (and the mAh).
    I personally dislike PICs (I've had to work with them, even before I started using MSP430). Especially the smaller ones, which are quite low-power too, are so limited in their capabilities and so terribly weird to program (only one interrupt vector, limited interrupt cpabilities, strange hardware call stack, banked ram) that they aren't good for anything more complex. Also, programming them took an eternity.
    Well, th newer ones are better, but also bigger, more expensive and more energy-consuming.

    I also worked wiht the ATMega128 (and still do), but it is a bit overkill for most applicaitons. And the Harvard-architecture, while providing some additional addressing space, makes some things quite difficult.
    Also, the bad thing with ATMegas is, that each one has its own peculiarities, even on assembly level. On MSPs, at least the core is the same for all (or backwards compatible, if you move on to the latest families with 20 bit X2 core)

    The wide variety of MSP430 variants and the vast amount of available internal modules, combined with the fact that all of them are following the same base structure and programming principles, makes this family so useful. Even though there are of course limits when you need high data throughput, high processing power, or need to attach peripherals directly to the address and data bus.

    For some MSPs, there is Energia, which makes using the MSP430 simple for those who are used to Arduino.
    And there's GRACE for a simple static setup of an MSPs hardware. Or the driver library with support for most of the peripherals. And debugging MSP430 is very easy.

    A big advantage of the MSP is also the low startup costs. The LaunchPad comes with (limited) JTAG interface, the compiler is free (even though limited in maximum code size, but that's negligible for smaller projects). Same for the wide variety of experimenters boards and target boards.

    Tony Payn said:
    I did find the documentation on the MSP430 hard to get to grips wtih at first (and I think this is a bit of a hurdle for most newcomers)

    I agree here. But once you get used to it, you'll see how easy it is to migrate between different MSPs or even MSP families. On the other systems, each device stands on its own, with its own complete documentation. Which makes migration a very hard job, even though might make working with one single device easier.

    Tony Payn said:
    you can always downscale once you know you need less memory/peripherals.

    That's anothe rgood thing with MSPs: for most devices, there are othe rdevices with mroe or less ram/flash but identical pinout and internal peripherals. So scaling up or down is simple. You don't need to buy the whole pig if you just need some bacon. Sometimes, there are even pin-compatible version with and without expensive peripherals like ADC. Which can reduce costs further if oyu don't need this component now but migh tneed it later, on the next project or the next version of the same.

  • Thank you Jens-Michael, excellent stuff.

  • Bela,

     

    I'm a complete newbie and just went through this. I had only done a little bit with Arduino's before I took this on. You almost certainly will know more than I do based on your background and education.

    What I found to be successful for me was to get an MSP430 Launchpad for about $10 US - and to download the free Code Composer Studio. Then I used a Tutorial called the "MSP430 Launchpad Workshop v_2.22" - which is a pdf that can be downloaded. The tutorial went though clocks, UARTs GPIO, timer and io interrupts, low power modes, etc.

    It worked for me. I'd take the tutorial and then make your decision.

    This forum and the 43oh forum are VERY GOOD sources of help as well. I can't say enough about the responsiveness of the people on this forum.

    As a final note, I also downloaded and tried Energia, but the Code Composer Studio just had far too much power (and extra tools like GRACE). So once I did the tutorial - which used CCS - I stayed with it.

    Good Luck!

**Attention** This is a public forum