Pages: [1]   Go Down
Author Topic: Battery powerd Arduino on breadboard, running on 3.3v  (Read 762 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 209
Posts: 13028
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

- 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.

Quote
- 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.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27357
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Code:
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.......?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: September 27, 2013, 07:04:59 am by sej7278 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Code:
lilypad328.bootloader.low_fuses=0xFF

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

Code:
atmega328bb.bootloader.low_fuses=0xE2
« Last Edit: September 27, 2013, 10:44:54 am by sej7278 » Logged

Pages: [1]   Go Up
Jump to: