Excuse me, i tried to upload the sketch with an ftdi programmer, and i did set the board to 1mhz type
-
[TIPS] battery powered sensors
-
is the baudrate set correctly in the board txt?
-
I copied the settings posted in the first pist of this thread
-
and the ISP arduino was disconnected? What error messages do you get?
-
Yes it was disconnected from the isp…
I don’t see anything uploading. No rx and tx on the programmer. Programming takes way too long… do not know the exact code -
I guess you remembered to change back the USB port after programming the bootloader? It seems obvious but it can be confusing.
-
did you also remove the power regulator on your pro mini?
In that case you can’t use the vcc of the programmer anymore and you have to power you pro mini with batteries during flashing I think (also see https://forum.pimatic.org/topic/383/tips-battery-powered-sensors)
-
Hi,
I’m trying to build a wireless battery powered sensor with an arduino pro mini 3.3V/8MHz + NRF24L01
I buy a rechargeable coin battery LIR2032 3.6V
But the voltage is upper than 3.3V or 3.6V (actually 3.9V but I read it can be above 4V when fully charged and must be charged at 4.2V)What is the voltage limit of the arduino mini pro 3.3V on Vcc pin? (I want to remove the regulator to spare some uA so I don’t use RAW pin)
I saw that for the NRF24L01 the limit is about 3.6V… So I read this article and try to find some cheap low current LDO (only for the NRF) but I wonder if there is not simpler solution somebody success to? (Diode, pwm?)
Sorry for my poor English, thank you for reading.
-
The arduino mini pro can have this voltage. In fact it is the same processor as on the 5V versions, only the CPU runs on a lower frequency.
The most simple solution to power the NRF is with a LDO regulator for example lp2950-33lpe3
I’m not sure if it is possible to power the arduino on a higher voltage then the NRF because they are connected via IO. So probably it is better to have them both on the regulator.If you want to save battery program the arduino on 1Mhz (see above), removeLEDs and sleep very often
-
Thank you for your answer
I look the data-sheet of the LP2950 and look further LDO regulators, i found the HT7333 who seems to have a 4uA quiescent current, is it a better choice for the battery application?
What will happen when the LIR battery voltage will drop under the regulator output voltage? For example if the LIR drop to 3.1V will the regulator give something like 3V or nothing?
Is it necessary to desolder the on-board regulator if you don’t use the RAW pin (using directly the Vcc one)?
I remember reading somewhere only the power of the NRF has to be under 3.6V the other pins where 5V tolerant… but I don’t find a confirmation back… Will try, will see
For the moment I don’t success to wake my mini pro more than every 8 seconds. Will search further, must be a way.
I will try to slow down to 1MHz as on this example thank you, but I guess you can have some trouble with all libraries who need time? NRF one isn’t impacted?
-
I just read about the XC6206P332MR who have 1uA consumption, a second way could to replace the mini pro one with this one? (I don’t know if my fingers are tiny enough ^^)
-
Well I think 1uA or 4uA won’t make much difference, the self discharging of the battery probably has more influence. Can the battery handle the current peaks needed for the NRF?
@ROUGEXIII said in [TIPS] battery powered sensors:
What will happen when the LIR battery voltage will drop under the regulator output voltage? For example if the LIR drop to 3.1V will the regulator give something like 3V or nothing?
Yes it will follow the input voltage. The drop depends on the load and the regulator.
@ROUGEXIII said in [TIPS] battery powered sensors:
I will try to slow down to 1MHz as on this example thank you, but I guess you can have some trouble with all libraries who need time? NRF one isn’t impacted?
The NRF (mysensors) library works at 1MHz. I only had problems with the DHT library, I couldn’t get that to work at 1MHz. There could be others as well off course.
If you look on the mysensors website there a lot of examples that use sleeping, for longer periods.
What kind of sensor do you want to make?
-
Hi
I finaly received my USBASP AVR programmer
I successfully set the fuses to run at 1MHZ and to get BOD level to 1.8V
I sucessfully flash the 1MHz bootloaderUnfortunatly I can’t anymore flash with classic programmer through TX/RX + DTR/RST of my mini pro.
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 "/home/nous/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf" User configuration file is "/home/nous/.avrduderc" User configuration file does not exist or is not a regular file, skipping Using Port : /dev/ttyUSB0 Using Programmer : arduino Overriding Baud Rate : 9600 avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xff avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xff avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xff avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xff avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xff avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xfb avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xfb avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xff avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xfc avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xff avrdude done. Thank you. Une erreur est survenue lors du transfert du croquis
I can still flash with USBASP AVR programmer but it is less convenient cause I have to unplug my arduino to do this…
Any Idea where it can come from?
-
I think I have read somewhere that you have to create a new Arduino by edit a common file from the 8MHz mini so that the Arduino IDE knows that you have a 1MHz.
-
@v1per said in [TIPS] battery powered sensors:
I think I have read somewhere that you have to create a new Arduino by edit a common file from the 8MHz mini so that the Arduino IDE knows that you have a 1MHz.
Thank for answer.
I followed the tuto:
I modified the board file
## Arduino Pro or Pro Mini (3.3V, 1 MHz) w/ ATmega328P [YBT 1.8V] ## --------------------------------------------------- pro.menu.cpu.1MHzatmega328=ATmega328P (1.8V, 1 MHz) pro.menu.cpu.1MHzatmega328.upload.maximum_size=30720 pro.menu.cpu.1MHzatmega328.upload.maximum_data_size=2048 pro.menu.cpu.1MHzatmega328.upload.speed=9600 pro.menu.cpu.1MHzatmega328.bootloader.low_fuses=0x62 pro.menu.cpu.1MHzatmega328.bootloader.high_fuses=0xDA pro.menu.cpu.1MHzatmega328.bootloader.extended_fuses=0xFF pro.menu.cpu.1MHzatmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_1MHz.hex pro.menu.cpu.1MHzatmega328.build.mcu=atmega328p pro.menu.cpu.1MHzatmega328.build.f_cpu=1000000L I created the ATmegaBOOT_168_atmega328_pro_1MHz.hex file and added this data: :107E0000112484B714BE81FFE6D085E08093810001 :107E100082E08093C00088E18093C10086E0809377 :107E2000C2008CE08093C4008EE0BFD0259A86E02B :107E300023EC3FEF91E0309385002093840096BBC4 :107E4000B09BFECF1D9AA8958150A9F7EE24FF2480 :107E5000AA24A394B5E0CB2EA1E1BA2EF3E0DF2E45 :107E600098D0813461F495D0082FA5D0023829F13B :107E7000013811F485E001C083E083D07FC08234F3 :107E800011F484E103C0853419F485E09CD076C0F8 :107E9000853579F47ED0E82EFF247BD0082F10E0C2 :107EA000102F00270E291F29000F111F84D07801E1 :107EB00065C0863521F484E086D080E0DECF84364C :107EC00009F040C066D065D0082F63D080E0E81686 :107ED00080E7F80618F4F701D7BEE895C0E0D1E0D6 :107EE00058D089930C17E1F7F0E0EF16F0E7FF06A2 :107EF00018F0F701D7BEE8955ED007B600FCFDCFBD :107F0000A701A0E0B1E02C9130E011968C9111977F :107F100090E0982F8827822B932B1296FA010C0160 :107F2000A7BEE89511244E5F5F4FF1E0A038BF0770 :107F300051F7F701C7BEE89507B600FCFDCFB7BE05 :107F4000E8951CC0843761F424D023D0082F21D0B9 :107F500032D0F70185917F0114D00150D1F70EC0C6 :107F6000853739F428D08EE10CD085E90AD08FE02E :107F700084CF813511F488E018D01DD080E101D084 :107F80006FCF982F8091C00085FFFCCF9093C600E3 :107F900008958091C00087FFFCCF8091C00084FDD0 :107FA00001C0A8958091C6000895E0E6F0E098E150 :107FB000908380830895EDDF803219F088E0F5DF4B :107FC000FFCF84E1DECF1F93182FE3DF1150E9F7D5 :107FD000F2DF1F910895282E80E0E7DFEE27FF27CC :027FE000099402 :027FFE0000057C :0400000300007E007B :00000001FF
I tried this fuse configurations :
avrdude: safemode: Fuses OK (E:FE, H:D4, L:62) avrdude: safemode: Fuses OK (E:FE, H:DA, L:62)
-
I have an other problem:
At 3.0 V the arduino start
At 2.5V the arduino start
At 1.8V the arduino don’t start… even if I totally disable the BOD level (avrdude: safemode: Fuses OK (E:FF, H:DA, L:62)How can I be sure it is running at 1MHz?
-
@rougexiii said in [TIPS] battery powered sensors:
Unfortunatly I can’t anymore flash with classic programmer through TX/RX + DTR/RST of my mini pro.
I finally found I was doing wrong…
Each time I wrote the bootloader and fuses,I flashed just after the program with the USBASP AVR still connected.
I think doing this was removing the bootloader.
And when I tried to program through serial after this, this wasn’t working anymore.Anyway my 1.8V supply problem is still here if someone as the answer:
@rougexiii said in [TIPS] battery powered sensors:
I have an other problem:
At 3.0 V the arduino start
At 2.5V the arduino start
At 1.8V the arduino don’t start… even if I totally disable the BOD level (avrdude: safemode: Fuses OK (E:FF, H:DA, L:62)How can I be sure it is running at 1MHz?
PS: sorry for my english
Edit: Damn! an other noob error… I was testing the arduino by blinking the onboard led… but at 1.8V the current through was unsuffiscient to get the led on…
Need to try to get my bme280 and NRF24L01 at this low voltage now -
Hi,
An other question:
Without external crystal it is not possible to get a 2MHz or 4MHz frequencies on the atmega328p right? only 1MHz/8MHz right?