My Slim 2AA Battery Node
-
There is no crystal?
I haven't used Atmega328P as standalone but I have read that you need a crystal.
@flopp There's an internal 8MHz xtal in the uC. Infact often default set to be used by factory "fuse" settings. It's not as ambient condition stable and accurate as an external crystal, but quite good enough for our application.
-
@flopp There's an internal 8MHz xtal in the uC. Infact often default set to be used by factory "fuse" settings. It's not as ambient condition stable and accurate as an external crystal, but quite good enough for our application.
-
What about these pF caps, why not use SMD tantalum instead of Solid electrolyte with legs?
Or can I use ATmega without caps, since I dont have an external crystal?
@flopp I doubt there are any electrolytes in the pF range seen here. If you mean the pF caps in the example pictures, they are not part of the Slim Node base concept and just a random choice I did for myself. If you mean all the 100nF caps in the base concept, it's a matter of the "smd free" design criteria I apply from time to time.
-
What about these pF caps, why not use SMD tantalum instead of Solid electrolyte with legs?
Or can I use ATmega without caps, since I dont have an external crystal?
-
@flopp I doubt there are any electrolytes in the pF range seen here. If you mean the pF caps in the example pictures, they are not part of the Slim Node base concept and just a random choice I did for myself. If you mean all the 100nF caps in the base concept, it's a matter of the "smd free" design criteria I apply from time to time.
@m26872 said:
@flopp I doubt there are any electrolytes in the pF range seen here. If you mean the pF caps in the example pictures, they are not part of the Slim Node base concept and just a random choice I did for myself. If you mean all the 100nF caps in the base concept, it's a matter of the "smd free" design criteria I apply from time to time.
OK. Yes, I saw that there was cap in pictures.
-
@flopp ... or if you refer to the standard pair of 22pF caps used when there is an external crystal - no, you wont need them.
-
Hi together,
as first i have to say, its a nice node, that you build.
So i tried to build one. I ordered an atmega 328p. Flashed the bootloader from the forum. This is the boards.txt:atmega328_1mhz_4800baud.name=ATmega328 on a breadboard 1MHz internal clock, fast start, 1.8V BOD, 4800baud upload atmega328_1mhz_4800baud.upload.protocol=arduino atmega328_1mhz_4800baud.upload.maximum_size=32256 atmega328_1mhz_4800baud.upload.speed=4800 atmega328_1mhz_4800baud.bootloader.low_fuses=0x42 atmega328_1mhz_4800baud.bootloader.high_fuses=0xDE atmega328_1mhz_4800baud.bootloader.extended_fuses=0x06 atmega328_1mhz_4800baud.bootloader.file=atmega/atmega328_1b.hex atmega328_1mhz_4800baud.bootloader.unlock_bits=0x3F atmega328_1mhz_4800baud.bootloader.lock_bits=0x2F atmega328_1mhz_4800baud.build.mcu=atmega328p atmega328_1mhz_4800baud.build.f_cpu=1000000L atmega328_1mhz_4800baud.build.core=arduino:arduino atmega328_1mhz_4800baud.build.variant=arduino:standard atmega328_1mhz_4800baud.bootloader.tool=arduino:avrdude atmega328_1mhz_4800baud.upload.tool=arduino:avrdudeNow i have measured the current draw, and the arduino alone draws 6.8mA (without crystal, nrf ...)
I tried some sketches, (binaryswitchsleepsensor) but the current is not really gone down.
The only sketch is this:// **** INCLUDES ***** #include "LowPower.h" void setup() { // No setup is required for this library } void loop() { // Enter power down state for 8 s with ADC and BOD module disabled LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); // Do something here // Example: Read sensor, data logging, data transmission. }With this sketch is the current 0.02mA
OK, 0.02mA is not bad, but when i read that some of you have few µa, i dont understand why the current on my atmega is so "high"
Can somebody tell me what bootloader is good, wich fuses are good. And maybe what i have to do to get the current so small as possble
Thank you very much
Greets Eddie -
Hi together,
as first i have to say, its a nice node, that you build.
So i tried to build one. I ordered an atmega 328p. Flashed the bootloader from the forum. This is the boards.txt:atmega328_1mhz_4800baud.name=ATmega328 on a breadboard 1MHz internal clock, fast start, 1.8V BOD, 4800baud upload atmega328_1mhz_4800baud.upload.protocol=arduino atmega328_1mhz_4800baud.upload.maximum_size=32256 atmega328_1mhz_4800baud.upload.speed=4800 atmega328_1mhz_4800baud.bootloader.low_fuses=0x42 atmega328_1mhz_4800baud.bootloader.high_fuses=0xDE atmega328_1mhz_4800baud.bootloader.extended_fuses=0x06 atmega328_1mhz_4800baud.bootloader.file=atmega/atmega328_1b.hex atmega328_1mhz_4800baud.bootloader.unlock_bits=0x3F atmega328_1mhz_4800baud.bootloader.lock_bits=0x2F atmega328_1mhz_4800baud.build.mcu=atmega328p atmega328_1mhz_4800baud.build.f_cpu=1000000L atmega328_1mhz_4800baud.build.core=arduino:arduino atmega328_1mhz_4800baud.build.variant=arduino:standard atmega328_1mhz_4800baud.bootloader.tool=arduino:avrdude atmega328_1mhz_4800baud.upload.tool=arduino:avrdudeNow i have measured the current draw, and the arduino alone draws 6.8mA (without crystal, nrf ...)
I tried some sketches, (binaryswitchsleepsensor) but the current is not really gone down.
The only sketch is this:// **** INCLUDES ***** #include "LowPower.h" void setup() { // No setup is required for this library } void loop() { // Enter power down state for 8 s with ADC and BOD module disabled LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF); // Do something here // Example: Read sensor, data logging, data transmission. }With this sketch is the current 0.02mA
OK, 0.02mA is not bad, but when i read that some of you have few µa, i dont understand why the current on my atmega is so "high"
Can somebody tell me what bootloader is good, wich fuses are good. And maybe what i have to do to get the current so small as possble
Thank you very much
Greets Eddie@meddie I don't really get what you've ruled out in your troubleshooting. Do you "test the arduino alone" using MySensors lib and example sketches? Using Lowpower lib directly works ok as it seems. Next step would be to connect the nRF24L01+ and run some MySensors lib example.
Ext fuses 0x07 (BOD disabled) instead of 0x06 (BOD 1.8V) could save you a few uA.
-
@m26872 said:
Do you "test the arduino alone" using MySensors lib and example sketches?
Yes, on the bredboard is only the atmega 328p. nothing else. Connected to 5v
Using Lowpower lib directly works ok as it seems.
Yes using the LowPower lib i came down to 0.01mA current draw.
Next step would be to connect the nRF24L01+ and run some MySensors lib example.
Ok, i will try it today evening.
Ext fuses 0x07 (BOD disabled) instead of 0x06 (BOD 1.8V) could save you a few uA.
OK, i try this too.Thank you very much.
Greets Eddie -
ok, i tried to burn with 0x07 Fuse. And i tried to power the atmega with 3.3 v and not 5v.
Now i came down to 4µA in sleep mode with the lowpower sketch.
When i try to flash a mysensors sketch the the atmega has a current draw 1mA. -
ok, i tried to burn with 0x07 Fuse. And i tried to power the atmega with 3.3 v and not 5v.
Now i came down to 4µA in sleep mode with the lowpower sketch.
When i try to flash a mysensors sketch the the atmega has a current draw 1mA. -
yes of course, i just connected a nrf to the atmega an uploaded the binaryswitchsleepsensor sketch. Now i have a current draw 95.6µA
But when i take the door contact off the atmega draws only 1.3µA
When the door contact is closed (from 3 to GND) the the current is rising to 95.6µA -
Makes sense to me. By closing the contact you get a path from 3V3 via the pullup resistor to ground.
The current is (for a pullup resistor value around 30KOhm) around 100uA.
Try NOT using the internal pullup resistor of pin D3, and using an external pullup resistor of 1MOhm or more.
You will see lower current when the contact is closed.
-
-
@m26872 I see it in the BOM. But now, i can't see where it goes (5 hours... I ask a question, and 5 hours later I can't see what i was talking about....)
C4 is cool for the NRF pic of tension, but -just for information- it could be wherever between 0Vcc and 5Vcc, not necessarily near the NRF ?
As an electrician, and not an electronician, I don't understand why so many 0.1uF capacitor are needed (but i put them too) as we can see in MySlimNode2-sch.pdf that they are virtually at the same place... :sweat_smile:
Thanks for the answer !