Pages: [1] 2   Go Down
Author Topic: Atmega 328 standalone  (Read 2450 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello there.

Last week finally got my Arduino board and after few succesfully projects i started to search information of little complicated projects.
So one thing in my mind is Atmega 328 chip standalone after programming it with Arduino board.

Eg. if i make a room temperature measurement with LCD display and i don´t want to use Arduino board in it, how can i setup system like this?
All programming would happen so that i remove the chip from measurement board and attach it to Arduino board.
After programming i swap the chip back to measurement board.
So can i just attach the chip to board after installation, connect Vcc, Gnd and Vref pins and then it is ready to read analog or digital values from programmed pins?
So i don´t need any programming options for that standalone installation.

Tried to search answers over the web but there were allways mentioned resonators, led´s, capasitors etc.

Thanks.
Logged

field road, jupiter creek
Offline Offline
Sr. Member
****
Karma: 3
Posts: 348
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!
I know what you mean!
I just built 2 of these, I'll be building another 12 as soon as the parts arrive, I've added a few bits of my own and call it the "Barnduino"!
http://thetransistor.com/projects/arduino/
That's coz It'll be living in a turkey barn, monitoring water flow sensors.

The circuit diagram pdf is here
http://thetransistor.com/wp-content/uploads/2010/02/Minimalist-Arduino-Rev01-Schematic.pdf

You'll need to get an FTDI cable to program them, but if you are serious about Arduino you'll need 1 or 2 eventually.

Hope that helps!
Logged

Chicago
Offline Offline
Newbie
*
Karma: 2
Posts: 28
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You'll need more hooked up than just power and ground wires. A 16mhz crystal with 18-22pf capacitors (the actual size of the capacitors you'll need depends on the crystal you get) or a 16mhz resonator, which has the capacitors built in. Resonators sacrifice accuracy in the name of having a smaller size and require fewer components. You'll also need a 10k pullup resistor on the reset pin as well.

Here's a link that will show you the minimum components to get the chip going. After that, attach your other circuits to the pins you were using and you're good to go.
http://arduino.cc/en/Main/Standalone
Logged


Mississauga, Ontario, Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 8
iCANhazBLACKhat?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Look at the bottom of this page. It shows you how to do what you're asking.
http://arduino.cc/en/Tutorial/ArduinoToBreadboard
Logged

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 7
Posts: 1545
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Its very easy you just need:
1) A single 16 MHz Crystal oscillator (Note i had really bad experience using the internal Oscillator @ 8MHz )
2) 2, 22pf CAP's and, Finally
3) 1 > 10K Ohm resistor.

Connect the VCC and GND at the both sides of your ATmega 328 (the other side is the AVCC and GND connect them same as the VCC and GnD) and,

Connect the 10 K ohm resistor with the 1st pin i.e. the reset pin and,

connect the Crystal with the 9 and 10 number pins of the ATmega328 directly and from the crystal pins connect the  2, 22 pf caps(1 crystal pin 1 cap) and let the caps pins go in the ground and HERE YOU'RE On! with your own ATmega328 Standalone

IT's Definitely going to work

POWER>> power the circuit from a 3.3v or 5v DC source.

NOTE: you can use the same method with the ATmega168 and ATmega8
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 8
Posts: 1992
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd use the Modern Devices RBBB as the minimal practical circuit for a Standalone 168/328.

http://cdn.shopify.com/s/files/1/0038/9582/files/RBBB_Instructions_06.pdf?1260749296

I'm with NishantPosted, running at 8Mhz on the internal oscillator isn't worth the grief.  Since the new boards (Uno etc) use resonators it seems to lend credence to this slightly simpler & cheaper solution.  The crystal is more accurate but a resonator is good to a few seconds a day. 

Logged


Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6886
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I always suggest this tutorial:
http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard

I've made my standalone with this tutorial:
http://liudr.wordpress.com/2011/01/10/make-an-enclosure-or-face-plate-for-your-arduino-projects/

Pic

Logged


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

Hi and thanks to everybody for the great answers.
I got the point and i really looks simple to make a standalone system, even it requires few components but still.

While waiting my LCD shield i could build up few boards and program controllers ready for the action.

Maybe i´ll have to bother you again when i start to program that LCD shield..  smiley-yell

But i´m really happy that somebody has made this Arduino system.
I was very interested to learn PIC programming but all that stuff with programming languages etc. got me really confused and with Arduino it seems to be quite similar with javascript, which basics i learned in school about year a go.
That really lowered my step to choose Arduino and start to play with that.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6886
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I love arduino too, although I also miss the time when I push CX; or rep movsd; Programming in assembly has its special charms. I am just glad I didn't have to mess with low-level programming on a daily basis when I use arduino.

Regarding the LCD shield, you mean the Phi-1 shield I made? I'm happy to help.
Logged


nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8430
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
although I also miss the time when I push CX; or rep movsd

Feel free to drop into some inline assembler liudr smiley

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Full Member
***
Karma: 8
Posts: 147
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For four bucks you can get this "runtime board":
http://www.nkcelectronics.com/arduino-runtime-board-rev-b.html
Logged

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

Yes, that would be good for ATMega168s, tho it looks like 328s in DIP package are a little scarce at the moment.
The smaller memory size probably not an issue for many, many projects.
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.

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6886
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

For $2.4 you get RBBB (buy 5 together for $2.4 each)  smiley-eek smiley-grin
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I want to program an Atmega 328 that already has a bootloader to use on a breadboard or standalone device, but do not want to swap chips on and off my Arduino, what are my options? I suspect I need some kind of FTDI device, but I'm not sure of exactly what I need.

I've read several different tutorials and have scoured websites that sell FTDI device, but haven't found a simple explanation.
Logged

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

Plop your bootloaded part on a breadboard with 16MHx xtal, two 22pf caps, 10K reset pullup resistor.
Get an FTDI Basic (or equivalent), wire up the Atmega Vcc, Gnd, Rx, Tx, and Reset to the FTDI Vcc, Gnd, Tx, Rx and DTR pins.
Tell the IDE you have a 16 MHz 5V Duemilanova, should be ready to go!
I think there are playground examples that discuss just this.
There are other options as well - such as using the FTDI on your existing Arduino to do the same (if so equipped).
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   Go Up
Jump to: