Pages: [1] 2 3   Go Down
Author Topic: Questions on making a minimal/custom Arduino circuit @ 3.3v/8Mhz?  (Read 2739 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1235
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hey gang.. title says it all.. smiley

I have never created/designed a Arduino circuit/board that runs on 3.3v @ 8Mhz before..

I currently have a fun project/challenge that calls for one.. but I want to make sure I understand everything I have read over the months on this subject.. to ensure I havent skipped anything.. or have any unexpected surprises...etc

FACTS:
This custom design/pcb will have uSD socket on it..
Board needs to have minimal design components (space is a HUGE obstacle here), but till somewhat stable
Board will run @ 3.3v
Board will run @ 8Mhz internal clock
Battery solution I 'believe' is a very small coin cell (exact choice hasnt been finalized yet)



QUESTIONS:

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


the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 158
Posts: 2888
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want to see a minimalist Arduino ckt, running at 3.3V, check out the schematics
for the JeeNode. You can replace the RF module with your SD card.

http://jeelabs.com/products/jeenode

You can flash bootloaders using the ICSP header, or SCK,MISO,MOSI pins, of any Arduino
board connected to your protoboard, although both boards should probably be running
at 3.3V. Check the main Arduino website.
Logged

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1235
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hmm.. I have read (several times I thought) about problem with buring bootloader for 3.3v @ 8Mhz on factory/blank chips?  as they are set to run at 16Mhz external clock?  so you need to have caps/crystal connected "FIRST"..  then burn the 3.3v/8Mhz bootloader of choice?


is this NOT the case your saying?


(I have flashed all my chips/boards using the ISP headers and Arduino IDE..like I mentioned... but never done anything with 3.3v boards or running anything @ 8Mhz... so I wanted some clear advice..)

To clarify.. your saying that my Arduino 2009 board than I use to flash bootloaders to OTHER blank chips, needs to somehow run @ 3.3v now? in order to burn the target (3.3v/8Mhz) bootloader of choice to the blank chip?


thanks for link to jeenode.. (looking at it now)
Logged


Norfolk UK
Offline Offline
Edison Member
*
Karma: 66
Posts: 2474
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
hmm.. I have read (several times I thought) about problem with buring bootloader for 3.3v @ 8Mhz on factory/blank chips?  as they are set to run at 16Mhz external clock?  so you need to have caps/crystal connected "FIRST"..  then burn the 3.3v/8Mhz bootloader of choice?
The default factory fuse settings are to use internal oscillator.
Logged

There is no such thing as a stupid question but there are a lot of inquisitive idiots.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 524
Posts: 26442
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

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.



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.

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 158
Posts: 2888
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11694
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

[ I won't respond to messages, use the forum please ]

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1235
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: November 29, 2012, 08:06:00 pm by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Worst state in America
Offline Offline
God Member
*****
Karma: 32
Posts: 792
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 524
Posts: 26442
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

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

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1235
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)

Quote
"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!


Logged


Worst state in America
Offline Offline
God Member
*****
Karma: 32
Posts: 792
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Worst state in America
Offline Offline
God Member
*****
Karma: 32
Posts: 792
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 524
Posts: 26442
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

What other IO is needed?


* minimal_twfp_uSD.png (16.95 KB, 1095x553 - viewed 49 times.)

* minimal_twfp_uSD_layout.png (12.22 KB, 608x320 - viewed 42 times.)
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.

Pages: [1] 2 3   Go Up
Jump to: