๐Ÿ’ฌ My Slim 2AA Battery Node





  • Iยดve read about your battery node with great interest. Nice work! Do your nodes keep their meshing capability after you put them in sleep mode?


  • Mod

    If you mean a repeater node (https://www.mysensors.org/download/sensor_api_15#create-repeating-nodes ) the answer is no. The radio is shut off during sleep so it can not receive. For a repeater node you need a permanent power supply.



  • Thats what I suspected. Thanks for quick response.



  • Hello ๐Ÿ™‚
    In the BOM file there is C5 capacitor, but I can't figure out where it does stand on the board. Can you help please ?



  • @carmelo42 Hi, I have not (yet) built a "Slim 2AA battery node" so I'm afraid I'm not the right guy to ask. Good luck though.


  • Hardware Contributor

    @carmelo42 0_1476822768316_slimC4C5.PNG



  • thanks @m26872 ๐Ÿ™‚

    I have ordered smd capacitors for c5 ... but I think it will be good ๐Ÿ™‚

    Can you explain the role of the C5 cap ? I know that C4 is for decoupling for the radio, but C1, C2, C3 and C4 : I don't know !

    Another little question ๐Ÿ™‚
    with my brand new atmega328p, I have burned the bootloader with an arduino uno with the "ArduinoISP" in it.

    After that, I have sent the sketch with another arduino (with it's own atmega removed) and my brand new atmega like that :
    https://www.arduino.cc/en/uploads/Tutorial/ArduinoUSBSerialSimple.png

    Is it possible to put the sketch in the atmega directly on the slim2aabatterynode board ? With an FTDI serial device ?



  • Keep in mind that if you are trying to use a DHT11 or DHT22 attached to the Slim 2AA, it only seems to work with 8 or 16MHz.. I couldn't get it to work with the ATmega328 running at 1MHz! It works fine with 8MHz internal oscillator ๐Ÿ™‚


  • Hardware Contributor

    @carmelo42 Sorry for a late reply. In short C2 is to reset the avr, C1 and C3 are to decouple the avr. And C4,C5 for the radio as you say. The caps are there as a recommendation, precaution, stability, etc, and all of them are not always necessary when it's supplied by battery.
    And yes, the idea of the FTDI-6-pin-header and bootloader is to provide ability to load sketches the normal Auduino way with FTDI and Arduino IDE.



  • This post is deleted!


  • Hello, I have built a number of these sensor nodes and really like the generic design!
    However I have run into trouble when trying to build a power meter with a photo sensor.
    I am using the code from MySensors but also tried other sources but my problem is that the digital pin i am using (D3) dont drop enough for the sensor to treat it as digital 0 as it stays at 2.3 V with a 2 AA battery power attached

    When trying the pulse sensor with external power it works perfect so it seems like D3 is floating which also is confirmed when I measure on D3 without the sensor attached. (approx 2.7V)
    I have used this row in my sketch pinMode(DIGITAL_INPUT_SENSOR,INPUT_PULLUP);

    Any clues what I can try?


  • Hardware Contributor

    @miljume said in ๐Ÿ’ฌ My Slim 2AA Battery Node:

    INPUT_PULLUP

    What kind of sensor do you use? Some sensors have an analog and digital output. The Digital should return either 0V or VCC while the analog returns all analog values between 0V and VCC.

    You could try an external pulldown resistor of 10k to ground if you think the pin is floating.

    Another approach is to elaborate with a photoresistor only and to get a clean 0/1 use an transistor. If the voltage drops to low though for the pin to get a clear 1 (2.4v on 3.3v atmega) you might need a DC/DC step up booster.



  • @sundberg84 Thank you for your feedback! I used the design found here so the sensor is OK. I had also tried to use a pulldown resistor but it showed that I had used too low value. When I use 10k as you suggested it worked like a charm, thank you! What I dont understand is why I should need the pulldown resistor in the first place? Shouldn't it be possible to solve that in the software?


  • Hardware Contributor

    @miljume - I dont think you can solve a floating pin in the software. Im not that experienced with internal pullups either so someone else have to answer that. Good you have it working though!


  • Contest Winner

    Internal pull-up resistors have 20-50k resistance. It may be not enough.



  • For those looking to 3d print a case for this, if you cant find the right sized ducting, I designed one thats unobtrusive:

    https://www.thingiverse.com/thing:2418194



  • Hello, i made a few. is someone interested in these nodes in Germany? We switched to an other Home Automation (wife: you can't build something DIY in our house that is so important than a light switch ...) system and so those nodes were never used. All nodes come untested and most of them unflashed. It would be a shame if they would just lay around here. Shipping is on you, the nodes and other s no longer needed (mysensors) stuff is free. Nodes are in Germany, and i will send them via DHL. if you are interested write me a mail to aki1988 (at) me (dot) com - first come first serve.
    Edit: gone



  • I built a couple of these nodes last year, I used 8 MHz internal, fuses off, and a DTH22.
    This a node on a dometizc network, it measures temperatur and internal voltage every 6 minutes, then it deep sleep.
    I can confirm that these nodes last more that a year on 2 aa batteries.

    0_1517680680891_Image.png



  • Hello, I placed an order through the openhardware.io website with Itead last night.
    They came back this morning with a ticket saying :
    Your gerber file: 571bf156249971713bb044ea.zip (Normalized Name:A100151928AN_A2AGLF002A.zip) in the order #100151928 is rejected.
    The reason is:
    The Gerber file doesn't have outline layer , please add it and re-upload the new file , thank you.
    Can you please assist as I don't really want to cancel my order.
    Thanks in advance
    Glenn



  • Hi,

    This board has an ICSP header. Does it mean that I can use it to burn the bootloader in a new ATMega328 chip?
    I've been trying to do burn the minicore in a board with all the required capacitors and resistor but without the NRF, but without success...
    Any idea?

    Thanks,


  • Hardware Contributor

    @joaoabs - yes!
    Just as you, I burned it with as few components (like radio) as possible but that worked out for me.



  • Hello,

    I'm sorry to insist on this one, but I'm a bit lost....

    I could understand that the recommended bootloader is MiniCore. I installed it in my Arduino IDE and after several tries-and-errors I believe I was able to burn the MiniCore bootloader by using an USBasp2 connected to the ICSP on the slim board:

    /home/jabss/Desktop/arduino-1.8.2/hardware/tools/avr/bin/avrdude -C/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf -v -patmega328p -cusbasp -Pusb -e -Ulock:w:0x3f:m -Uefuse:w:0xff:m -Uhfuse:w:0xd7:m -Ulfuse:w:0xe2:m 
    
    avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch
    
             System wide configuration file is "/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf"
             User configuration file is "/home/jabss/.avrduderc"
             User configuration file does not exist or is not a regular file, skipping
    
             Using Port                    : usb
             Using Programmer              : usbasp
             AVR Part                      : ATmega328P
             Chip Erase delay              : 9000 us
             PAGEL                         : PD7
             BS2                           : PC2
             RESET disposition             : dedicated
             RETRY pulse                   : SCK
             serial program mode           : yes
             parallel program mode         : yes
             Timeout                       : 200
             StabDelay                     : 100
             CmdexeDelay                   : 25
             SyncLoops                     : 32
             ByteDelay                     : 0
             PollIndex                     : 3
             PollValue                     : 0x53
             Memory Detail                 :
    
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
    
             Programmer Type : usbasp
             Description     : USBasp, http://www.fischl.de/usbasp/
    
    avrdude: auto set sck period (because given equals null)
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: Device signature = 0x1e950f (probably m328p)
    avrdude: erasing chip
    avrdude: auto set sck period (because given equals null)
    avrdude: reading input file "0x3f"
    avrdude: writing lock (1 bytes):
    
    /home/jabss/Desktop/arduino-1.8.2/hardware/tools/avr/bin/avrdude -C/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf -v -patmega328p -cusbasp -Pusb -Uflash:w:/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/bootloaders/empty/empty.hex:i -Ulock:w:0x0f:m 
    
    avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch
    
             System wide configuration file is "/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf"
             User configuration file is "/home/jabss/.avrduderc"
             User configuration file does not exist or is not a regular file, skipping
    
             Using Port                    : usb
             Using Programmer              : usbasp
             AVR Part                      : ATmega328P
             Chip Erase delay              : 9000 us
             PAGEL                         : PD7
             BS2                           : PC2
             RESET disposition             : dedicated
             RETRY pulse                   : SCK
             serial program mode           : yes
             parallel program mode         : yes
             Timeout                       : 200
             StabDelay                     : 100
             CmdexeDelay                   : 25
             SyncLoops                     : 32
             ByteDelay                     : 0
             PollIndex                     : 3
             PollValue                     : 0x53
             Memory Detail                 :
    
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
    
             Programmer Type : usbasp
             Description     : USBasp, http://www.fischl.de/usbasp/
    
    avrdude: auto set sck period (because given equals null)
    Writing | ################################################## | 100% 0.00s
    
    avrdude: 1 bytes of lock written
    avrdude: verifying lock memory against 0x3f:
    avrdude: load data lock data from input file 0x3f:
    avrdude: input file 0x3f contains 1 bytes
    avrdude: reading on-chip lock data:
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: verifying ...
    avrdude: 1 bytes of lock verified
    avrdude: reading input file "0xff"
    avrdude: writing efuse (1 bytes):
    
    Writing | ################################################## | 100% 0.00s
    
    avrdude: 1 bytes of efuse written
    avrdude: verifying efuse memory against 0xff:
    avrdude: load data efuse data from input file 0xff:
    avrdude: input file 0xff contains 1 bytes
    avrdude: reading on-chip efuse data:
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: verifying ...
    avrdude: 1 bytes of efuse verified
    avrdude: reading input file "0xd7"
    avrdude: writing hfuse (1 bytes):
    
    Writing | ################################################## | 100% 0.01s
    
    avrdude: 1 bytes of hfuse written
    avrdude: verifying hfuse memory against 0xd7:
    avrdude: load data hfuse data from input file 0xd7:
    avrdude: input file 0xd7 contains 1 bytes
    avrdude: reading on-chip hfuse data:
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: verifying ...
    avrdude: 1 bytes of hfuse verified
    avrdude: reading input file "0xe2"
    avrdude: writing lfuse (1 bytes):
    
    Writing | ################################################## | 100% 0.00s
    
    avrdude: 1 bytes of lfuse written
    avrdude: verifying lfuse memory against 0xe2:
    avrdude: load data lfuse data from input file 0xe2:
    avrdude: input file 0xe2 contains 1 bytes
    avrdude: reading on-chip lfuse data:
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: verifying ...
    avrdude: 1 bytes of lfuse verified
    
    avrdude done.  Thank you.
    
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: Device signature = 0x1e950f (probably m328p)
    avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
    avrdude: erasing chip
    avrdude: auto set sck period (because given equals null)
    avrdude: reading input file "/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/bootloaders/empty/empty.hex"
    avrdude: writing flash (2 bytes):
    
    Writing | ################################################## | 100% 0.07s
    
    avrdude: 2 bytes of flash written
    avrdude: verifying flash memory against /root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/bootloaders/empty/empty.hex:
    avrdude: load data flash data from input file /root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/bootloaders/empty/empty.hex:
    avrdude: input file /root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/bootloaders/empty/empty.hex contains 2 bytes
    avrdude: reading on-chip flash data:
    
    Reading | ################################################## | 100% 0.04s
    
    avrdude: verifying ...
    avrdude: 2 bytes of flash verified
    avrdude: reading input file "0x0f"
    avrdude: writing lock (1 bytes):
    
    Writing | ################################################## | 100% 0.01s
    
    avrdude: 1 bytes of lock written
    avrdude: verifying lock memory against 0x0f:
    avrdude: load data lock data from input file 0x0f:
    avrdude: input file 0x0f contains 1 bytes
    avrdude: reading on-chip lock data:
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: verifying ...
    avrdude: 1 bytes of lock verified
    
    avrdude done.  Thank you.
    
    

    Just for reference, the parameters were:
    Board: Atmega328
    Bootloader: No (only worked this way, but still not sure what this means: If is already a bootloader on the chip, or if we want to write a bootloader)
    Variant: 328P
    BOD: Disabled
    Clock: 8Mhz internal (here I think its what we want to configure on the target chip - I wasn't sure what was about because it could also have been the clock frequency of the programmer)
    Compiler LTO: Disabled
    Programer: USBASP

    Anyway, after this supposed success message, I believe I have a MiniCore bootloader in the chip and now it should be able to be programed with the AVRISPMKII (with the usb/serial programing adapter I use to program my mini-pros).

    However, I'm not able to get it working. Maybe I'm choosing the wrong definitions in the arduino IDE.
    As board definition, I'm using the same as when burning the bootloader:

    Board: Atmega328 (from the minicore subset)
    Bootloader: Yes
    Variant: 328P
    BOD: Disabled
    Clock: 8Mhz internal
    Compiler LTO: Disabled
    Programer: AVRISPMKII

    For instance, to load the ascii table example (for testing purposes), I get this error:

    Insert Code Build options changed, rebuilding all
    Sketch uses 2330 bytes (7%) of program storage space. Maximum is 32256 bytes.
    Global variables use 308 bytes (15%) of dynamic memory, leaving 1740 bytes for local variables. Maximum is 2048 bytes.
    /home/jabss/Desktop/arduino-1.8.2/hardware/tools/avr/bin/avrdude -C/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b38400 -D -Uflash:w:/tmp/arduino_build_636369/ASCIITable.ino.hex:i 
    
    avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch
    
             System wide configuration file is "/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf"
             User configuration file is "/home/jabss/.avrduderc"
             User configuration file does not exist or is not a regular file, skipping
    
             Using Port                    : /dev/ttyUSB0
             Using Programmer              : arduino
             Overriding Baud Rate          : 38400
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
    
    avrdude done.  Thank you.
    
    Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
    

    Any hint on what I may be doing wrong?
    Thanks,



  • I just made a new case for a LiFePO4 magnetic sensor implementation of this. Thanks for the excellent work on this handy node design!
    https://www.thingiverse.com/thing:3034907!

    a picture



  • Here is a new enclosure for the My Slim 2AA Battery Node. Not as slim but the overall form factor is still small.
    https://www.thingiverse.com/thing:3269357



  • Hi @m26872

    Congrats for the great and simple design.
    I've been troubleshooting this slimnode with RFM69 radios and realized that a shunt between RFM69's DIO0 and Mega328's INT0 is required, otherwise the node will not "hear" the gateway. Even if the nrf2rmf69 board is used this shunt is required.
    It seems this is a re-current issue. Although this may be solved in the PCB2.0 could it be mentioned somewhere in the page above?

    Thanks and cheers!


  • Hardware Contributor

    @joaoabs said in ๐Ÿ’ฌ My Slim 2AA Battery Node:

    Thx! Done!



Suggested Topics

62
Online

11.4k
Users

11.1k
Topics

112.7k
Posts