Selection of a microcontroller for a solar charger

Thread Starter

kobi209

Joined May 28, 2017
4
Hi guys,
I'm a power engineer, and a beginner in the embedded world.
Now I want to design a microcontroller based mppt charger, and a little confused of the mcu's variety on the market.
In order to be focused on the relevant needs, I'd like to ask few questions:
1) In order to calculate some mathematical calculations such as: average, RMS, square root, integration etc, what is more effective, to use a microcontroller or DSP? This is for off-grid application.
2) Is there some guidelines how to pick the core processor size (8/32 bit), and the program/RAM memory size?
Just to mention, for now it's only a new idea for a new prototype, so issues like cost and size are not so important.

Thanks in advance.
 

MrChips

Joined Oct 2, 2009
19,753
Just about any microcontroller (MCU) will do, 8-bit or 32-bit. A DSP would be overkill.

What you have to consider is the amount of code memory and data memory available on the MCU. The simplest MCUs may not have enough memory space to calculare square root and hence RMS.

What you need to know is that math functions come in two flavors, integer or floating-point. Floating-point (FP) math will require much more memory and execution times will be much longer. How much more? Off the top of my head I will hazard a guess at 10 to 100 times more resources than fixed-point arithmetic.

The next thing you will need is a programming platform that provides the library function to calculate square root after you decide on the choice of integer or FP. If you choose FP math you will definitely require FP libraries to calculate square root and to perform readouts it that is a requirement.

If you choose integer math you might be able to roll your own with some stock code off the internet.

How much memory do you need on the MCU? My guess would be a minimum of 4kB code space (flash memory) and 256B data space (RAM). Just about every MCU available today exceeds this bare minimum.
 

Thread Starter

kobi209

Joined May 28, 2017
4
Thanks for your detailed answer!
Just one thing - is there a significance in your mind to pick 8/32 bit controller?
 

MrChips

Joined Oct 2, 2009
19,753
Thanks for your detailed answer!
Just one thing - is there a significance in your mind to pick 8/32 bit controller?
8-bit, 16-bit, 32-bit MCU will all do the job.
8-bit MCU may be simpler and less expensive and is available in smaller package and footprint.
16-bit and 32-bit MCU will do the math faster. Apart from that the results of the calculations are the same.

Your task at this point is to choose a manufacturer, MCU family and the development platform (i.e. the app you will use to program the MCU).
The actual chip you select will depend on actual requirements of the project and what features and input/output pins of the MCU will be required.
 

ErnieM

Joined Apr 24, 2011
8,009
Thanks for your detailed answer!
Just one thing - is there a significance in your mind to pick 8/32 bit controller?
Not really. You are making decisions at a glacial (very slow) rate, so just about any processor can keep up with the workload. Microchip has an ap note for an MPPT controller that uses an 8 bit processor that only has 2,000 instructions.
 
Top