Arduino low power alternatives

Advert

Arduino low power alternatives

Home Forums Electronics in the Workshop Arduino low power alternatives

Viewing 25 posts - 1 through 25 (of 33 total)
  • Author
    Posts
  • #32120
    John Haine
    Participant
      @johnhaine32865
      Advert
      #489362
      John Haine
      Participant
        @johnhaine32865

        Several mentions have been made here about processor boards that use the Arduino IDE but aren't Arduinos as such. I.m thinking about my next clock and it would be nice to avoid a mains connection, so a low power processor would be useful. Any suggestions welcome please!

        (I want to use the IDE because I'm used to it, and I will likely re-use some of my present software.)

        #489365
        Martin Kyte
        Participant
          @martinkyte99762

          Low power PIC and make use of sleep cycles as much as possible.

          regards Martin

          #489366
          Roy Vaughn
          Participant
            @royvaughn26060

            How about PICAXE, which is a low power PIC under the bonnet. Not programmable in C however, though some would regard that as a positive.

            #489368
            SillyOldDuffer
            Moderator
              @sillyoldduffer

              The Arduino Boards might be a reasonable place to start. They have a few on-board power guzzlers that can be attacked with wire cutters. Removing LEDs, not using or minimising the linear regulator and maybe disabling USB all save power. Also, keeping the outputs low-current by design.

              Depending on the application might be possible to use the Atmel chip's various power-saving sleep modes, ie hibernate the chip until an external event or a timer event wakes it up.

              This website looks at power-saving on the Arduino Pro-mini board. Not played with a Pro-mini myself but recall our learned friend Mr Duncan Webster of this Parish does.

              Lots of boards can be programmed with the Arduino IDE, maybe one of them is a low-power specialist. Just tried to find out how power a Nucleo-F446 uses with the programmer/debugger removed. Failed!

              Dave

              #489370
              Anonymous

                Low power design is all about attention to detail, and a detailed understanding of the hardware. Some pointers are:

                Remove any external hardware that is not needed

                Run the processor at a low clock frequency, preferably using an internal oscillator if it has one – no external crystals or oscillators

                Disable all processor peripherals that are not being used – especially analogue functions

                Shut the processor down (not necessarily the same as a sleep mode) when it is not being used, including the clock oscillator – use a true hardware interrupt that will bring the processor up even if the clock isn't running to start with

                Use small low quiescent linear regulators; they're much more efficient than switchers at low output currents

                All external components need to be sized for the design; excess current/drive capability often comes with higher base current draw

                Look at the current draw of every external component, including passives. It's suprising how many microamps can disappear in pullup and pulldown resistors

                Andrew

                #489376
                Bazyle
                Participant
                  @bazyle

                  Not certain but I think these processors are designed to run on 3.3v because it is available from batteries without using a regulator.

                  Although not the same IDE, in fact does not need an IDE and is programmed in Basic, the Micromite is designed with low power features including sleep and clock slowing specifically for running off batteries.

                  #489379
                  Nick Clarke 3
                  Participant
                    @nickclarke3

                    If you don't need many i/o lines the Ardunio Trinket uses about 35µA in standby mode as against the Arduino Uno at 45mA – both figures as a result of Google searches.

                    #489409
                    Maurice Taylor
                    Participant
                      @mauricetaylor82093

                      Use the atmega 328 chip on its own ,you only need a crystal and 2 capacitors and it works the same as a Uno.

                      It will work on a supply between 1.7 and 5.5volt 

                      Edited By Maurice Taylor on 06/08/2020 16:19:54

                      #489430
                      Bill Davies 2
                      Participant
                        @billdavies2

                        Unless things have changed, you would need to burn a bootloader onto blank atmega328 chips and the like. I've used a few with very few external components (crystal, …) on veroboard, but not recently.

                        #489432
                        Andy Stopford
                        Participant
                          @andystopford50521

                          +1 for using a 328 on its own; if you set it to 8 MHz it will be stable at 3.3V with a usefully reduced power consumption. They come in a variety of packages, both DIP (solderable with a standard iron) and SMD.

                          Depending on how you are using it, you may be able to let it sleep, to be woken up up when required by an interrupt from some other device. Since you mention using it for a clock, then a Real Time Clock chip, e.g. an MCP7940N, could provide the interrupt, as well as providing your clock functions.

                          Also, you don't actually need the crystal, the ATmega 328 has a built in crystal, which is adequate for timing its own cycle, though not for external tasks, like making a stopwatch.

                          I would thoroughly recommend this guy's website if you haven't dipped into stand-alone ATmegas:

                          http://www.gammon.com.au

                          #489472
                          John Haine
                          Participant
                            @johnhaine32865

                            Thanks for all the input. The "naked 328" approach looks interesting, and the website Andy links to is very useful. I will look at that and see where it goes.

                            #489473
                            Stuart Smith 5
                            Participant
                              @stuartsmith5

                              John

                              There is a lot of useful information on using a bare atmega328 on the Arduino website.

                              **LINK**

                              Another alternative would be a PIC micro, but you would need a programmer and different programming software. I have used PICs in the past and there is a massive choice depending on what you want to do, but there is no doubt the Arduino is easier to programme.

                              Stuart

                              #489482
                              SillyOldDuffer
                              Moderator
                                @sillyoldduffer

                                Are PIC chips more power efficient than the Atmega family? I doubt it!

                                Off the shelf Arduino Boards are the problem rather than the Atmel processor. They're designed to be beginner friendly, rating ease of use over power efficiency:

                                • Linear regulator allowing up to 20Vdc input. Great because junior doesn't need to fret about his power supply, but greedy. (The regulator can be bypassed or disabled to save power)
                                • Convenience LEDs showing power on, serial link activity, and for test flashing. (These can all be chopped out)
                                • USB link with easy bootloader. Make Arduino straightforward to program, but waste power in an embedded solution. Can be disconnected.
                                • All the internal gizmos like ADC, BOD, I2C, Serial, SPI, andWatchdog are turned on by default. Saves new programmers many hours digging through data-sheets, but wastes a bit of power. They can all be turned off in software.
                                • CPU runs at top-speed by default. (But volts and clock can be reduced.)

                                One solution is to go primitive with a bare board. But doing so ditches many of the friendly advantages of the Arduino, and may be overkill. My suggestion is to program an Arduino in the normal way, and – once it's working – to save power by disabling all the unnecessary electronics. Basically convert a bought Arduino into the equivalent of a bare board by cutting bits off physically and in software. Cheaper and less fuss to strip a working Nano back than to wire up and program a bare board from scratch.

                                I looked at various power saving Arduind clones, like the Seeduino Stalker.  They seem to be aimed at portable RF applications and are consequently a bit pricey..  I don't think they help.

                                Otherwise spoilt for choice.  Dozens of different microcontrollers available from tiny to powerful.   All seem capable of low power operation, but the application has to be designed for it.   Choice of chip isn't the main problem.

                                Dave

                                Edited By SillyOldDuffer on 07/08/2020 11:11:11

                                #489533
                                Michael Gilligan
                                Participant
                                  @michaelgilligan61133
                                  Posted by SillyOldDuffer on 07/08/2020 11:01:54:

                                  […]

                                  My suggestion is to program an Arduino in the normal way, and – once it's working – to save power by disabling all the unnecessary electronics. Basically convert a bought Arduino into the equivalent of a bare board by cutting bits off physically and in software. Cheaper and less fuss to strip a working Nano back than to wire up and program a bare board from scratch.

                                  .

                                  Given John’s parenthetic note in the opening post … That seems an excellent idea !!

                                  MichaelG.

                                  #489536
                                  Peter Bell
                                  Participant
                                    @peterbell11509

                                    I'm with Dave on this one.

                                    My first venture into microprocessors was with Picaxe. These worked well but it was a construct job every time changes needed to be made but I gained enough confidence to try Arduino. The nano with its ease of use by being a plug in with a bulit in reg and status led 's was a great step forward at least for me especially at the price.

                                    So I would remove bits of a working nano to reduce consumption and intend doing this some time in the future rather than start from scratch unless I've got to!.

                                    Peter

                                    #489542
                                    Donovan Kaardal
                                    Participant
                                      @donovankaardal43990

                                      I'm a big fan of the ATTiny range from Atmel (well, Microchip owns them now). The ATtiny85 is extremely popular, and you can get ones that people have made into Arduinos if you really want. You could make one yourself and flash the arduino bootloader, or just say to heck with it and program it straight. If you're not going to be changing the program very often, there's no reason to waste the space with the bootloader.

                                      Power wise they can be very efficient, though as was previously said using sleep states or low power states helps with that as well.

                                      Here's a pic of an ATTiny based arduino. I bought a bunch of these ages ago so there may be better ones out there now. This one was called the digispark? The purple board next to it is one I made that uses smd components – this is a wireless temperature sensor, but for this one I'm pretty sure I used the Arduino IDE to write my program, then programmed the ATtiny(s) with a second arduino.

                                      Low power ATtiny info is out there – here's at least one page that is a good place to start: ATtiny low power

                                      20200807_184558.jpg

                                      #489550
                                      Andy Stopford
                                      Participant
                                        @andystopford50521

                                        Just a couple of points:

                                        You can program a bare bones ATmega using the Arduino IDE just as normal – if you've burnt in the Arduino bootloader it is an arduino, effectively.

                                        But, you won't be able to do it using USB, unless you add a USB-UART chip (and socket) which of course complicates things a bit; if you go down this route it's worth designing a custom PCB and getting it made in China (£10-ish for 5 boards from a company called Elecrow – others available, but I've found Elecrow good).

                                        A simple way to get round this is to use the DIP package with the appropriate socket. You can then swap it for the one in a standard Uno, program it, and return it to your project. It's not ideal, it's fiddly, the pins are easily bent, but OK for something where you've got it working how you want it using a test setup with an arduino, and now you want to complete the 'production' version.

                                        Lastly, do yourself a favour and ditch the Arduino IDE – there are much better, easier to use alternatives, with full code completion, hints, colour coding, etc.

                                        I use PlatformIO; it's available as a code editor plugin. I like the Atom editor, but you can use it with VSCode, and, possibly, others.

                                        #489570
                                        Joseph Noci 1
                                        Participant
                                          @josephnoci1
                                          Posted by Andy Stopford on 07/08/2020 20:53:10:

                                          Just a couple of points:

                                          ********************…..

                                          Lastly, do yourself a favour and ditch the Arduino IDE – there are much better, easier to use alternatives, with full code completion, hints, colour coding, etc.

                                          I use PlatformIO; it's available as a code editor plugin. I like the Atom editor, but you can use it with VSCode, and, possibly, others.

                                          I just spent near 2 hours digging into 'PlatformIO'…I think its a little presumptuous to just tell folk to 'ditch' the Arduino IDE…

                                          Admittedly the Arduino IDE is not the greatest ( I don't use it – in fact I don't use any IDE – straight to the heart of the processor with embedded code and no OS..just a fast scheduler), but that IDE is very popular, commonplace, and although a little 'maker orientated', it is supported by a huge user base. That means a lot to someone just starting and finding the whole Arduinio, or any small micro based board, a little overwhelming. There are MANY forums where users assist and provide comments, many MANY library sources and many applications, easily adapted by new users, to blink that first LED or say 'Hello World'…

                                          After the 2 hours on internet, reading all I could on PlatformIO, I found a lot of bling, heavy on the advertising selling its virtues , no useful comparison with other systems to assist a choice, how colourful it is, etc…User base is not easy to find. A SIMPLE intro to install, select your system, edit and compile 'hello world', etc was non-existant. All the splurb is very sell oriented and does not really do much to attract the new user, in fact the opposite! My comments are presented as though from a naive newcomer to the Arduino ( and workalikes) world – I am not a total newcomer myself – maybe 20 million lines of (disciplined military) code under the belt over the last 40 years…I guess I would get PlatformIO to work for me with little issue, but NOWHERE is it made easy to understand why I should , over say the Ard.IDE.. Nowhere do I find indications of ease of use, benefits, how or why it will make my life easier, etc, or at least, not without spending hours digging..

                                          I don't say it is a poor system – I don't know anything about it, but as with so many open source softwares, the creators are Geeks, experts schooled in the art, and assume the rest of the world also are, and if not, 'get with the program'…

                                          I don't know what John's level of expertise is in this field and maybe he would find it easy to convert/use, etc, although he did say he wishes to stick to what he knows and is comfortable with.

                                          We all balk a little when faced with the learning curve presented by tackling a new CAD package, a new CAM package, etc, and many find it easier to stick with what you know, because it is much easier and quicker to get the job done, esp. if it is your hobby, and the objective is to make an Arduino based Clock, and not to spend half the project time fighting a new environment. With that as a perpetual given, why on earth do the vendors of such systems not present the system in a manner that does not chase one away with the first look!

                                          I think that most members of this forum are 'mechanical' model hobbyists, as opposed to electronics or software hobbyists – that line is blurred hugely these days, with the easy access to modules that allow extensions to our hobby – but I would still suppose that the use of an Arduino module and some software is with the intent of making a 'model' better, or with more features, etc. In other words, the aim is not to spend the majority of the project's time on fighting a voluminous IDE and its surroundings,and writing software, but to make the model.

                                          When I made my ELS for my lathes, the objective was twofold – to make threading on the lathe a pleasurable experience, and to learn about the mechanism of sychronised threading on a lathe. I used an Arduino type module to implement this, and although the software is what makes it work, writing the software was NOT the objective, and anything that makes the software creation more difficult is simply an annoying distraction.

                                          Of course, it's not all the same strokes for all folks, and those who enjoy more the software and its environment are welcome to that world, but would it harm the Open Source Geeks ego that much if they stepped down a little into the real world and sold their stuff in a manner that was useful to most??

                                          Not everyone is a software expert, doing software for a living, or merely interested in the latest bling_IDE for the sake of it..

                                          In the two hours I could not fine what the minimum software overhead is when running this system on 'my' board – is there a bootloader? What size is it typically? How does it affect run-time measurements?..

                                          John, I'd say stick with what you know and do the fun part – make the clock! If your interest in the IDE is as much fun, then maybe PlatformIO is for you…

                                          My Rant for the day..

                                          Joe

                                          Edited By Joseph Noci 1 on 08/08/2020 08:22:40

                                          #489581
                                          John Haine
                                          Participant
                                            @johnhaine32865

                                            Well, thanks for all the inputs folks, on the whole it looks to me like my best course is to stick with the Arduino but when appropriate move to a "naked 328" to optimise power. I've no fears about working with the chips, I'd rather not perform surgery to remove LEDs etc from a working SMT board!

                                            Thanks also for the "rant" Joe. The person who recommended using Arduino is an ex colleague, a very experienced embedded software engineer who has also developed probably millions of lines of code for mobile phones and other consumer products, as well as directing software programmes in various companies. He uses Arduino for various home projects. If it's good enough for him it works for me! I am an electronics engineer by profession but focusing on RF systems. My only "professional" use for computing has been for system calculations and simulation so I have no background in "proper" programming. For my clocks the Arduino is just a tool to control a couple of stepper motors and implement some simple compensation algorithms. As it's a tool I'm not going to change it for something different just because it might be better once I get up the learning curve, any more than I'd change my lathe or mill.

                                            #489595
                                            Joseph Noci 1
                                            Participant
                                              @josephnoci1

                                              As it is said, do what floats your boat! I must always be careful to not generalise to much…Individuals obtain project satisfaction in their own way, so prescribing alternative approaches is always fraught with with the subsequent need to duck…If at the end you enjoyed what you did, and maybe even learnt something along the way, then you won!

                                              looking forward to seeing the clock – Obviously it's not just going to be a digital display of time…

                                              Joe

                                              Edited By Joseph Noci 1 on 08/08/2020 10:28:20

                                              #489603
                                              John Haine
                                              Participant
                                                @johnhaine32865

                                                Thanks Joe – there are a couple of pics of my first clock in my albums, one before it was cased the other in its case (but with a horrid reflection in the door window).

                                                #489624
                                                SillyOldDuffer
                                                Moderator
                                                  @sillyoldduffer

                                                  As a next step, I suggest tabulating the design requirement. (Andrew mentioned the importance of the overall design early on.) In particular inputs and outputs.

                                                  Before setting up a bare board or attacking a Nano with bolt cutters it's best to understanding what the circuit and external hardware must do, designing software & hardware together to minimise power consumption. Leaving out the power LED is obvious and safe, but other notions need a little thought. For example, bad ideas might include:

                                                  • Removing the USB chip when the design needs a USB interface
                                                  • Removing the USB chip on a Nano when the design depends on it as a 3V3 power source
                                                  • Disabling ADC when the design requires an analogue input
                                                  • Disabling SPI when the external hardware has an SPI module
                                                  • Disabling Timer1 when the software depends on millis()
                                                  • Using outputs to drive power hungry hardware, especially continuous loads.
                                                  • Ignoring PULL_UP & PULL_DOWN power implications when designing external hardware.
                                                  • Dropping clock speed when the software task is time critical.
                                                  • Stopping clocks to save power when fast reaction to interrupts or wake-ups is needed

                                                  I emphasise might because it all depends on the application. A simple switching application could be easy to power save; other code may be tricky! An Arduino advantage is it comes with all this stuff switched on and the processor is in a safe configuration. Beginner programmers don't need to worry about particulars, great except ease of use wastes power. Programmers who shave microamps become responsible for managing gory under-the-bonnet detail, which can be advanced stuff.

                                                  All do-able though, and interesting. Please keep us posted. I'm sure someone will help if you get bogged down in an unexpected complexity.

                                                  Dave

                                                  Edited By SillyOldDuffer on 08/08/2020 13:07:54

                                                  #489647
                                                  Versaboss
                                                  Participant
                                                    @versaboss
                                                    Posted by Andy Stopford on 07/08/2020 20:53:10:

                                                    Lastly, do yourself a favour and ditch the Arduino IDE – there are much better, easier to use alternatives, with full code completion, hints, colour coding, etc.

                                                    I use PlatformIO; it's available as a code editor plugin. I like the Atom editor, but you can use it with VSCode, and, possibly, others.

                                                    Hi Andy,

                                                    as a sometimes Arduino user I'm always interested in such stuff. However, all is not so easy. I managed to install the Atom editor, and then tried in vain to cooperate it with PlatformIO. What I now have, if I start Atom, is a black screen with a menu bar. There is also a menu point for PlatformIO. But after say a minute I get the message 'editor isnot responding.
                                                    I deleted Atom and re-installed it, with the same result.
                                                    And btw, IF that system would work, how could one compile the code and load it up into an Arduino? Copy/Paste to the Arduino IDE?

                                                    Regards,
                                                    Hans

                                                    #489713
                                                    Andy Stopford
                                                    Participant
                                                      @andystopford50521

                                                      #####################

                                                      Posted by Joseph Noci 1 on 08/08/2020 08:21:54:Posted by Andy Stopford on 07/08/2020 20:53:10:

                                                      Just a couple of points:

                                                      ********************…..

                                                      Lastly, do yourself a favour and ditch the Arduino IDE – there are much better, easier to use alternatives, with full code completion, hints, colour coding, etc.

                                                      I use PlatformIO; it's available as a code editor plugin. I like the Atom editor, but you can use it with VSCode, and, possibly, others.

                                                      I just spent near 2 hours digging into 'PlatformIO'…I think its a little presumptuous to just tell folk to 'ditch' the Arduino IDE…

                                                      ….

                                                      In the two hours I could not fine what the minimum software overhead is when running this system on 'my' board – is there a bootloader? What size is it typically? How does it affect run-time measurements?..

                                                      ####################

                                                      Steady on Joe, I'm just venturing my own opinion; people are free to make of it what they want. You will find many complaints regarding the Arduino IDE in the Arduino forums. It does not make life easy for the beginner, which surely is the point (and was my own experience when I first got an Uno).

                                                      As it happens, I totally agree with you regarding the PlatformIO website. It's a model of corporate BS which seems designed show how much money they can afford to waste on some wacky web developer with a mission to put interested punters off.

                                                      However to make it clear – it is just an IDE, like the Arduino one, but with some bells and whistles to make it easier and more convenient to use. It doesn't run on your board, it doesn't have a bootloader, though it could be used to install one in conjunction with one of the Nick Gammon scripts I linked to.

                                                    Viewing 25 posts - 1 through 25 (of 33 total)
                                                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                                    Advert

                                                    Latest Replies

                                                    Viewing 25 topics - 1 through 25 (of 25 total)
                                                    Viewing 25 topics - 1 through 25 (of 25 total)

                                                    View full reply list.

                                                    Advert