Announcement

Collapse
No announcement yet.

How to pick a micro controller?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to pick a micro controller?

    Hi,

    My only micro controller experience is arduino. I want to learn a faster micro suitable for PI detectors.

    Could someone give me a baseline of performance i should be looking for when selecting a micro?

    I want to be able to read the bulk of the flyback and perform processing between pulses.

    Preferably a micro with ADC fast enough that i dont need an external one.

    Are 32 bit processors over kill for this? I noticed some guys on here using them.

    Any opinions about micros would be appreciated.

    Thanks

  • #2
    Some personal observations... ARM might be the way to go. You might want to look at ST's STM32F series. The later F4s especially have plenty of processing power, and they're available inexpensively on ST's own Discovery line of proto boards. Programming is done by an USB cable and there's GCC compiler support for it, among other compilers. The proto board also serves as an in circuit programmer for later implementations, unless you want to use the built in STM32F serial port bootloader.

    There is plenty of time to process samples between the pulses in most PIs, so you might be better served by a rapid sample/hold circuit than a rapid ADC, you need to swallow the data as fast as it's pushed out in the latter case! A parallel interface would be likely.

    It's a good idea to look closely at noise characteristics with ADC datasheets - most microcontrollers give their internal ADC noise spec while converting in "sleep" mode at the slowest conversion rate, as MCU noise couples eagerly into the ADC. Therefore you might not get away from using an external ADC, at least not without sacrificing a significant part of your processing power for it. Also, as far as I remember no microcontrollers have 16bit or better ADCs built in, not because it's expensive but because of noise reasons which make for unconventional (expensive) solutions compared to external ADCs.

    The internal one is still good for reading potentiometers, temperatures, battery voltages etc

    Comment


    • #3
      Also, processing power depends on what you want to do. For 16/32-bit math, at 1MHz sampling, floating point etc. an ARM is likely necessary unless you are doing very simple integer add/subtract/multiply operations with those numbers.

      If you're starting out in microcontrollers, it may be a good thing to skip 8bit microcontrollers as the STM32 series is largely price competitive with present day 8bit microcontrollers. If you're positive that you don't really need more than simple math and precision timing sequences, you can probably get along with 8bit micros. They have definitely less pitfalls than the ARM processors do, and I've seen more AVR/PIC etc. around here compared to ARM. In other hobby forums, though, there will probably be several people happy to help with ARM related questions.

      And it seems that time and again the microcontroller slapped on the project hasn't had as many dB of success compared to the rest of the hardware and design concept.

      Comment


      • #4
        I want to be able to read the bulk of the flyback and perform processing between pulses.


        How long is the longest flyback time
        How often do you want to sample

        Then having these answers what are you going to do with the measurement data, would you store it all in an array and and then process your reads before the next TX pulse?
        or
        try and crunch like mad between samples? Then sit idle waiting for next Tx pulse. This sounds like the more expensive device.



        I was convinced by a work collegue to try the Ti MSP430 range and thier ok - low power is thier main sell - can be cheap too - The MSP430F5/6 are the bigger ones
        http://www.ti.com/lit/sg/slab034v/slab034v.pdf

        S

        Comment


        • #5
          old cell phone donor HW

          One other thing that is possible is to use an old cell phone.

          these are fairly quick at processing and have good A/Ds and a useful DSP, memory, display etc

          They often have differential IQ which I like..

          I used to use the Analog Devices chipsets like Hermes,Athena, etc when I did phones one time.

          S

          Comment


          • #6
            Thanks guys.

            I'll check them out.

            Mobile phone was an interesting and unexpected suggestion

            Comment


            • #7
              Two things often overlooked are timers and output compares. Single-processor metal detectors work much better when you can set up all your pulses to run autonomously, which frees up the remaining processor time to... err... process. The STM32 parts have fantastic timers, as do the DSPics which I am currently using. My DSPic has 16 OC's of which I am going to use most. It also has remappable pins which is a bonus. The ADCs are typically pretty-good-12bits. I use them for ancillary capture (pots and battery level) but not serious analog. Kinetis uP's have 16b ADCs but they are seriously lacking elsewhere and had bugs last time we looked.

              Comment


              • #8
                Another plus with the STM32's and DSPics is they have a fantastic dev boards.

                Comment


                • #9
                  Great, thanks a lot Carl. Was curious as to what u personally use :P

                  After spending 4 hours read atmel vs microchip threads i have settled on PIC.

                  Now its DSpIC vs pic32 threads :P

                  So you use an external ADC? Which one if u dont mind me asking?

                  Comment


                  • #10
                    Originally posted by brucester View Post
                    So you use an external ADC? Which one if u dont mind me asking?
                    Several 16, 18, & 24b from ADI, TI, & LT. Lots to choose from. Another thing to look for in a uP is a SPI engine which give autonomous data transfers from the ADC, and DMA support. The more work you can automate in the background, the easier everything else is.

                    Comment


                    • #11
                      Will do, thanks again

                      Comment


                      • #12
                        PIC chips have a massive selection and a 1st class toolchain so i would look at one of their products .
                        IMO ...........
                        BUT A look at the farnell website shows new boards popping up all the time with incredible features .

                        Comment


                        • #13
                          Originally posted by Carl-NC View Post
                          Two things often overlooked are timers and output compares. Single-processor metal detectors work much better when you can set up all your pulses to run autonomously, which frees up the remaining processor time to... err... process. The STM32 parts have fantastic timers, as do the DSPics which I am currently using. My DSPic has 16 OC's of which I am going to use most. It also has remappable pins which is a bonus. The ADCs are typically pretty-good-12bits. I use them for ancillary capture (pots and battery level) but not serious analog. Kinetis uP's have 16b ADCs but they are seriously lacking elsewhere and had bugs last time we looked.
                          Hi Carl,

                          Its a shame that the output compares don't work with the 32bit timer though. I have a feeling that at 70mhz the 16bit timer will run out of time before a full cycle is done, I think it will run out after 140~uS, though the clock speed could be slowed down a little, 14nS resolution is probably a bit overkill in some aspects, though useful in others. The 4X spi ports is a handy feature too saves waiting for each device to receive its data....

                          Brucester,

                          Perhaps design all the other ccts first, then decide on the features and speed you will require from a micro controller. If you select a micro then try and build a detector around that one, by the time you are finished you could well end up having to select a different micro. Though it is good to read up and see what features different micros have as this can influence your design too! So its a bit from both sides! I have been looking at the dspic33e in the 100pin package as I ran out of pins on the dspic33f 64pin. the E version is faster and has everything that the 33f does plus more.

                          Cheers Mick

                          Comment


                          • #14
                            Originally posted by Mechanic View Post
                            Hi Carl,

                            Its a shame that the output compares don't work with the 32bit timer though. I have a feeling that at 70mhz the 16bit timer will run out of time before a full cycle is done, I think it will run out after 140~uS, though the clock speed could be slowed down a little,

                            Cheers Mick

                            ?? the 32 bit timer works fine on OC on my pic32. If you must pick a micro make it a 32 bit ..they trash the 16 bit units for DSP speed and floating point. Only my opinion ... ;-)

                            Comment


                            • #15
                              On DSPic every timer has a prescaler to set the resolution; I can't imagine needing 14ns of resolution. Also, I think you can cascade 2 16b timers to get 32b, but I've never needed to do that. While I agree that 32b micros are better, the DSPic is more than awesome. If you really need 32b, then I would recommend jumping over to ST.

                              Comment

                              Working...
                              X