Looking for Inexpensive, Low Power Consumption Microcontroller

Hey All,

I’m in the early stages of trying to develop a piece of hardware (and have been researching pretty hard over the past few days… currently have 20+ tabs open lol).

I’m looking for suggestions on microcontrollers that are low-cost so that it’s commercially viable and with low power consumption as it may need to run off a 9V battery.
I fooled around with an Arduino UNO in the past for a small, unrelated project and enjoyed it, but that was for personal use (not commercial use). Using that would be a starting cost of $20+ but for my application I wouldn’t need nearly the amount of features that it would provide. I’d be looking for something in the $1-$4 range.

My project would only involve a PIR sensor, an RGB LED and a 9V battery to power it (for hopefully a good length of time).

I’ve been reading about microcontrollers like the ATmega1284 and ATtiny, but I know nothing outside of Arduino so I don’t even know how they work or how running the above components off of it would look. How do you even hook up to them to program them?? (That’s my level of ignorance atm haha).

If you have any suggestions to provide so that I at least have a pathway to start walking down in terms of research, it’d be greatly appreciated!

Can you post your requirements document, and technical specs - so far.

These are important first steps to selecting the hardware and software platforms to be used.

Unfortunately, I don’t have any documentation or list of technical specs yet as I’m still researching.

Best I can offer at this point is the PIR sensor I’m considering HERE, and the RGB LED I’m looking at AT THIS LINK.

Those would be the main components. Besides that, just need a power source (battery) and the microcontroller.

How do you know you need these !

1 Like

Without knowing the application, the lowest cost solution might be to implement it in hardware.

You can get an MCU for like $0.02, but you will need expertise to get them running. Achieving low power requires careful circuit design as well as intimate knowledge of the MCU. Do you have tools that can measure uA ?

Otherwise, I think the problem you have is finding something off the shelf, that is supported by an easy to use tool such as Arduino IDE. Generally, tools for casual users prioritise ease of use, rather than low power.

I would suggest getting an attiny85 module and see how far you get.

1 Like

are you planning to use a small development board, e.g. the ATtiny85 Dev mini or ESP32-S3-Zero
or make you own prototype from stripboard or even make a PCB?
how many are you looking to build?

Re-think that part.

9V batteries, the PP3 sized ones, don't hold a lot of charge.

Most microcontroller chips run between 3.3V or 5V. 9V would damage them. So you have to convert the 9V into a lower voltage, and that process is never 100% efficient, and could be as low as 30% efficient, wasting much of the battery's charge.

It's more efficient to use a battery that has a little more voltage than you need but not too much more. Better still, one that the circuit can run off directly without needing to reduce the voltage at all.

For example 4xAA or AAA 1.5V non-rechargeable cells will provide 6V, which can then be reduced to 5V using a (low drop-out) regulator. Better still, 4xAA or AAA NiMh 1.2V rechargeable cells will provide something close enough to 5V to run the circuit directly.

3 Likes

Agree with what has been said , without knowing what you are trying to do and its specification it’s impossible to choose .
You could for example just want to flash the leds when the PIR detects ; in which case you don’t need a processor at all .

Look at the spec of your PIR - it takes 65mA when running . A PP3 hoods around 500mAh capacity .Unless you are very clever with switching it on/off I can’t see it lasting more than a day .

2 Likes

Look at the CH32V003

I'm not convinced that number is right (see HCSR501 PIR sensor power consumption - #5 by Wawa). No one seems to know the true figure for different modes, I guess you would have to measure it.

+1

And many other similar example apps not needing an MCU.

But the PIR itself has trivial consumption.

AI overview:
A typical HC-SR501 PIR sensor has a very low current consumption, usually listed as less than 50 microamps (µA)in its static state, making it suitable for battery-powered applications.

Key points about HC-SR501 PIR current consumption:

  • Low power draw: The primary feature is its minimal static current, usually below 50 µA.
  • Operating voltage range: Can operate on a wide voltage range from 4.5V to 20V.
  • Battery friendly: Due to its low power consumption, it is well-suited for battery-powered projects.
1 Like

A general how to

I don't believe you

I think you have specifications.... but you can do better - what type of environment will it be used in, indoor, outdoor, industrial? The LED will probably be an indicator, what if it's placed in very bright light, will it still be visible? How will it communicate "I'm almost out of battery"? And so on..

1 Like

Thank you to all for the above input, it makes sense.
As far as the battery goes, that’s true it’d probably make more sense to have multiple AA batteries instead to better align with what the draw will be without having to reduce the voltage.

As far as development and prototyping goes, I’ll probably just be using an Arduino UNO as ISP.

And sorry, I misunderstood the request for documentation/technical specs… I don’t have much right now to present other than the plan in my head as I’m still trying to figure out what’s needed, but I can provide more context for sure!


It’s for commercial/industrial applications (office spaces, gyms, etc…), not residential. Should be fairly well lit so the LED will need to be quite bright, not dim. The PIR portion of the device will be on one side of solid swing-type doors (mounted to the ceiling or wall) and the LED panel will be on the opposite side, the two devices hardwired together.
When the motion sensor is activated, it will simply illuminate the LED light on the other side with an amber colour. It will only be illuminated while someone is standing in the range of the motion sensor.
I would GREATLY prefer something like this to be hardwired into the building with low-voltage wiring, but that’s a bit harder of a sell installation-wise. Battery is easy, but with huge trade-off to longevity for sure. Not really sure what to do tbh.
If something like this COULD run off of battery at least for a year, then it may be doable, but maybe that’s not even close to reality lol.

If it is battery-powered, I would need to also have an on-off switch on the LED panel device, and I would have the LED panel periodically blink red when the battery level is low.

That’s the gist of it… simple concept, but I’m having trouble knowing where to start.

Perhaps start by making a prototype with the aim of gaining a full understanding of power requirements, how to program your chosen microcontroller, etc.
I'm biassed, because I'm only familiar with the AVR family of microcontrollers, but I'd start with an ATtiny85. It's a simple matter to wire it up on a breadboard and program it with Arduino UNO as ISP. You may find it more convenient to use a dedicated ISP programmer, they aren't expensive.
You could have the ATtiny85 sleep and be woken by a level change on the PIR input to it. Then do the LED illumination and then go back to sleep when it's done with that.

1 Like

This sounds like a good place to start, thank you. I’ve heard the ATtiny85 mentioned a few times so it’s shaping up to be a viable MCU to start playing around with and learning.
The other things you mentioned are also things I’ve started familiarizing myself with throughout my research (such as having a dedicated ISP programmer), so I’m able to follow along with those suggestions.

Maybe I’m thinking too far ahead and am trying to get all my ducks in a row for mass production when really I should be starting by playing around with the prototype just to generate data (such as power requirements). Optimization can always come later.

Thanks!

Pir doesn't detect still standing person.
The battery life is completely dependent on the "traffic" in front of the PIR.
Sleeping MCU doesn't draw a lot, so it's a question of LED consumption and time.

2 Likes

Perhaps don't bother with the ATtiny85 initially. Get it working on an Uno and see if the PIR behaves in the way you want it to. Once you are happy with the behaviour of the Uno code, you can move on to using an ATtiny85. As you are only reading the PIR input and writing the 3 LED outputs, there shouldn't be anything to change except the I/O port numbers.
With an ATtiny85, you've got 5 pins to play with, or 6 if you sacrife the use of the reset pin. Ignoring the reset pin, you'd have one spare pin. Consider whether that should be used as an analog input to monitor battery voltage so you can indicate a battery low condition on the RGB LED

1 Like

Ideally I’m trying to know when there’s a person in that space. That’s the downside of the PIR because I know it won’t register someone standing there motionless, however I think in the large majority of cases there will only be a few-second window as someone is passing through so it should be ok.
Other option would be an ultrasonic sensor, but if I’m not mistaken that may also pick up on inanimate objects which I don’t want, and may draw more power?? And more expensive?

I’ll likely go that route… testing with the Uno first.
In the case of using batteries (rather than hardwiring), I would probably also want an on-off switch option. I’m assuming that would require use of one of the pins also?

It all depends on your "project". I could immagine that you want to create a warning for swing door opening if there's person behind. Pir doesn't detect person that doesn't move across it's field. One option could be PIR on the LED side and some "non passive" sensor on the opening side. So PIR would detect person that wants to open the door, wake up MCU and make a distance/presence sensing on the other side.