Update : The run time for the 1.8V 4Mhz board was 27.5 hours vs 13 hours for the 3.3V 8Mhz version. This is a huge difference and we haven’t even started on power saving modes in software yet.
The new pAVA R6 board was designed with the ability to be able to run the logic at 1.8V if fitted with the correct regulator. Hopefully this will save even more power, as I write this the board is current on test with the same code that powered the 3.3V version for 13 hours from a single AA.
In order to drop the voltage to 1.8V for the board a few small changes had to be made, primarily the ATMega328P has to run at 4Mhz as opposed to 8Mhz to stay in spec. Secondly the uBLOX MAX6Q module has to be switched out for the 1.8V rated MAX6G module. The RFM22B is fine down to 1.8V.
So fitted with a 4Mhz crystal and a TPS61200DRC regulator the board has been tested step by step this week to ensure the AVR works, then the radio and finally the GPS. Although I utilise the Arduino enviroment for programming I use an ICSP Programmer so don’t use the Arduino boot loader.
However to facilitate the new board I did have to make a custom entry in boards. Firstly I had to program the fuses in Atmel Studio 6. I turned the brown out protection off, set the fuse to utilise an external crystal 3-8Mhz. Secondly I added the following to boards.txt in Arduino :
############################################################## pAvaR6LP.name=pAVA R6 Low Power (1.8V, 4 MHz) w/ ATmega328 pAvaR6LP.upload.protocol=arduino pAvaR6LP.upload.maximum_size=30720 pAvaR6LP.upload.speed=57600 pAvaR6LP.bootloader.low_fuses=0xFD pAvaR6LP.bootloader.high_fuses=0xDA pAvaR6LP.bootloader.extended_fuses=0xFF pAvaR6LP.bootloader.path=atmega pAvaR6LP.bootloader.file=ATmegaBOOT_168_atmega328_pava_4MHz.hex pAvaR6LP.bootloader.unlock_bits=0x3F pAvaR6LP.bootloader.lock_bits=0x0F pAvaR6LP.build.mcu=atmega328p pAvaR6LP.build.f_cpu=4000000L pAvaR6LP.build.core=arduino pAvaR6LP.build.variant=standard
I don’t actually think you need to change the boot loader however for completeness I did recompile the boot loader as follows :
1. Add the following to your PATH environmental variable :
C:\arduino-1.0.1\hardware\tools\avr\utils\bin;C:\apps\arduino-1.0.1\hardware\tools\avr\bin;
Obviously substituting your paths as needed.
2. Edit C:\arduino-1.0.1\hardware\arduino\bootloaders\atmega\Makefile adding :
atmega328_pava: TARGET = atmega328_pava_4MHz atmega328_pava: MCU_TARGET = atmega328p atmega328_pava: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAUD_RATE=57600 -DDOUBLE_SPEED atmega328_pava: AVR_FREQ = 4000000L atmega328_pava: LDSECTION = --section-start=.text=0x7800 atmega328_pava: $(PROGRAM)_atmega328_pava_4MHz.hex
3. From C:\arduino-1.0.1\hardware\arduino\bootloaders\atmega
Type : make atmega328_pava
Once done you can program the chip up via the ICSP as normal, I was unable to get the boot loader to work but as I don’t use it anyway I didn’t spend much time on this.
One caveat is the procedure ‘delayMicroseconds’ in Arduino will now miscalculate times. If you review wiring.c in the Arduino code it is unaware of sub 8Mhz microcontrollers. This is not a bug, there is no standard Arduino that runs at 4Mhz. To get your timing correct just half the time you would normal use. For 50 baud RTTY the delayMicroseconds is normally about 20000µS but on this board to compensate I use 10000µS. Alternative feel free to hack up wiring.c to make it aware of 4Mhz clock speed.
Anyway proof as they say is in the pudding so I will report back in hopefully more than 13 hours to advise on the run time of this board.
Hey, do you know how this would all fit into arduino 1.6? I need to run my arduino @ 1.8v
Hi David,
Do you mean a genuine Arduino board ?
Anthony
I could be used for Arduino breadboard, I have tried without success, As might do ?, because if I managed to run with 8MHz crystal
To run below 3.3V you need to have at least a 4Mhz or lower crystal and set the fuses accordingly.
So what bootloader/board did you use ? I bought some of those withouth bootloader so im interested in knowing what to use for 4mhz, as i need to input variable voltage 3,2V-1,8V.
I didn’t use a boot loader as I was programming via the ISCP. You only need a boot loader if you’re programming via serial.
Hi Anthony
Sorry, this is a query from your work from a few years back! I’m trying to convert my tracker to 1.8V
When you say you “reprogrammed the fuses in Atmel Studio” did you use the same settings as you talk through in the board file, i.e.
low_fuses = 0xFD
high_fuse = 0xDA
extended_fuses=0xFF
I set the fuses to the above settings in studio 7, but now my avrisp mkii refuses to play ball when programming through the arduino IDE when selecting the pava board
Thanks
Richard
Hi Babs,
Yes however i used an external 16MHz crystal with the DIV/8 bit set so frequency was 2MHz @ 1.8V
Cheers