Connect with us

Which microcontroller best fits my needs?

Discussion in 'Microcontrollers, Programming and IoT' started by Farukh Khan, Apr 22, 2017.

Scroll to continue with content
  1. Farukh Khan

    Farukh Khan

    160
    2
    Jun 12, 2015
    Hi there,

    I am a Bachelor in Electrical and Electronics Engineering First Year student. I have been messing around with different electrical projects since my childhood. Recently I had came up with an idea to make my apartment's electrical equipments totally automated and connected to the internet. A year or two ago I had very widely discussed topic on this forum regarding different problems related to my home automation project. I had the project on halt for these years due to my study. But now I wanna kickstart it again. At this moment the problem am facing is with the micro-controllers. I have decided to use a raspberry Pi 3 as the main AI head for this automation project. The pi will decide everything according to the logic of the codes I will put in. But now I have around 50+ electrical equipments in my whole apartment. And in the future might increase by 5 or 6. And am planning to control these using relay modules. So, the basic requirements I want in my micro-controller are these:

    1. 64 Digital Pins + 16 Analog Pins. Or maybe 80 GPIO means which can handle both digital and analog signals input/output. Also if possible some pins are PWM.
    2. Durable. Less chances of failure due to electrical issues or any other internal misfires. Simply good quality, as it will be running 24/7/356.
    3. Totally programmable. I can configure the whole firmware as I want. Even if it needs assembly language to configure. Everything happening with the microcontroller from start to end should be customizable or programmable. Because it's for home automation and the whole system will be connected to the internet. So, I am planning to have various security measures on the micro-controller that will be controlling all the equipments in house. This is to ensure that even if my system get's hacker the micro-controller will detect it and as a fail-safe it will go to some cage mode where it won't accept any outside commands unless manually triggered off from the cage mode.
    4. Low power usage. Fast clock speed + RAM so that it act's totally in real-time. Code storage 512KB or 1MB.
    5. Firmwares in assembly and maybe the working procedure or logic coded in C and uploaded through arduino compiler or any other reliable tool.

    So, as I have stated my requirements can you guys please suggest me the micro-controller models that can serve my requirements as stated and how to hook the controller on a safe way to have it's power in, IO, safety buttons etc.

    Thanks in advance....
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    Your requirements suggest you're a beginner with microcontrollers/programming.

    In that case, I'd go for an Arduino Mega 2560.

    Personally, I wouldn't put all my eggs in one basket. I would build a stack of independent modules based on simpler microcontrollers and interface them (via wireless maybe?) to your main controller.
     
  3. Farukh Khan

    Farukh Khan

    160
    2
    Jun 12, 2015
    If I go with a Arduino Mega 2560 it has it's own firmware as well as bootloader which have their own logics on how the arduino program will get executed. And also there's some other extra equipments on board like the USB connector and some sort which I want to minimize to the most performance out of the board. I wanna design own PCB and mount the controller with only the things needed to power it up and maybe and USBAsp to program it. That's all.

    And why you suggest not putting all the eggs in one basket? Can you explain some particular backdraws of putting all in one controller? And what type of stack you are exactly suggesting?

    How about the ATmega2560 Microcontroller from microchip? Is it a good quality microcontroller? Can I have a SMD Board of my own with this microcontroller and only just the equipments needed to power it and and program it. Also, is the behaviour of this controller is fully customizable? I mean the bootloader, firmware etc. So, that only my logics and code will exist in the micro-controller. And no ghost code or any hidden code will be there to do particular job.

    Thanks in advance...
     
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    Yeah, but if you feel the need you can overwrite it with your own code.

    Those extras shouldn't affect the performance. If you really want to , you can just use the same chip and leave off all the extra stuff.

    Modularity. Redundancy. Simplicity.

    Yeah, but uing the arduino means that all the support stuff has already been taken care of by someone else. But sure, you can use that.

    Well, as much as any microcontroller. I need to point out that there isn't any magic about an arduino. It's simply a working breakout board with some existing software and a development environment. You can wipe out all the boot loader stuff and take complete control if you wish.

    There are no ghosts in the machine.
     
  5. Farukh Khan

    Farukh Khan

    160
    2
    Jun 12, 2015
    What are the differences if I use an ARM Cortex for this particular job. Just switching the relay on/off and take some analog readings from sensors. ARM Cortex R5 or R8 seems good choice for this. But will the ARM processor work same as ATmega? for Digital and Analog I/O with C codes?
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    With Arduino (or an atmega environment) you can leverage heaps of code that's available freely. With cortex, I have no idea. I expect there's a development environment (no idea if it's free) and I have no idea what libraries are available.

    Oh, I didn't answer the previous question about "stacks". I mean you use a single microcontroller for a single task. So you have as many microcontrollers as you have tasks. You have heaps, stacks, plenty, multiple, many, etc. There is less need to worry about speed when the microcontroller handles a single task. It can be close to the sensor, and if something goes wrong, it will not bring everything down (hopefully). There's no (or less) need to worry about multitasking.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-