Questions on making a minimal/custom Arduino circuit @ 3.3v/8Mhz?

Select a 3.3V/8MHZ board type that is comparable to your hardware setup.
Ex:
You have 8 MHz crystal: select 3.3V/8MHz Promini.
You have no crystal, but want 8 MHZ - select Lilypad 00 or Lilypad 01 if the options exist:

LilyPad Arduino 00

The initial design of the Arduino LilyPad had a 10-pin ICSP header and used the internal clock on the ATmega168 rather than an external oscillator.
The bootloader on the initial design is the traditional NG bootloader.

LilyPad Arduino 01

In the first revision of the LilyPad Arduino the 10-pin ICSP header was changed to a 6-pin ICSP header and a four pin header w/ RX, TX, +5V, and GND was added.

Select a 3.3V/8MHZ board type that is comparable to your hardware setup.

Once selected, I should imagine you can flash the chips at 5V, using the UNO or Duemilanove
bd, and then stick into the 3.3V board to run.

2.) Since the battery used will be more or less a 3.3v (under 5.v for sure, since the only space is really a coin cell type of solution... grrrr)... can I get away with NOT using any sort of voltage regulator?.. and having a few polarized caps along the input/power traces?

Two things: there are low-drop-out regulators so for instance a 3.6V Li-ion battery could be regulated to 3.3V

Secondly you probably will have problems running an SDcard off a coin cell, they can take serious amounts of current (up to 200mA for write)
A 328 running at 3.3V and 8MHz is fairly mizerly though, so that will probably be OK.

Riva-

thanks.. sorry I thought I had read it was set to be at external 16Mhz..

Crossroads-

thanks..

so its just like burning a bootloader for a 5v/16Mhz set-up?

oops..post while I was typing---

I dont think I'll be doing any writing.. its to house the audio files only (going to use the PWM Audio lib posted here a while back to play some sounds...the pcb is an ODD shape..and extremely small form factor)

if a regulator can be 'had' great.. SMD of course..
but how many are that smallw ith enough current..

and that brings me back to the batteries you bring up.. something small/flat enough current for an Arduino, 8 x SMD leds (running at 10-15mA tops) but not all on at once.. max would be 5.... and the SD card

thanks!

  • Open IDE, (I use v.23 still..but have 1.0 installed if needed)

**TOOLS >> BOARDS >> **(I see Lilypad Arduino w/Atmega328 & Arduino Pro or Arduino Pro Mini (3.3v / 8Mhz) w/Atmega328)

(about the only thing that would match up...)
**I dont see a Lilypad 00 or 01.. just the Lilypad entry as denoted above)

TOOLS >> BURN BOOTLOADER >> w/ARDUINO AS ISP

QUESTION 1:
Does this mean I can just 'direct connect' with a SD card then? no buffer/logic shifter needed? and no resistor based voltage divider either?

QUESTION 2:
I use an FTDI cable like this one from eBay:
http://www.ebay.com/itm/CP2102-USB-2-0-UART-TTL-6PIN-Module-Serial-Converter-/130683943875?_trksid=p5197.m1992&_trkparms=aid%3D111000%26algo%3DREC.CURRENT%26ao%3D1%26asc%3D14%26meid%3D3810547509716438154%26pid%3D100015%26prg%3D1006%26rk%3D1%26sd%3D130683943875%26

thanks.

when I eventually get to the part where I have a bootloader and I can upload sketches.. do I use the 5v or 3.3v volt pin for FTDI/sketch uploading?

Programming the mcu for 8MHz operation is straightforward. I run all my battery-operated projects at 8MHz to save power, and I program them via ICSP.

The 8MHz internal oscillator is not very accurate. You can calibrate it but it still varies with battery voltage. This is not a problem unless you need accurate timing. If you do, use a 3-terminal ceramic resonator (if 0.5% is accurate enough), then you don't need the 18pF capacitors.

If you are running the mcu from a 3V coin cell, you don't need voltage regulation for the mcu unless you need a stable analog reference.

You can leave out the reset pin pullup resistor, but it will be more sensitive to noise. So keep the wiring to the reset pin as short as possible and not too close to anything that generates noise. Typically you will only have a connection to the ICSP header, so locate the header close to the mcu and you will be OK without the pullup resistor.

If you will be programming the mcu via ICSP then you don' need the DTR cap (or a USB-to-serial converter unless you need it for communication, or a bootloader).

If space is that tight and you don't need so many I/O pins, consider using e.g. attiny85 (8-pin) or attiny84 (14-pin) instead of atmega328p.

xl97:
1.) If the board is running @ 3.3v/8Mhz (like a pro mini or something).. do I need 'any' sort of level/logic converting for the uSD card then? (whether it be an IC or a simple resistor voltage divider..etc)??

2.) Since the battery used will be more or less a 3.3v (under 5.v for sure, since the only space is really a coin cell type of solution... grrrr)... can I get away with NOT using any sort of voltage regulator?.. and having a few polarized caps along the input/power traces?

3.) being a MINIMAL design is a focal point.. what IS the minimal (but still somewhat stable/safe) components needed?
a.) 10k resistor for reset pin
b.) cap for DTR breakout

*since running @ 3.3v/8Mhz.. I wont need a 16Mhz xstal, no 2 x 22pF caps, no vReg??
Im at a loss? any suggestions to help me plan correctly here?

4.) programming a 'blank' Atmel328 (TQFP) chip to run @ 8Mhz internal clock?
I have programmed blank chips before (both dip and smd) using my Arduino 2009 board, with Arduino as ISP..
I have since moved on to using the Optiloader sketch written my Arduino 2009 board.. and flashed the Opiloader bootloader to my custom/assembled boards..etc..
Everything I have done uses 16Mhz external crystal/caps..

but reading, it seems you need to have the crystal/caps installed/set-up (connected to chip) in order to even WRITE a new 3.3v/8Mhz bootloader? (fuses are set at factory to use external 16Mhz clock?).....

So I could also use some clarification on the easiest way to just flash a bootloader (not even sure which one? pro-mini? lilypad?) that runs @ 3.3v and internal 8Mhz clock..

I have no 'AVR' type programmers, just an Arduino and the IDE..etc..

knowing this.. any suggestions in general? (outside of the specific questions I asked)

Thanks!

(1) SD cards run on 3.3 volts. You're golden.
(2) A lithium coin cell direct should work like a champ. No regulator needed.
(3) Use the INTERNAL oscillator option. No crystal or caps needed. You shouldn't need the 10K resistor either.
(4) Programming an AVR... you can setup pin 9 (of an Arduino UNO) as an 8 mhz output and supply the clock that way. Also, new 328P chips come programmed with the INTERNAL 8 mhz oscillator enabled, so you may not need anything. Buy a proto-shield and build yourself an AVRISP board.

Good luck!

A Large coin cell battery has these characterics:
Rated Voltage 3V
Capacity 225mAh

Not going to last very long driving an SD card.

"new 328P chips come programmed with the INTERNAL 8 mhz oscillator enabled,"
is divide by 8 also enabled by default, so it would run at 1 MHz?

Thanks guys..

couple replies to the comments..

the Atmega328p (TQFP) was chosen 'for its look' in this particular situation.. (it was part of a 'prop')

I noticed what chip they used..mentioned what it was used for.. and it spawned the idea to make a pcb for it.. and hence have the (initially only for looks) 328P be functional..and add some effects to the project in the end as well..

since the prop is already created.. and this is more or less a 'retro-fit'.. space is EXTREMELY small.. (and almost all components, but a few leds,. have to go on bottom as well!)

I am hoping to add in both serial and icsp pads for easier flashing.. but only if I can squeeze them in!..

timing (I dont think) is crucial.. (I guess Id have to check on the PWM Audio library I plan to use?). so 8Mhz without caps/crystal sounds right/perfect!...

And not having to use a regulator also helps on saving 'space/components'..

I 'do' however want a stable power source input for the chip though..

and what is this 'stale reference' for analog comment mean? can you explain a bit more please?

also wont breaking out/having both the rest pin and a dtr pad help in flashing both bootloader AND when uploading a sketch? (since there wont be any reset button to 'time' the uploading of a sketch on auto-reset?)

also Im not sure what this means? (although it was aimed at me)

"new 328P chips come programmed with the INTERNAL 8 mhz oscillator enabled,"
is divide by 8 also enabled by default, so it would run at 1 MHz?

thanks!

CrossRoads:
A Large coin cell battery has these characterics:
Rated Voltage 3V
Capacity 225mAh

Not going to last very long driving an SD card.

"new 328P chips come programmed with the INTERNAL 8 mhz oscillator enabled,"
is divide by 8 also enabled by default, so it would run at 1 MHz?

Lithium coin cells are usually 3.6 volts, not 3.0.

And a question: Does an SD card ALWAYS draw "full" current (even when chip select is not asserted)?

I would think you would select the SD card, read or write the data, then put it back to sleep.

There's no reason I can think of for any flash memory card to ALWAYS draw full current.

xl97:
and what is this 'stale reference' for analog comment mean? can you explain a bit more please?

The 328P has a built in regulated 1.1 volt reference for the A/D converter. It will be 1.1 volts regardless of VDD.

If you use a plain 3.6 volt coin cell and select the internal reference, it will work... no regulator needed (and besides, any regulator just wastes the excess power as heat... even switchers).

What other IO is needed?

minimal_twfp_uSD_layout.png

Hi Robert-

outside of some I/O pins for some basic smd leds......and some buttons input to make those leds do something..... I dont think any (but I'll have to review to be sure) :slight_smile:

your schematic looks similar to mine (I'll post when I get to work)..

but mine is missing the cap on the SD socket.. and I didnt do anything with AREF yet.. just using a cap and tying to GND is ok?
(I dont need to tie that to any voltage reference point? (ie: the 3.3v line at all?)

Lastly... (caps).. still a bit confused on these..

from the schematic,...it looks like ALL the caps used are polarized ones?? (or am I reading the symbol wrong?.. I dont see any +/- on the cap symbols anywhere?)

I thought the CAPACITOR symbol that had two STRAIGHT lines.. meant a regular old cap.. and a CAPACTOR symbol that had stiaght line and 1 rounded line.. was signifying a POLARIZED cap?

is this true? (or am I under the wrong impression?)

in this case.. then ALL caps used her should be polarized?

thanks!..

Oh and Robert.. the pcb design/layout is appreciated.. but when I show you the space and size (shape) of the PCB.. you'll probably just laugh at me! lol

thanks again!

we'll post when I get to work..and open things up again.

Despite what the symbol is, caps less than 1 uF are typically unpolarized, and >= 1 uF
are typically polarized.

what IS the minimal (but still somewhat stable/safe) components needed?

A minimum implementation would include just the chip itself.

A reasonable minimum implementation would have a decoupling cap, a crystal + two caps, or a decoupling network on the analog supply. And then more from there, based on your needs.

I have done many "chip-only" minimum implementations myself.

hi..
thanks for the reply..

this can not (should not) be a chip by itself project... IMHO..

I mean I need it to be small.. but I want it to work and be somewhat stable! lol

Since it will be running @ 3.3v & INTERNAL 8Mhz clock... I dont need the caps/crystal.......correct?

RESET pin broken out (for easier flashing/uploading)
DTR pin broken out (for easier flashing/uploading)

AREF pin (correctly set-up... I see in the schematic Crossroads posted.. he has the AREF pin connected to GND through a cap... but I do NOT need to connect to the 3.3v for a voltage refeence? Just keep it INTENRAL reference at the 1.1v or whatever?)

and of course I want to ensure that I 'correctly' set-up the battery/power input..

since there will NOT be any voltage regulator (battery supply will be within the 3-3.7v range max).. but I want it to be stable..no ripples.

follow same principles or ceramic/polarized cap on the input power lines?

@ oric_dan(333)

Despite what the symbol is, caps less than 1 uF are typically unpolarized, and >= 1 uF
are typically polarized.

thanks!.. rules like this help a noob like me.

I am still wrestling with 'decoupling'.. and 'KNOWING' when to use a certain component or not (like when to use ceramic vs polarized..etc)

hopefully I can get to a more final version tonight/tomorrow.. and I'll post for review..

appreciate all the discussion guys!

thanks! :slight_smile:

The little ceramic decoupling caps are not polarized. Example:

Rule of thumb/general guidance: 0.1uF cap on every Vcc/Avcc pin on every part located as nearby as possible.

Aref - needs a 0.1uF cap to Gnd if you are using the internal references
See 2.2:

AtmelAVR042 AVR Design Considerations.pdf (236 KB)

Lithium coin cells are usually 3.6 volts, not 3.0.

that's wrong. You can find Li-ion coin cells with a "nominal" 3.6V or 3.7V, but the vast majority of non-rechargable Li coin cells are 3.0V 404 - Duracell Batteries | AA, AAA, Rechargeable, Coin Button

this can not (should not) be a chip by itself project... IMHO..

I mean I need it to be small.. but I want it to work and be somewhat stable! lol

The chip-only implement will work and will be very stable.

update: well.. i got things up and running with a minimal/breadboard Arduino using +3.3v @ 8MHz internal clock

to be clear order of things (for me) were:

1.) hook up my Arduino Duemilanove 2009 board to USB
2.) Open IDE (I used v.23)
3.) Tools >>> Board >> (Duemilanove 2009)
4.) Tools >>> Serial Port (select port your above Arduino is connected to)
5.) File >>> Examples >>> ArduinoISP.. (upload this sketch to your Arduino board.
6.) Disconnect.. from USB
7.) Connect a 100-120 ohm resistor between RESET & +5v (to disable auto-reset on the MAIN board)
8.) Connect your target board (minimal +3.3v/8Mhz internal clock) to the MAIN Arduino above.

Wiring Pnout:
Arduino board pin >>> Target board pin
D10 >>>> RESET
D11 >>>> D11
D12 >>>> D12
D13 >>>> D13
GND >>>> GND
+3.3v >>>> VIN on breadboard...

9.) Reconnect MAIN Arduino board to USB.
10.) Open IDE (I used v.23)
11.) Tools >>> Board >> (Breadboard 3.3v with Internal 8MHz clock)
12.) Tools >>> Serial Port (select port your above Arduino is connected to)
13.) Tools >>> Burn Bootloader >> w/Arduino as ISP

(bootloaded and can upload sketches all day...)..

two things I noticed though...

1.) Does NOT work with Aruino IDE 1.0+ out of the box...not sure exactly how to make it work yet either.

From reading around, it seems to have something to do with:
a.) editing/adding pin_arduino.h or Arduino.h files to somewhere.
b.) edit the breadboard 'boards.txt' file.. and add a line at the end?

(not to sure.. a bit above my comfort level messign with boards.txt and stuff)

this is just specific to my project.. not about the minimal Arduino part..


2.) and the MAIN problem I need to overcome.. I cant seem to communicate/initialize an SD card???
Using an Arduino @ 16MHz (external crystal) & +5v... I have never had a problem.. with voltage divider or level shifter..or shield...

having the Arduino with +3.3v logic and INTENRAL 8MHz clock doesnt seem to work.. and I 'thought' I would be able to directly connect/communicate to it? (no voltage divider, no level shifter..etc)

been searching around.. and havent found much on using 3.3v8MHz internal clock -with- SD card..

anyone done this? (so I know Im not spinning my wheels?)

Lets see the schematic you said you'd post back in #15 & #18, and your sketch.

How'd you bootload it?