Battery powerd Arduino on breadboard, running on 3.3v

Hi everyone,

My mission is to build an Arduino Uno on a breadboard/protoboard, powered by batteries. Currently "my shopping list" is:

  • ATMEGA 328 with Arduino UNO bootloader
    and 2 x 22pf load capacitors
    and 16Mhz through hole crystal for "stock" Arduino speed
  • 3V regulator MCP1700
    and 3 x 1uf capacitors
    Output Voltage Fixed: 3.3V
    Input Voltage Max: 6V, Input Voltage Min: 3.5V
  • 4 rechargeable AA batteries in box (4 x 1.2v = 4.8v)

The Arduino should drive:

  • Roving Networks RN-XV wifi module
    Input power between 3.0V and 3.7V (3.3V + or - 10%)
    Uses 40mA when connected and 180mA when transmitting data
  • DS18B20 digital thermometer (sensor)
    Input power between 3.0V and 5.5V

I have some doubts/uncertainties about the following:

  • Is a good idea to run the Arduino on 3.3V? (I thought so since my wifi module also runs on 3.3V)
  • When running the Arduino on 3.3V, can I run it on 16Mhz? (I hope so, otherwise I'll need another crystal and change the bootloader)
  • Is the MCP1700 a good choice as a regulator? (the Arduino should be "low power" and sleeping most of the time, so I don't want to waste battery life on the regulator)
  • Am I missing something? Would you advice another approach?

Thanks a lot!
J

Hi,

jtlns:

  • Is a good idea to run the Arduino on 3.3V? (I thought so since my wifi module also runs on 3.3V)

Won't hurt anything.

  • When running the Arduino on 3.3V, can I run it on 16Mhz? (I hope so, otherwise I'll need another crystal and change the bootloader)

Technically, no. Practically, probably.

3.3V / 16MHz is outside the processor's specifications. However, many people run the processor at that point without problems. There are Arduino compatible boards available that run at that point.

If you're building something that has to be guaranteed reliable, pick a different point (higher voltage or lower clock frequency). Otherwise you'll be fine.

Someone else will have to help with the rest.

i'm trying to do essentially the same thing, with little success.

the atmega328p i have on my breadboard i can burn an uno/pro-mini bootloader (3.3v/8mhz internal) to no problem, however it won't do anything without a crystal - it won't upload a sketch or run from 3.3v, like the bootloader/fuses haven't actually burned.

how do i get rid of the need for a crystal? at the moment i've only got 16/20mhz crystals. if i buy an 8mhz crystal will i be able to use it to reprogram the 328 to not need a crystal in future? i assume my 328's must have had the uno bootloader installed or somesuch.

i'm confused as i seem to be getting pretty random results, one minute its "programmer not responding", then its "cannot find device usb", then it burns a bootloader ok but gets timeouts when trying to upload a sketch.....

i've tried a cp102a (with dtr pin) and a mega2560 as an isp, whilst i wait for my avrisp to arrive.

Try looking at the early Lilypad or Arduoino NG bootloaders - they used internal oscillator, not external crystal.

Or, define a new board type in boards.txt and pick fuse settings that have the clock speeds you want to use.

it seems the boards.txt from Breadboard.zip in the tutorial is completely wrong!

i edited it to include the "arduino:" bit in the paths, so now its mostly the same as the pro-mini:

atmega328bb.name=ATmega328 on a breadboard (3.3v, 8 MHz internal clock)

#atmega328bb.upload.protocol=stk500
atmega328bb.upload.protocol=arduino
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=38400

atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xD8
atmega328bb.bootloader.extended_fuses=0x05
atmega328bb.bootloader.path=arduino:atmega
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F

atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino:arduino
atmega328bb.build.variant=arduino:standard

so i've burned the bootloader/fuses using that and can remove the crystal/caps and it runs ok from 3.3v (i think the speed is correct, timing the blinks looks about 1.3secs) but i still can't reprogram it!

not sure what's going on there, i guess the serial speeds are wrong for 8mhz, but then arduinoisp is spi not serial and that doesn't work either.......?

ok now i've found that once i've burned the bootloader with the crystal/caps in place using arduinoisp, i can remove the crystal/caps and upload sketches using my cp102a (but not arduinoisp).

now blink seems to be taking 2secs to turn the led on/off, so i think the clock is still not right somehow, serial comms example at 9600 baud seems to work fine though.

Hi Sej

I have done similar but I have been using lower clock speeds. Have you taken a look at nicks website? http://www.gammon.com.au/forum/?id=11637 scroll down to alternate clock source. I am running my 328p as a lilypad which allows for the lower clock speed and also runs nice at 3.3v. I too had issues with crystals at first.

yeah i had a look at gammon's page, i couldn't get his board detector or programmer sketch to work, so didn't try his pin9 clock trick.

i have finally managed to get things working (somehow!) and got my 3.3v 8mhz boarduino talking over RF24 to my mega2560 (including 57600baud serial console) i still can't program using arduinoisp or flash a bootloader using the cp2102, but in as long as i can do one thing with each it will do for now.

it seems a lot of people recommend using the pro-mini for 8mhz, but its fuses aren't set to use the internal oscillator, the same it seems for lilypad:

lilypad328.bootloader.low_fuses=0xFF

i think that means use an 8mhz external crystal, whereas the following means use the internal oscillator:

atmega328bb.bootloader.low_fuses=0xE2