Having issues with 2AAA battery project and AVRDUDE



  • 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?


  • Hardware Contributor

    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



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


  • Hardware Contributor

    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.


  • Hardware Contributor

    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



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


  • Hardware Contributor

    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.



  • @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



  • @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.



  • @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.


  • Hardware Contributor

    I thougt uploading via ISP-programmer deletes the bootloader?



  • @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.



  • 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.



  • @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.


Log in to reply
 

Suggested Topics

  • 87
  • 3
  • 9
  • 2
  • 10
  • 5

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts