Searching for the best microcontroller

Thread Starter

Jribas

Joined Apr 7, 2021
3
Hello all,

So I am doing a project with a friend of mine and we want to create a device (smallest possible, max-width of the button battery) that will need to measure and store light intensity, temperature and humidity. The device will be powered by a CR2015 so consumption is also an important factor to have in mind. The ideal total weight of the device would be 3g, we know that it is gonna be difficult to achieve, but that is the goal.

So for the microcontroller, we need one with this:
Consumption: Lowest possible.
Storage memory: If possible with already some memory to store the data (best would be 5 years of data. Our interval for storing is 15min. So if I am not mistaken it is 175,200 points. This is also flexible and we can use an external memory chip. Maybe this one would be good: W25N512GVEIG
Clock: We were thinking of an external RTC like this one: MAX31341B
RAM: Not much as we are only recording values (we think)
ROM: Also not much is needed we think, just to store the code.
Frequency: Not really important because we only will be polling 15min at a time right?

We never worked with microcontrollers, we only messed around with Arduino. So any information that is missing just ask and we will respond.

We did find this: https://www.ti.com/lit/ug/tidu821/tidu821.pdf?ts=1617278486856 which is basically what we want (but bigger) but we don't know if that microcontroller is the best one.

We were also looking ATtiny chips (85/804?) because they are easier to program, cheap and small.

What do you guys think? Are there better alternatives?

Thanks in advance!
 

Ya’akov

Joined Jan 27, 2019
9,069
You will have to use a 1.8V MCU because the cell will not work properly for a 3.3V part. You will need a very high efficiency switching regulator for power. It's going to be an enormous challenge to use that tiny cell for a long life product.

This is a very difficult project because of the power requirements. I would focus on that first. If you can't use a bigger cell it will be driving everything.
 

John P

Joined Oct 14, 2008
2,025
My calculation is that averaged over time, you have 3.7 microamps to play with. (5 * 365 * 24 = 43800 hours, 163mAh capacity). It seems feasible, but it depends on how long you need to power up the full system to do the measurements and how much charge it takes each time. You might look at the Microchip XLP parts.
 

MrChips

Joined Oct 2, 2009
30,708
There is no such thing as the best microcontroller. You mean a suitable microcontroller for your application.
Small footprint and ultralow power consumption is not an issue. There are lots to choose from.
Your problem will be fulfilling the memory and RTC (real-time clock) requirements.

You need to sit down and determine how much memory is required and whether or not you need non-volatile memory.
 

Thread Starter

Jribas

Joined Apr 7, 2021
3
Thank you all for your replies!

You will have to use a 1.8V MCU because the cell will not work properly for a 3.3V part. You will need a very high efficiency switching regulator for power. It's going to be an enormous challenge to use that tiny cell for a long life product.

This is a very difficult project because of the power requirements. I would focus on that first. If you can't use a bigger cell it will be driving everything.
Actually i made a mistake in my previous post. The battery we wanted to use is br1225 which then it will be even be worse based on your replies.
For the MCU you have a point so if we wanted to keep in ATtiny family the ATtiny85V would work right (from datasheet: 1.8 - 5.5V for ATtiny25V/45V/85V)?
For the very high efficiency switching regulator for power do you have some example from where we can start?
We know about the difficulty but we are ready to bang ours heads in the wall and learn stuff on the way!

ATtiny is not very low power chip. I suggest look towards PIC24, MSP430 or STM32L chips with onboard RTCC. How you plan get data out, wireless or wired way?
Thank so much for the sugestion we will look into those!
For the data retrieval we were thinking about wired for now because wireless means another layer of complexity and another chip which will increase the size of the device. In the future maybe but for now wired. We were thinking of a 3d printed station where we put the device wihtout the cover and a set of probes lower to connect to the MCU. (We did something similar in college)

My calculation is that averaged over time, you have 3.7 microamps to play with. (5 * 365 * 24 = 43800 hours, 163mAh capacity). It seems feasible, but it depends on how long you need to power up the full system to do the measurements and how much charge it takes each time. You might look at the Microchip XLP parts.
The plan was to get the measurements every 15min and I think that maybe 15s is more than enough time to measure and store the data, but if we calculate for the double just to be sure, the total "ON" time of the sensors and memory and MCU would be 1460 hours. Of course this does not include the idle or powered down mode of the MCU which it would be the whole 42340 hours.

There is no such thing as the best microcontroller. You mean a suitable microcontroller for your application.
Small footprint and ultralow power consumption is not an issue. There are lots to choose from.
Your problem will be fulfilling the memory and RTC (real-time clock) requirements.

You need to sit down and determine how much memory is required and whether or not you need non-volatile memory.
So we are gonna store date,time,light intensity, temperature and humidity so I assume a string like this: 2108042129500253566 would suffice. If i copy 175000 times and save in a txt a I get 3250 KB. I don't how accurate this method is.
For the program we would only need to retrieve values from sensors and store them so I assume almost any small memory is enough.
Can you elaborate why the RTC is a big problem: "Your problem will be fulfilling the memory and RTC (real-time clock) requirements."
 

MrChips

Joined Oct 2, 2009
30,708
3MB of memory storage is significant amount of memory. For this you will need an external memory IC.

Assuming that it is necessary to time-stamp your data you will need RTC function.
If your data recording interval is 15 minutes, then the MCU will be in low power mode most of the time whereas the RTC has to keep running in order to keep track of time. For this you have three options:

1 - Find a low power MCU with RTC hardware built-in.
2 - Use an external RTC IC.
3 - Do RTC function in software and a HW timer where the MCU is in sleep mode and is awaken at fixed intervals.
 

John P

Joined Oct 14, 2008
2,025
I suggest that your proposed data storage is rather extravagant. You could store the quantities in binary form, and save a lot of space. And perhaps it isn't necessary to save date and time at all--if you have an accurate clock available, it should define your 15-minute intervals without storing anything.

Microchip's largest-capacity serial EEPROM holds 524288 bytes. Could you make that work? (Edited to add answer--not much chance. With 4 samples per hour, there'd be 175200 samples, so only room for about 3 bytes per sample. Use multiple EEPROMs?)

Is this design intended to be attached to wild animals or birds? It seems a bit like a system I read about that could record the movements of albatrosses over the ocean.
 

trebla

Joined Jun 29, 2019
542
Writing to EEPROM consumes lot of energy, FRAM has lower energy need for write in. If you have already a battery on your system to consider using low power external RAM and collect data to MCUs RAM as much you can hold and transfer the whole packet to external memory.
 

BobTPH

Joined Jun 5, 2013
8,811
What John p said. How much resolution do you need on these quantities? I would store the minimum mumber of bits required for each, with no time stored since the interval between them is known. You might be able to get away with 3 bytes, or even two.

Also, it will not take anything like 15 s to make and store the measurements. 15ms would be more like it, and that is a good thing, because you have no chance of success if it really di take 15 s.

There are PIC24 micros with up to 1 MB of flash, these could store your data with no external memory.

Bob
 

trebla

Joined Jun 29, 2019
542
Teensy website : When running at 600 MHz, Teensy 4.0 consumes approximately 100 mA current

Sounds horrible for five-year-on-battery project.
STM32L412 consumes 245 nA Standby mode with RTC and 79 µA/MHz run mode (LDO Mode). If software development skills are Arduino dependent then STM32duino libraries are avalable for use with NUCLEO-L412KB board (about $10)
 

Thread Starter

Jribas

Joined Apr 7, 2021
3
Hey guys, sorry for late reply but work has been crazy!

I suggest that your proposed data storage is rather extravagant. You could store the quantities in binary form, and save a lot of space. And perhaps it isn't necessary to save date and time at all--if you have an accurate clock available, it should define your 15-minute intervals without storing anything.

Microchip's largest-capacity serial EEPROM holds 524288 bytes. Could you make that work? (Edited to add answer--not much chance. With 4 samples per hour, there'd be 175200 samples, so only room for about 3 bytes per sample. Use multiple EEPROMs?)

Is this design intended to be attached to wild animals or birds? It seems a bit like a system I read about that could record the movements of albatrosses over the ocean.
We looked at this, 25CSM04, which is the one you talked about, and it only acceps vcc>2.5V so if we want to to use we need to change the battery.
Anyway it is a nice alternative.
About your guess, it is basically that, yes :)

Writing to EEPROM consumes lot of energy, FRAM has lower energy need for write in. If you have already a battery on your system to consider using low power external RAM and collect data to MCUs RAM as much you can hold and transfer the whole packet to external memory.
The problem with RAM is that we for some reason there is a power failure or we don't recover the device in time we lost all data. We looker in FRAM but it costs more than 15 euros which is not very expensive, but not very cheap either.

What John p said. How much resolution do you need on these quantities? I would store the minimum mumber of bits required for each, with no time stored since the interval between them is known. You might be able to get away with 3 bytes, or even two.

Also, it will not take anything like 15 s to make and store the measurements. 15ms would be more like it, and that is a good thing, because you have no chance of success if it really di take 15 s.

There are PIC24 micros with up to 1 MB of flash, these could store your data with no external memory.

Bob
The PIC24 is a very good choice indeed, I think 1MB in the end it might be enough for our needs.
---------------------------------------------------------------------------------------------------------------------------------------------
I think now we need to decide which battery to use at which voltage for us to decide next what components to choose. For now this was the most helpfull for us to begin and know which components are available to us.

Thank you all for your help :)
 

Deleted member 115935

Joined Dec 31, 1969
0
Teensy website : When running at 600 MHz, Teensy 4.0 consumes approximately 100 mA current

Sounds horrible for five-year-on-battery project.
STM32L412 consumes 245 nA Standby mode with RTC and 79 µA/MHz run mode (LDO Mode). If software development skills are Arduino dependent then STM32duino libraries are avalable for use with NUCLEO-L412KB board (about $10)
100mA , is with every thing turned on and at full clock speed I bet
It also has a fair amount on chip storage, so saving power of an external one,
 

John P

Joined Oct 14, 2008
2,025
I just noticed that there's a different kind of memory chip available from Microchip, which they call "Serial NOR Flash". You can get 8MB in an 8-pin chip, and there's one type, the SST26WF064C, that works on a voltage range of 1.65-1.95. Maybe worth a look.
 

BobaMosfet

Joined Jul 1, 2009
2,110
Hello all,

So I am doing a project with a friend of mine and we want to create a device (smallest possible, max-width of the button battery) that will need to measure and store light intensity, temperature and humidity. The device will be powered by a CR2015 so consumption is also an important factor to have in mind. The ideal total weight of the device would be 3g, we know that it is gonna be difficult to achieve, but that is the goal.

So for the microcontroller, we need one with this:
Consumption: Lowest possible.
Storage memory: If possible with already some memory to store the data (best would be 5 years of data. Our interval for storing is 15min. So if I am not mistaken it is 175,200 points. This is also flexible and we can use an external memory chip. Maybe this one would be good: W25N512GVEIG
Clock: We were thinking of an external RTC like this one: MAX31341B
RAM: Not much as we are only recording values (we think)
ROM: Also not much is needed we think, just to store the code.
Frequency: Not really important because we only will be polling 15min at a time right?

We never worked with microcontrollers, we only messed around with Arduino. So any information that is missing just ask and we will respond.

We did find this: https://www.ti.com/lit/ug/tidu821/tidu821.pdf?ts=1617278486856 which is basically what we want (but bigger) but we don't know if that microcontroller is the best one.

We were also looking ATtiny chips (85/804?) because they are easier to program, cheap and small.

What do you guys think? Are there better alternatives?

Thanks in advance!
You've identified constraints, and while that is the first step, your unfamiliarity with electronics and hardware design shows you lack a depth of knowledge of what is likely and possible in terms of components to satisfy your needs. Your lack of conceptualization of data, how much space that takes for a 5-year term, and so many other facts says this is an idea without much grounding in reality. Which is OK, we're glad you reached out. Dream it first, and them modify the dream to fits what's possible, while still meeting design goals as close to possible.

Here is where you can start:

Title: Understanding Basic Electronics, 1st Ed.
Publisher: The American Radio Relay League
ISBN: 0-87259-398-3

Don't forget the weight of your PCB as well, and the solder, because 3g ain't much.
 

paoloberno

Joined May 3, 2021
13
A micro can be powered directly from a br1225 battery, just choose a device that can be powered from 3.3V to 1.8V or 2V.
As others have suggested a device with vbat pin and internal hardware RTCC is preferable to reduce power consumption and provide a reliable timing source.
Anyway a deep knowledge of low power electronics and microcontroller programming is necessary for such a project, much more than playing with an Arduino/Teensy/other-easy-to-use platforms.
 
Top