Go Down

Topic: How to take my Atmel328 Off Arduino Uno and into separate Circuit (Read 2168 times) previous topic - next topic

denno

Hello everyone, I've had to join the forums to ask what I think is a silly question, but I can't for the life of me figure it out myself..

I have a project that I want an Arduino to control (well the Atmega328 chip that is on my Arduino Uno board).

Can I just program the chip whilst it's in the Uno, then take the chip out, give the correct pins power, and have it work as it would if it was in the Uno? I'm pretty certain I couldn't do that, but I can't find any help on how to take an Atmega328 chip, and use it in my project that isn't on an Arduino board. I still want to program it as if it was an Arduino, if that makes sense..

How are Arduino's used in people's projects without leaving a whole development board in there? (Or do they leave the development board there? :/).

I would really like some help understanding this a bit better..

Thanks
Denno

pylon

Quote
Can I just program the chip whilst it's in the Uno, then take the chip out, give the correct pins power, and have it work as it would if it was in the Uno?


Yes, you can. Search on Google for "breadboard arduino". If you do it this way you need a few parts more than just power and the ATmega chip (crystal and some capacitors).

Quote
Or do they leave the development board there?


Most do, yes. The Arduino is not just meant as a development platform, in most cases it's the "production" platform as well. Experienced users may just develop on an Arduino and then, as soon as the project is doing what it should, produce a PCB and solder all the stuff on it. But this is the exception, the default is using the Arduino board for the whole project's lifetime.

holmes4

It depends on what else is on the board, what kind of power supply?. Do you want the 328 to run at 16MHz or will you accept 8MHz. Do you need a reset button?

Mark

denno

Thanks for the quick replies..

Where could I find exactly which crystal and capacitors I would need? Being able to program the chip whilst it's sitting in the Uno board, and then just taking it out after that would be the most simple way I would think, at least until I get a better understanding of how the circuitry works.

I can't leave the Uno in my project, as it'll be too big..

What I'm doing is creating an Advent Calendar for my nephew, and what do all kids love... Things that light up. So I want to use an Arduino to turn on a light which corresponds to the door of the advent calendar that he can open on that day (so 24 lights for 24 days leading up to Christmas). Anyways, I've bought a DS1307 Real Time Clock off eBay (http://www.ebay.com.au/itm/New-Arduino-I2C-RTC-DS1307-AT24C32-Real-Time-Clock-Module-AVR-ARM-PIC-/230755266711?pt=AU_B_I_Electrical_Test_Equipment&hash=item35ba15f097#ht_4179wt_1139), which will keep an accurate time for me. All I need the Arduino to do is turn on the correct LED when the time is right (all of which I can program, the software isn't a problem). So as for having it run on 16MHz or 8MHz, I don't think it would matter too much?

What would I need a reset button for? Would that be as simple as adding a push button to pin 1 of the chip?

Thanks again for the replies

terryking228

Hi Denno,

Maybe you should look at the Arduino schematic diagram. Here's an example on the ArduinoInfo.Info WIKI, but ALL the Arduino schematics are on Arduino.cc  : http://arduino-info.wikispaces.com/file/view/arduino-duemilanove-schematic.jpg

What You Need as a minimum (IF you program the 328 chip on an Arduino board):


  • Stable +5V power supply, with close-to-chip bypass capacitors

  • Oscillator components: Crystal, Resistor, capacitors

  • Reset circuitry for power-on and manual Reset

  • Connections to your actual application external circuits based on the 328 pinout



So this part of the schematic:


Let us know how you make out....
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

denno

Thank you terryking228, I think I understand that a little better now..

You say a stable 5V source.. I'm kinda afraid to ask, but what are batteries considered? Most likely unstable as they loose voltage as they discharge right? Could I fix that with a voltage regulator, and use a combination of batteries that give a higher voltage than 5V?

I can't see where the resistor goes in the part about the oscillator in the diagram?

terryking228

#6
Oct 16, 2012, 08:19 pm Last Edit: Oct 16, 2012, 08:20 pm by terryking228 Reason: 1
Quote
can't see where the resistor goes


Oh.. Hmmmm.  The UNO schematic shows a 1 meg ohm resistor across the crystal:

http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

Anyone have experience with this resistor + or -  ??

"Stable" - batteries are often used.. 4x NiMH gives about 4.8V and many people find this OK. But when they are running down and motors are driven by same batteries, failures occur.  So: Depends on what motors you might be using.

"Real Stable" would be a voltage regulator fed by 7.2 to 9 volts, putting out 5.0V . Like the voltage regulator circuit that is adding lots of components to that Arduino board...
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

dc42


Quote
can't see where the resistor goes


Oh.. Hmmmm.  The UNO schematic shows a 1 meg ohm resistor across the crystal:

http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

Anyone have experience with this resistor + or -  ??


The resistor is not needed, it's built into the mcu, and the atmega328p-based systems I build don't have it.
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.


dc42


Where could I find exactly which crystal and capacitors I would need? Being able to program the chip whilst it's sitting in the Uno board, and then just taking it out after that would be the most simple way I would think, at least until I get a better understanding of how the circuitry works.


Unless you need good frequency accuracy (which you don't, because you are using a RTC) then the simplest solution is to use a 8MHz or 16MHz 3-terminal ceramic resonator, which replaces the crystal and the caps.


What would I need a reset button for? Would that be as simple as adding a push button to pin 1 of the chip?


You don't need a reset button, you can reset the chip if you need to by disconnecting and reconnecting the power.

I recommend including a 6-pin ICSP header in your design, so that you can program the chip in-situ. See http://miscsolutions.wordpress.com/2011/08/09/prototyping-small-embedded-projects-with-arduino/ for more.
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.

denno

Wow, I go to sleep and wake up in the morning with more help that I could have imagined, thanks guys!

I reckon I can work it out now :). I've already purchased a 16MHz crystal off eBay, so I'll just go with that option, and use the capacitors as well.

Thanks again, very reliable forum for quick help :).

Go Up