Choice of Microcontroller

Discussion in 'Embedded Systems and Microcontrollers' started by knibknob, Apr 22, 2010.

  1. knibknob

    Thread Starter New Member

    Apr 22, 2010
    15
    0
    Hello all, I am continuing a previous project, which involves an integration of a stepper motor, an encoder, a power sensor, and 2 limit switches. The previous project had been controlled by an Arduino micro-controller through processing, but now those in charge wish to swap out the micro-controller and control it via C#. I am quite new to this, and was wondering if people could give some suggestions as to which micro-controller to use. The criteria is that it can integrate all of the above components, and be controlled through C#. Thank you for assistance in advance, and I look forward to a timely response.
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I do not think any MCU can be programmed in Microsoft C#. Does your person(s) in charge want to move from a MCU based platform to a PC platform. Or do they want to replace the Arduino board with a more dedicated MCU system.
     
  3. knibknob

    Thread Starter New Member

    Apr 22, 2010
    15
    0
    I believe the interface is through the PC. For example, when we used the Arduino, we could give commands through the PC, as well as obtain measurements through the sensor to the PC. I think as long as the PC can communicate (using c#) through the serial port with micro-controller, it's fine, even if the MCU is programmed with some other language such as assembly or C. I believe the reason they wanted to replace the Arduino was in favor of a more dedicated MCU, but I am not sure, sorry =(.
     
  4. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Regardless of the language on the PC side, the commands the uC gets is whats important. You can program in alien on the PC as long as the outputted commands are understandable at the uC input.
     
    kingdano likes this.
  5. knibknob

    Thread Starter New Member

    Apr 22, 2010
    15
    0
    Oh thanks for clarifying. Sorry, its just that the people in charge are insistent on using C#. I've been googling and it looks like using the System.IO.Ports namespace, C# can communicate with the serial port. Is there really no way to output understandable commands to the uC?
     
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    C# would do just fine for the software on the PC communication with the MCU using RS232
     
  7. knibknob

    Thread Starter New Member

    Apr 22, 2010
    15
    0
    Thank you very much for that suggestion; I am looking into the RS232 uC. However, I was wondering if it would be able to handle all the components? It seems that it has some limitations in speed; is it stronger than the Arduino? Also, I was wondering if anyone knew the major types of uC's, or had a tutorial on them, because I would like to know the advantages and disadvantages of the different types of uC's, and therefore make an well-informed choice. Thank you for your assistance!
     
  8. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Rs 232 isnt a uC. It is a serial communications protocol and port on the computer. The rs-232 is the port you could have C# talk to and the uC would listen on the other end. Many uCs support it. And many are at least as powerful, if not more so than the ATMega128 or 328 that comes on the Arduino board.
     
    kingdano likes this.
  9. knibknob

    Thread Starter New Member

    Apr 22, 2010
    15
    0
    I see, thank you for the clarification. However, it's pretty obvious I know pretty much nothing, but I have to choose a uC very soon. That is why I am looking for some basic background information, and hoping for advice on which uC to use from people more knowledgeable. If there are any questions feel free to let me know.
     
  10. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    If you were happy with the arduino, why not use the chip the arduino uses?

    Use the ATMega328. That is the uC on the Arduino board. You can use a Maxim 232 Rs232 to talk to the chip and your in the running.
     
  11. knibknob

    Thread Starter New Member

    Apr 22, 2010
    15
    0
    Well actually, according to the person who was using the Arduino, he said the Arduino was not fast enough, which is why they are considering switching. Also, I may be wrong, but it seems that the rs232 has a lower data rate speed, would that pose a problem? Basically, is there a uC that can integrate all the components, is faster than the Arduino, and perferably through a USB? (since using an rs232 seems more complicated to program than usb) Thanks and sorry for all the trouble =/
     
  12. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Ok, are you looking for a uC or a development board?

    The Arduino is not a uC. It contains a uC.

    microchip.com has a product finder that will allow you to choose a uC based on what options you want on board.

    Any uC you get will just be a chip. You need a programmer to but the firmware on the chip. You need a way to get your software on the PC to talk to the chip. Thats what the Arduino does with AMTEL (the maker of the ATMega uCs).

    A development board (like Arduino) has a port (like usb or rs232) to program the uC and to transmit and receive data to the chip.
     
  13. knibknob

    Thread Starter New Member

    Apr 22, 2010
    15
    0
    Oh man, I am so sorry. Yes, I am looking for a development board. Basically, I just want to hook the components up to it, and program it. Sorry my misunderstanding.
     
  14. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    I use the EasyPIC6.
    http://www.mikroe.com/en/tools/easypic6/


    If you need more crazy power, get the BigPIC6 (this will use 32bit uCs)

    Just take a look at all the add-ons you can get for it.. It will do what you want.
     
  15. knibknob

    Thread Starter New Member

    Apr 22, 2010
    15
    0
    I appreciate the help, but I don't think my mentor would be happy with that budget =( I'm sure that could do whatever I want, i dont need that many functions. Is there a board that has a more minimalist design?
     
  16. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    You may want to search for ARM development boards. They are fast.. and they have the options you want.. Probably around $60. I dont know your budget. But if your looking for power and cheap, thats about the extent of the advice I have..

    I would search for ARM Development boards. Or wait a while and someone with more knowledge will be by.
     
    knibknob likes this.
  17. maxpower097

    Well-Known Member

    Feb 20, 2009
    795
    388
    Not that I'm knowlegable but you sound just like me 2 years ago. 1. Why isn't the uC programmer selecting the chip to use? The arduino is more of a hobby dev system. I call it a system because it runs on its own scaled language modified from C. If you decide to dump the arduino your looking at stepping up to a whole new level of code complexity. Not to sound to harsh but an arduino is like a uC for dummies. It take much of the hard work out by using a standard chip and standard pin out. So starting with an arduino you already have 60% of the work done. Starting from scratch with an new uC your looking at starting from scratch, and its much much harder then arduino code.

    But to really make a suggestion on the chip you should use we need to know exactly what your trying to do on the uC side. What communications will you need? UART, I2C, SPI? Will you need an RTC or anything time sensitive? How many IO pins will you need. If we can get you down to a specific chip, that will allow us to find you a cheap dev kit for that chip. I've seen really nice ARM boards for $20. And I've seen really nice PIC boards for $20. But if you go with a cheapo dev board your only gonna be able to use 1 type of chip. The more expensive board like Retched suggested will take any PIC from a PIC10 - PIC16. Which pretty much covers almost all hte 8bit PICs. Also if you go with a new uC you will need a programmer which is gonna add some money to it, anywhere from $30 for a good PIC or AVR programmer to $200 for a good ARM programmer.
     
    Last edited: Apr 22, 2010
  18. knibknob

    Thread Starter New Member

    Apr 22, 2010
    15
    0
    Thank you for your assistance. Well, the uC programmer will probably be me, and the people in charge know just as much about uC's and microcontrollers as I do, unforunately =(. Which is why it's left to me to figure out which board would be most suited for the project. I really do not know what UART I2C SPI is, sorry. Is the uC easily removable from the Arduino?

    The project isn't extremely time sensitive, but the motor should run at regular intervals; it wouldn't be very useful if it was extremely jerky as that could upset measurements. As long as the sensor data can be matched up with the encoder data, that would be enough.

    Regarding the I/O, for the Arduino, we used two pins (one for each direction), and four pins to control the motor, (one for step, one for each direction to move, and one for direction). Also, I believe there would be one pin for each of the limit switches (total of two), and a pin needed for the sensor (which we have not gotten yet, but would need one at the very least).

    Any help would be most appreciated it, and if there are any questions still feel free to ask, thank you.
     
    Last edited: Apr 23, 2010
  19. maxpower097

    Well-Known Member

    Feb 20, 2009
    795
    388
    You can just buy the chip alone for the arduino. Also you can get a programmer and make your own arduino chips. Figuring your going to be the one doing it and don't know about i2c, spi, etc.. its going to take some explaining. I gotta run to an appointment right now but when I get back in 2 hours I'll try to post you some info in detail. I know where your at, where your coming from, and where you headed so I think I can help you out. Those kinda of bosses are the ones who got me started getting into uC's. Basically I was an IT guy and the bosses tossed me a working product and told me what upgrades they wanted in the new firmware. So I had to teach myself how to do it by scratch with no XP. Without this forum I never would have done it.
     
  20. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    You want something like an arduino with more speed?
     
Loading...