Pages: 1 [2]   Go Down
Author Topic: Help making bare minimum standalone arduino.  (Read 6457 times)
0 Members and 1 Guest are viewing this topic.
SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6805
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does this help any (click through to get a readable version)



Eventually, there's supposed to be a bunch of explanatory text to go with this.

This *is* the Freeduino v1.19 schematic, just rearranged into "boxes."
The "bare minimum" is the stuff inside the pink box.  Add the other boxes "as needed."
(This is a diecimila-era schematic.  For duemilanove, the "power select" box gets more complicated.
For Uno, the "USB/Serial Converter" changes.  But it stays basically the same.
Logged

0
Offline Offline
Full Member
***
Karma: 2
Posts: 100
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for all the input, very helpful.

One thing I noticed though is on many of the rather minimal arduinos, people are hooking them up similar to my schematic (which I'm not 100% sure is right).  http://img191.imageshack.us/i/arduinoschematic.jpg/ , however they are also applying voltage to the AREF pin, sometimes direct, and sometimes through a resistor.  Is this necessary or not?  I've never used the aref pin on my duemilanove for anything.

Also, some are not using a pull resistor on pin 1 reset, and others are. Is the resistor pretty important, or not really?

And I don't get why, if the voltage regulator can by made with just the chip and 2 capacitors, why is the rbbb kit (and others) using 3 capacitors, and a diode? (plus an led, but I understand the point of that).

All the info just varies so greatly from different sources.

I hate asking so many questions, but I'm just baffled by how hard of a time I've been having finding this basic info.  I've searched for "minimal", "standalone", " bare minimum", and others, and read at least 50 pages of so called minimum arduinos, and none of them are minimum.  They all have tons of extra parts for programming, and generally are pretty full fledged programmable arduinos.  I mean, thats good for a diy arduino that you can work on, and those are very cool. But if you already have a working project with all the bugs worked out, then it shouldn't need any extra programming.  If you want to make it permanent, or make multiple permanent copies of it to give to family, or other situations like that  then there is no point in wasting time and components, using anything more than the bare minimum components, and minimum connections.  Seems like something 95% of the arduino users would want to do this. Make permanent minimal installations of successful projects. Yet info such as a simple accurate schematic of the bare minimum for a stable working chip, without anything extra, has been near impossible to find.
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 54
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote from: carl1864
http://img191.imageshack.us/i/arduinoschematic.jpg/ , however they are also applying voltage to the AREF pin, sometimes direct, and sometimes through a resistor.  Is this necessary or not?  I've never used the aref pin on my duemilanove for anything.]
It is only necessary when you are going to be using analog in. It's the Analog REFerence pin. I don't know much about it but I don't use it either. Unless you know your going to use it just don't hook anything to that pin.

Quote from: carl1864
Also, some are not using a pull resistor on pin 1 reset, and others are. Is the resistor pretty important, or not really?]
If you use a switch to reset the chip then yes it is very important to make it work. If you are only unplugging/plugging power to it (or using an on/off switch) then all you need to do is wire reset to +.

The way the reset works is like this: The resistor ties reset to +. If the pin goes low (or rather has - charge instead) then it will reset the chip. When you press the reset button, the resistor stops the flow of + to reset, and - flows, thus resetting the chip.

If you do NOT wire the pin at all, then that reset pin is floating. In other words, you may be ok, but you may not. If the pin floats and get's interference of any type then it may just start resetting itself constantly.

Quote from: carl1864
And I don't get why, if the voltage regulator can by made with just the chip and 2 capacitors, why is the rbbb kit (and others) using 3 capacitors, and a diode? (plus an led, but I understand the point of that).]
The two capacitors are needed if you are going to use a voltage regulator as opposed to usb power. The diode is to ensure you don't burn your chip by connecting ground and VCC backwards.*thanks to WestFW for the info*

Quote from: carl1864
All the info just varies so greatly from different sources.

I hate asking so many questions, but I'm just baffled by how hard of a time I've been having finding this basic info.  I've searched for "minimal", "standalone", " bare minimum", and others, and read at least 50 pages of so called minimum arduinos, and none of them are minimum.  They all have tons of extra parts for programming, and generally are pretty full fledged programmable arduinos.  I mean, thats good for a diy arduino that you can work on, and those are very cool. But if you already have a working project with all the bugs worked out, then it shouldn't need any extra programming.  If you want to make it permanent, or make multiple permanent copies of it to give to family, or other situations like that  then there is no point in wasting time and components, using anything more than the bare minimum components, and minimum connections.  Seems like something 95% of the arduino users would want to do this. Make permanent minimal installations of successful projects. Yet info such as a simple accurate schematic of the bare minimum for a stable working chip, without anything extra, has been near impossible to find.

I see what you mean, and I have been there. Don't need the regulator if you are running on usb as it's regulated already, you do need the capacitors and diodes, you don't need the crystal, you don't need an led, you do need a means to connect the chip to flash the firmware, but if you have another arduino, or have an icsp programmer (also these are easily makable with a serial port and a few odds and ends) to flash the application to the chip then just do it on a breadboard before you solder.

That's pretty much it. All you need is an Atmega chip, a usb power connection, two capacitors, a diode, a power switch, 6 wires to connect these (and 1 for + to reset) and Voila! smiley

As soon as I get home, I will make a simple schematic in fritzing that will help you tremendously as to what parts do what, and why or why you would not need them smiley

Till then, lemme throw you a schematic of my chip I am setting up right now. The Atmega32L


FYI THIS schematic is adaptable if you download the fritzing file (from here: http://fritzing.org/projects/the-atmega32l-programming-the-beast/so you can see which pins on the atmega32 are what so you can adapt to those pins on the Atmega328.
Things you can leave out of my schematic though: the breadboard with the 3 leds(and all connecting pieces on that breadboard), and the two ceramic capacitors and the crystal.
« Last Edit: February 20, 2011, 11:11:24 am by hexskrew » Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6805
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
you don't have to power the AVcc and ground, just the one side Vcc and ground.
This is WRONG.  If a chip has multiple ground and power pins, they should ALL be connected to the appropriate supply rails.  Otherwise you get (by definition) undefined behavior.  Some things may work, others may not.  There may or may not be an internal connection on the chip that is sufficiently low-resistance to insure proper operation of the other parts of the chip...

The diode prevents you from destroying the chip if you happen to plug in a wall-wart with the wrong polarity.
The capacitors each serve slightly different purposes; they may or may not make each other unnecessary.  The regulator should have input and output caps (already discussed), and the AVR should have a "bypass cap" for each power pin.  (missing bypass caps were one of the problems I noticed in your schematic.)

Personally, I think it's about time to get rid of the generic wall-wart jack and regulator, in favor of a USB connector, even if only for power.  There are enough USB-like power supplies that put out a a nice regulated 5V that putting up with "random" seems ... unnecessary.

AREF is not connected on the official Arduino boards; it need not be connected on a "minimal" system either.

One reason that you're having trouble finding consensus on "bare minimum" is that a lot of people aren't going to consider a few resistors and caps (costing less than $0.01 each in bulk, and probably lying around in my "junk drawer") as "real components" in the sense of adding cost or complexity to a design.  The voltage regulator is another open issue; I just said I thought it was no longer needed, but it is surely important (and needs its associated components) if you need to operate the resulting circuit from an over 5V supply...
Logged

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

I was recently working on this type of thing as well.  Two things I had trouble with -

1)  I burnt the bootloader on the new chip using another arduino.  When doing this don't forget to disable by putting a 120 ohm resistor between 5v and reset on the arduino doing the burning.

2)  I never was able to upload a sketch onto my breadboarded arduino.  I resorted to programming it in an arduino and then popping it out and putting it in my breadboard rig.  Works but not very elegant.
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

buying an FTDI cable..or better yet just making your own from a hacked cell phone data cable worked for me when trying to upload sketches to my breadboard Arduino circuit.

used my 'real' Arduino to flash any/all blank Atmel chips with bootloader..

then used hack data cable to upload all sketches.


the only 'con' I found is that on my data cables..I could not find a reset pad to have the chip reset automatically.

I had/have to time pushing the mom button to reset it and take the sketch.. works everytime though.
Logged


Offline Offline
Jr. Member
**
Karma: 1
Posts: 54
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
you don't have to power the AVcc and ground, just the one side Vcc and ground.
This is WRONG.  If a chip has multiple ground and power pins, they should ALL be connected to the appropriate supply rails.  Otherwise you get (by definition) undefined behavior.  Some things may work, others may not.  There may or may not be an internal connection on the chip that is sufficiently low-resistance to insure proper operation of the other parts of the chip...

The diode prevents you from destroying the chip if you happen to plug in a wall-wart with the wrong polarity.
The capacitors each serve slightly different purposes; they may or may not make each other unnecessary.  The regulator should have input and output caps (already discussed), and the AVR should have a "bypass cap" for each power pin.  (missing bypass caps were one of the problems I noticed in your schematic.)


Thanks WestFW. Noted and I changed it in the above text (schematic to come later) just in case someone stumbles upon it and doesn't read the rest of the thread.

Honestly, I didn't know what diodes do. I thought the regulator would prevent this... I am still a newbie but on the fast track I guess you could say. I honestly didn't know that the regulator had to have caps, just knew that they were there to normalize the voltage.

I wanted to ask what of these bypass caps you speak of? I never saw them on other's schematics, but I wanna make sure I am right in doing what I do and chiming in on occasions like this. I'd feel terrible if someone burnt their chips cause of me.

On the wall wart plug, I thought usb voltage by ieee standards was 9v, not 5v? ZOMG this is something I should have known :X (no really... I should know this) Well then, any usb adapter would prove perfectly sufficient for this application then... And as well, that also means I bought that 5v regulator for nothing smiley-razz Oh well. part in the bucket!
« Last Edit: February 20, 2011, 11:13:44 am by hexskrew » Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6805
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
what of these bypass caps you speak of? I never saw them on other's schematics
These are usually 100nF caps connected between V+ and GND  "near" the actual chips.  Usually at least one per "large" chip, and frequently one per supply pin.  In the "modular schematic" I posted, it would be C1 and C11, I think (grumble flickr not saving full-sized images.)

One of the characteristics of a real "minimal" system is that some of the safety precautions (like the diode) are going to be omitted (but for a "bare bones" PRODUCT you might put them back in.)  And it is a virtual certainty that someone building a minimal circuit is more likely to fry one of the chips than someone with a pre-built unit.  Risk vs Benefit...

Are you going for minimal space, minimal complexity, or minimal cost?  Cost-wise, the big factors are the AVR itself ($4-6), the FTDI chip (also $4-5), the PCB (~$5), the connectors (~$2), and the regulator (~$1)...
« Last Edit: February 20, 2011, 06:37:38 pm by westfw » Logged

Pages: 1 [2]   Go Up
Jump to: