1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

basic atmega328 circuit (without programmin/serial functionalities)

Discussion in 'Arduino' started by snaggy, Jun 9, 2010.

  1. snaggy

    snaggy New Member

    Joined:
    May 31, 2010
    Messages:
    8
    Likes:
    0
    I need to create a few cheap atmenga328 based circuits. These circuits I design and develop on the arduino 2009 board, but then when in production I don't want to waste the arduino board, so could you point me to a simple schematics that lists the bare minimum to make the microcontroller (previously programmed on the arduino board) work?

    I guess it should include oscillator, a few caps.. ?
    thanks!
     
  2. iard

    iard New Member

    Joined:
    Jan 23, 2009
    Messages:
    4
    Likes:
    0
    Location:
    Romania
    You're right, if you don't want ISP, serial and the LEDs on digital pin 13 (PB5), power, Rx and Tx your circuit will need just this:
    - ATmega 328 (168 or even ATmega 8 are fine, depending on how big is your firmware)
    - 16Mhz quartz attached to XTAL1 (PB6) and XTAL2 (PB7)
    - 2 x 22pF ceramic capacitors for the quartz.
    A small bypass capacitor (0.1uF) between the power source and ground is always a good idea.
    Make sure you have a regulated 5V power supply.
    A push button between Reset and ground and a pull-up resistor (10K) between Reset and VCC.
    If you have even the simplest ISP programmer you can add a standard ISP 6 pin header.

    Good luck!
     
  3. Sceadwian

    Sceadwian Banned

    Joined:
    Oct 27, 2006
    Messages:
    14,047
    Likes:
    141
    Location:
    Rochester, US
    In relation to your circuit once programmed you have only to look at the Arduino schematics. You'll have to replicate everything from the I/O pin(s) in question to the outside world, this includes the voltage regulator and any other Arduino specific devices which you may be using.
     
    Last edited: Jun 11, 2010
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Norlin

    Norlin New Member

    Joined:
    May 9, 2007
    Messages:
    245
    Likes:
    3
    Location:
    Lawrenceville, NJ

    You could use even less components if your application isn't timing critical by using the internal oscillator (8MHz). This would allow you to eliminate the need for the external crystal and two small capacitors.
     
  6. iard

    iard New Member

    Joined:
    Jan 23, 2009
    Messages:
    4
    Likes:
    0
    Location:
    Romania
    I believe that most (if not all) of the Arduino libraries assume you are running at 16 MHz. For instance, if he's using I/O shield for serial communications or the Ethernet shield and the chips were programmed, as he said, on the Arduino board, even if his own application is not time critical, the libraries would not perform as expected.
     
  7. mayhem2408

    mayhem2408 New Member

    Joined:
    Jul 20, 2010
    Messages:
    2
    Likes:
    0
    Simply add #define F_CPU 8000000 into your sketch code and when it is compiled, all timed routines will be calculated on 8MHz.


    Also, if timing is not ultra critical but you still will high speed without modifying the F_CPU, you can use a 16MHz 3 pin ceramic resonator. This takes the place of the crystal and 2 caps. The timing is still usually accurate enough to run 9600 serial communications. Anything faster than that and the timing is usually to far out.
     
    Last edited: Jul 20, 2010
  8. cr0sh

    cr0sh Member

    Joined:
    Jul 10, 2010
    Messages:
    928
    Likes:
    17
    Location:
    Phoenix, Arizona
    Also - lookup "standalone arduino"; this is the common term for what you want to do. BTW - it might be cheaper and quicker to go this route: Arduino Forum - $10 Arduino
     
    Last edited: Jul 23, 2010

Share This Page