Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Having issues with 2AAA battery project and AVRDUDE

Having issues with 2AAA battery project and AVRDUDE

Scheduled Pinned Locked Moved Hardware
14 Posts 5 Posters 4.5k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ahhk
    Hardware Contributor
    wrote on last edited by
    #2

    Hi,

    this is **very **interesenting for me. could you write a small tutorial when you solved it? i failed until today to use arduino ide with 328p@4mhz(or lower) with arduino bootloader. i read something about compiling a new bootloader - but this is too much for me to go and i didnt find a compiled bootloader for 1 or 4mhz to download :(

    greetings

    andreas

    1 Reply Last reply
    0
    • D den2k

      I've had some decent success so far getting a Pro Mini 3.3V + nRF24 + temperature sensor + 2 AAA bty working. The node is pushing temperature sensor data to my serial gateway which is connected via USB to a Pi.

      The challenge is driving the node to use even lower power consumption. I am at 4-5mA on average now. This was with me removing 2 LEDs (one from Pro Mini and one from a Step up module).

      I've been trying to use this method:
      http://iot-playground.com/2-uncategorised/9-arduino-low-power-sensor

      To create a low powered Mini running at 1MHz without much luck. When I run avrdude this is what I get after programming the board.

      10-21-2015 10-41-47 PM.jpg

      I believe using avrdude the bootloader is programmed correctly into the Pro Mini, but not sure because when I try to program the board from the Arduino IDE, (I've already added the special board to the board.txt file) it won't program correctly.

      Any clue?

      OitzuO Offline
      OitzuO Offline
      Oitzu
      wrote on last edited by
      #3

      @den2k baudrate to high in boards.txt? The mcu can't handle the same high baudrate on 1mhz.

      D 1 Reply Last reply
      0
      • L Offline
        L Offline
        LastSamurai
        Hardware Contributor
        wrote on last edited by
        #4

        Perhaps this helps. As far as I know and have read 1Mhz doesn't really change that much because you sleep most of the time anyways. Try to disable the BOD, that uses most of the power.

        D R 2 Replies Last reply
        0
        • A Offline
          A Offline
          ahhk
          Hardware Contributor
          wrote on last edited by ahhk
          #5

          but you can run on a lower Vmin value....
          The other thread doesnt help - there was no solution for the serial-problem at 1mhz...
          Greetings

          1 Reply Last reply
          0
          • OitzuO Offline
            OitzuO Offline
            Oitzu
            wrote on last edited by
            #6

            http://wormfood.net/avrbaudcalc.php?postbitrate=9600&postclock=1
            Indicates a baudrate of 4800 should be fine...

            1 Reply Last reply
            0
            • L Offline
              L Offline
              LastSamurai
              Hardware Contributor
              wrote on last edited by
              #7

              Sure there was (at least wiht a similar problem at 8Mhz). Define your own board for the ide with a lower baudrate and use and ISP + upload with programmer in the IDE.

              D 1 Reply Last reply
              0
              • OitzuO Oitzu

                @den2k baudrate to high in boards.txt? The mcu can't handle the same high baudrate on 1mhz.

                D Offline
                D Offline
                den2k
                wrote on last edited by den2k
                #8

                @Oitzu Not sure that is the issue. This is what I have in my board.txt

                nomii.upload.protocol=arduino
                nomii.upload.maximum_size=30720
                nomii.upload.speed=9600
                nomii.upload.tool=avrdude

                nomii.bootloader.low_fuses=0x62
                nomii.bootloader.high_fuses=0xda
                nomii.bootloader.extended_fuses=0x06
                nomii.bootloader.path=nomii
                nomii.bootloader.file=atmega328p_1mhz_9600.hex
                nomii.bootloader.unlock_bits=0x3F
                nomii.bootloader.lock_bits=0x0F
                nomii.bootloader.tool=avrdude

                nomii.build.mcu=atmega328p
                nomii.build.f_cpu=1000000L
                nomii.build.core=arduino
                nomii.build.variant=standard
                nomii.build.board=AVR_NOMII

                1 Reply Last reply
                0
                • L LastSamurai

                  Perhaps this helps. As far as I know and have read 1Mhz doesn't really change that much because you sleep most of the time anyways. Try to disable the BOD, that uses most of the power.

                  D Offline
                  D Offline
                  den2k
                  wrote on last edited by
                  #9

                  @LastSamurai interesting you say that 1Mhz doesn't matter that much. I don't know if it does or doesn't yet, because I cannot get it to work.

                  When measuring power consumption I get 4-5mA of consistent power draw. It spikes up to 25mA when the radio and Mini turn on to transmit and goes back to 5mA.

                  I have not removed the 3.3V voltage regulator on the Mini, so that may add to the 5mA figure, but I am no where near the <1mA that others are getting.

                  OitzuO 1 Reply Last reply
                  0
                  • L LastSamurai

                    Sure there was (at least wiht a similar problem at 8Mhz). Define your own board for the ide with a lower baudrate and use and ISP + upload with programmer in the IDE.

                    D Offline
                    D Offline
                    den2k
                    wrote on last edited by
                    #10

                    @LastSamurai When I try programming to upload an Arduino script using the Arduino IDE to the 1Mhz board @ 9600 baud, I am using my FTDI module connected to the Mini. Are you saying I need to hook up a ISP programmer... thought that was only when I needed to program a bootloader.

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      ahhk
                      Hardware Contributor
                      wrote on last edited by
                      #11

                      I thougt uploading via ISP-programmer deletes the bootloader?

                      1 Reply Last reply
                      0
                      • D den2k

                        @LastSamurai interesting you say that 1Mhz doesn't matter that much. I don't know if it does or doesn't yet, because I cannot get it to work.

                        When measuring power consumption I get 4-5mA of consistent power draw. It spikes up to 25mA when the radio and Mini turn on to transmit and goes back to 5mA.

                        I have not removed the 3.3V voltage regulator on the Mini, so that may add to the 5mA figure, but I am no where near the <1mA that others are getting.

                        OitzuO Offline
                        OitzuO Offline
                        Oitzu
                        wrote on last edited by Oitzu
                        #12

                        @den2k said:

                        When measuring power consumption I get 4-5mA of consistent power draw. It spikes up to 25mA when the radio and Mini turn on to transmit and goes back to 5mA.

                        Did you removed the Power-LED?

                        @den2k said:

                        @Oitzu Not sure that is the issue. This is what I have in my board.txt
                        nomii.upload.speed=9600

                        Tried 4800?
                        I'm also missing nomii.upload.maximum_data_size=2048

                        @ahhk said:

                        I thougt uploading via ISP-programmer deletes the bootloader?

                        Don't think so. Bootloader and Sketch go to different memory location.

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          den2k
                          wrote on last edited by
                          #13

                          The Pro mini is now running at 0.7mA without the power LED. I've been able to program using AVRDUDE using a new AVR programmer from Sparkfun (Pocket AVR). The one on Ebay I found out needed to be programmed via AVR first.

                          9600 Baud works. So all ok now. Thanks everyone.

                          1 Reply Last reply
                          0
                          • L LastSamurai

                            Perhaps this helps. As far as I know and have read 1Mhz doesn't really change that much because you sleep most of the time anyways. Try to disable the BOD, that uses most of the power.

                            R Offline
                            R Offline
                            riataman
                            wrote on last edited by riataman
                            #14

                            @LastSamurai said:

                            Perhaps this helps. As far as I know and have read 1Mhz doesn't really change that much because you sleep most of the time anyways. Try to disable the BOD, that uses most of the power.

                            I don't think the idea behind changing the clock to 1Mhz is to save energy, but to allow the mcu to run at lower voltages (allowing it to keep running when the batteries are already considered dead for other uses). The Atmega328 can run down to 1.8V but only if your clock speed is 4Mhz or lower. We change it to 1Mhz because its easier to do that in software, rather than solder a new crystal.

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            19

                            Online

                            11.7k

                            Users

                            11.2k

                            Topics

                            113.1k

                            Posts


                            Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • MySensors
                            • OpenHardware.io
                            • Categories
                            • Recent
                            • Tags
                            • Popular