Atmel AVR Microcontroller discussion group.
Re: [AVR club] AVR Right for newbie hobbyist? - badpacket94501 - Feb 11 2:08:00 2003
Sorry, thought I'd re-use this thread.
I am looking at this site as recommended by a poster here:
http://www.futurlec.com/ATDevBoard.html
I am primarily looking to make a device to interface with standard pH
probes and such. Would this work in place of the stk-500 for now?
In other words, would these be useable for much, ie. are they even
moderately exapndable?
Thanks from a newbie.

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] AVR Right for newbie hobbyist? - Patrick A. Timlin - Feb 11 12:30:00 2003
--- "badpacket94501 <badpacket94501@badp...>" wrote:
> I am looking at this site as recommended by a poster here:
> http://www.futurlec.com/ATDevBoard.html
>
> I am primarily looking to make a device to interface with standard pH
> probes and such. Would this work in place of the stk-500 for now?
Ya looks fine if all you want to play around with is the AT90S2313 chip. Keep
in mind that the '2313 chip is likely to be obsoleted in the next year or so.
However rumor has it there might be a tiny2313 chip coming out that will
likely be pin for pin compatible and be usable in this board.
> In other words, would these be useable for much, ie. are they even
> moderately exapndable?
It definetly would be usable for learning and doing a fair amount of stuff.
It looks like it has a little area for adding your own components, but most
likely you would have to build your circuit on a seperate board and cable
over to this developement board. But you kind of have to do that as well on
the STK-500 for experiementing with some stuff.
If you want something cheap, very simple and LOT of prototyping area, you
might look into the Olimex AVR developement boards. Go to...
http://www.olimex.com/dev/index.html
click on AVR from the left menu, then click on AVR-P20B (second one down).
From their price list (on a different page of the site) the complete board
(as shown in the photo will all components in place) is only $13.95 USD. And
the raw board (you get the parts yourself and solder it together) is only
$7US. You will need to provide your own AT90S2313 chip (for either case) and
you will probably have to either buy or make a simply cable to hook between
the computer and this board to program the chip. They sell a programming
cable for your serial port for $7US or you can make your own. The schematic
is posted on their web site if you want to make it.
=====
Patrick Timlin ptimlin@ptim...
http://www.geocities.com/ptimlin/
__________________________________________________
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] AVR Right for newbie hobbyist? - badpacket94501 - Feb 11 21:52:00 2003
Patrick,
Thanks loads for that link.
I will probably get the AVR-MT or IO.
BTW, I see you are also into aquaria, cool, I'm a reefer. Guess why I
want to set up a little micro-controller :)
How hard would it be to set up one of these little kits on a bread
board for messing around with? Any way to take one of the ones
meniotned, and somehow hook it up to a bread board?
Thanks again.
--- In avrclub@avrc..., "Patrick A. Timlin" <ptimlin@y...>
wrote:
> --- "badpacket94501 <badpacket94501@y...>" wrote:
> > I am looking at this site as recommended by a poster here:
> > http://www.futurlec.com/ATDevBoard.html
> >
> > I am primarily looking to make a device to interface with
standard pH
> > probes and such. Would this work in place of the stk-500 for now?
>
> Ya looks fine if all you want to play around with is the AT90S2313
chip. Keep
> in mind that the '2313 chip is likely to be obsoleted in the next
year or so.
> However rumor has it there might be a tiny2313 chip coming out that
will
> likely be pin for pin compatible and be usable in this board.
> > In other words, would these be useable for much, ie. are they
even
> > moderately exapndable?
>
> It definetly would be usable for learning and doing a fair amount
of stuff.
> It looks like it has a little area for adding your own components,
but most
> likely you would have to build your circuit on a seperate board and
cable
> over to this developement board. But you kind of have to do that as
well on
> the STK-500 for experiementing with some stuff.
>
> If you want something cheap, very simple and LOT of prototyping
area, you
> might look into the Olimex AVR developement boards. Go to...
>
> http://www.olimex.com/dev/index.html
>
> click on AVR from the left menu, then click on AVR-P20B (second one
down).
> From their price list (on a different page of the site) the
complete board
> (as shown in the photo will all components in place) is only $13.95
USD. And
> the raw board (you get the parts yourself and solder it together)
is only
> $7US. You will need to provide your own AT90S2313 chip (for either
case) and
> you will probably have to either buy or make a simply cable to hook
between
> the computer and this board to program the chip. They sell a
programming
> cable for your serial port for $7US or you can make your own. The
schematic
> is posted on their web site if you want to make it.
> =====
> Patrick Timlin ptimlin@y...
> http://www.geocities.com/ptimlin/
>
> __________________________________________________

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] AVR Right for newbie hobbyist? - badpacket94501 - Feb 11 23:10:00 2003
Oh yeah, is TI's MSP430 the new controller on the block now?
Looks pretty darn cool:
http://focus.ti.com/docs/prod/productfolder.jhtml?
genericPartNumber=MSP430F1232
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] AVR Right for newbie hobbyist? - danjmaclean - Feb 12 9:18:00 2003
Flush with Birthday present cash I'm about to take the plunge and
purchase an STK500! But, even after a month of scouring the web and
getting product info from Atmel I still have huge holes of ignorance
that I think need to be filled.
-Flash vs EEPROM vs SRAM. I know EEPROM shouldn't be used as memory
because it has finite read/write cycles. What are they used for? I
read that high level languages like C and BASIC require SRAM. Is
this right? Is SRAM accessed by the programmer, or is this a
compiler function? Why EEPROM AND Flash?
-I've read about bootsraps and startup code, but is this normally
handled by the compiler? If not, where do I find information on it?
-What's a good starter MCU? I downloaded info on the AT90S8535
because it is mentioned frequently, but I think I read somewhere that
it is about to be obsoleted.
-Which is better: Quartz crystal or ceramic resonator?
-Is there a place where AVR interrupts and the watchdog timer are
explained? The AVR pdf isn't doing it for me!
-What's timer prescaling?
-Great, here's another one: "Watchdog prescaling" I'm beginning to
think Atmel is making this stuff up;)
-Anyone know of a good freeware Decimal/Hex/Binary conversion
calculator?
Finally - I'm about to give up on GCC-AVR because there's really no
newbie support. Holy cow! There are a TON of executables and what
are you supposed to do with them all? The Makefile sort of makes
things easier, but even that assumes too much knowledge on the part
of the user. The GCC-AVR mailing list is mostly comprised of people
who already know what they are doing. BASCOM, here I come!

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] AVR Right for newbie hobbyist? - Patrick A. Timlin - Feb 12 11:29:00 2003
--- "danjmaclean <captainvideo@capt...>" <captainvideo@capt...>
wrote:
> Flush with Birthday present cash I'm about to take the plunge and
> purchase an STK500!
You won't be sorry.
> -Flash vs EEPROM vs SRAM. I know EEPROM shouldn't be used as memory
> because it has finite read/write cycles. What are they used for?
Flash is where your program file is stored. Think of it as the ROM of your
chip. SRAM is the RAM area of the chip that your programs can use. SRAM loses
its contents when you lose power to the chip. EEPROM is a non-volatile (data
still present even after cycling power) area you can use to store data.
EEPROM can be used for different things. One is to store parameters or
setting of your device so the next time the user powers it up, those setting
will still be there. For example, you design a robot which has an optional
crane to lift things. In your user menu, say the default is the program
assumes the crane is not present, so those features are not used. But you add
the optional crane. Rather than have the user have to tell the AVR everytime
he uses the robot to enable the crane, that setting would be set in EEPROM so
next time the device is powered up, the new default setting is "crane
installed".
Other uses might be to save data. Say a digital thermometer. Maybe you want
it to not only display the current temperature, but also show you the minimum
and maximum temperatures it has recorded. you might store those in EEPROM
since those values would only be recorded once in a while and wouldn't "wear
out" the EEPROM. Or maybe you have a AVR based thermostat. You might want to
set "alarm" levels where you set absolute maximum and minimum values for
tempertature. Normally the controller keeps the temp at, for example, 76F.
But you have set min/max of 60/90F in case something goes wrong and you need
an alarm to inform you of run away temp. You might want to have these min/max
values saved to EEPROM so they will be there if you lose power or have to
turn the unit off/on.
You can also use EEPROM to store data simply to free up room from the regular
flash for your programs. For example, a large lookup table might be moved to
EEPROM in order to free up those bytes if your code is getting large and you
need every last byte you can get our of your FLASH for your code. The AVR
then could also modify the lookup table as needed (default user setting
changed, unit calibrates itself using lookup table as a starting point, then
rewrites the more accurate data back to the lookup table for the next time,
etc.)
> I read that high level languages like C and BASIC require SRAM. Is
> this right?
It depends on the compiler/language you use, but it is true for some of them.
For example, I use BASCOM which required SRAM. The SRAM is used like RAM in
your computer. You define variables in your code and they need to be stored
somewhere. BASCOM, and others, use the SRAM for this information. This allows
your code to do stuff like arrays and many variables that exceed the basic 32
general use registers all AVR chips have. Before SRAM chips, programs
(usually assembly) used just those 32 registers, so you had to be careful
about how much information you needed to keep at any one time. When SRAM came
around, you now have MORE memory to use. This allowed program like BASCOM to
be created with more freedom to work like any other BASIC program without too
many restrictions on using variables.
> Is SRAM accessed by the programmer, or is this a
> compiler function?
SRAM is simply memory space available to your program to hold data above and
beyond the basic 32 registers. Sometimes your program will use a lot of it,
sometimes just a little, and maybe your program uses none of it. It is like
the 128MB you might have installed on your desktop. It is there if you need
it, but there is no requirement that you have to use it or how much of it you
use at any given time or for any given reason.
> Why EEPROM AND Flash?
Like I said above, Flash is for storing your code and can be thought of as
ROM space. EEPROM is just that, electrically erasable programmable ROM, that
you can use is you want to store anything that needs to be there if power is
removed. Many times, you will not even use this memory and it will just sit
on the chip doing nothing for certain applications. But it is available if
you do need it.
Most of the AVR line, traditionally, flash was written by the programmer and
was not changable by your code. Now their are chips that can "self program".
I haven't really looked into what that is exactly, but I think one use is you
can write a "bootstrap" that can load in code and reprogram itself. I think
this might be more useful for a commercial product that needs a way to update
itself in the field. Maybe the device modems in updated code and then can
rewrite itself with the new code, stuff like that.
> -I've read about bootsraps and startup code, but is this normally
> handled by the compiler? If not, where do I find information on it?
Like I said, I haven't bothered looking into it. My guess is if you are like
me, and just want to learn these chips and do some fun stuff and play around,
you can safely ignore "self programming" and "boot strapping" and just
use
the chips in a traditional way (i.e. write you code, program the chip, the
chip runs your code at power up).
> -What's a good starter MCU? I downloaded info on the AT90S8535
> because it is mentioned frequently, but I think I read somewhere that
> it is about to be obsoleted.
I think most of the "S" line is going obsolete mainly because it is an old
technology with regards to the way it is manufactured. Mega chips and Tiny
chips can be manufactured for much cheaper. Some of the "S" chips have been
ported over to the new manufacturing process so you will find "mega" version
of the old "S" chip. For example, the AT90S8535 can be replaced with the
ATmega8535. Same functions and pin out, but you will find it cheaper to buy
now.
It will be a while before they all go away so for a hobbyist there is nothing
wrong with starting out with some of the S series like the good old '2313.
However, if you are starting out clean, you might as well pick some of the
newer chips to work with. In general, they all work more or less the same,
just different feature sets, so it isn't like you learn one chip, then have
to start all over to switch to another. Once you learn the AVRs, jumping from
chip to chip is a no brainer, except for learning about a new function you
might not have been exposed to (e.g. you learn on the '2313, but it has no
ADC so when you switch to a mega8, everything you learned about the '2313
applies, but now you might need to bone up on how to use the ADC if you need
it).
With that said, if you are starting from scratch and can pick any chips, are
you looking to mainly use DIP packages (thru hole vs. surface mount)? Keep in
mind the STK-500 will come with a couple of chips. Most likely it will come
with an AT90S8515 installed (and already programmed with a test program) and
an additional sample (mine came last summer with a mega163). So you will have
those to play with.
But if you are looking to order additional chips with your STK500, in the
smaller package sizes the tiny26 and the mega8 are two good ones to start
with. For something larger in a 40-pin DIP, the mega16 is a good choice. More
powerful ones are available like the mega32, etc. but they also cost more.
For your needs, I think the two that come with the STK-500 are enough to keep
you busy for a couple months learning and then a handful of chips if you want
to be able to build your own little projects. Like I said in the beginning,
there is nothing wrong with teh old '2313 if you wanted a few of those.
So my advice is get the STK500 and order a few mega8 chips as well and if you
want something else, maybe the tiny26, and you should be all set for a while.
> -Which is better: Quartz crystal or ceramic resonator?
I use crystals only because I have them on hand. Again, for your needs,
probably either will work fine. The nice thing about some resonators is they
come in three pin devices and have the caps built right in, so you only need
the one component. With a crystal, you need the crystal PLUS a couple small
capacitors.
AVRfreaks.com has a nice article about oscillator selection called "Why you
need a clock source - An introduction to choosing and using clock sources.
Colin O'Flynn, February 2002" which can be found at...
http://www.avrfreaks.com/Freaks/Articles/ColinOFlynn/intro.php
> -Is there a place where AVR interrupts and the watchdog timer are
> explained? The AVR pdf isn't doing it for me!
Try the "ACADEMY" & "TOOLS" files at AVRfreaks.com. If you click
on the
Academy tab, the first article listed is called "Basic Interrupts and I/O
an introduction to interrupts and I/O with the AVR.. AVRfreaks.net, October
2002"
I am sure they must have some info on the watchdog around there somewhere as
well.
> -What's timer prescaling?
> -Great, here's another one: "Watchdog prescaling" I'm beginning to
> think Atmel is making this stuff up;)
AVRfreak.com ! <grin
> Finally - I'm about to give up on GCC-AVR because there's really no
> newbie support. Holy cow! There are a TON of executables and what
> are you supposed to do with them all? The Makefile sort of makes
> things easier, but even that assumes too much knowledge on the part
> of the user. The GCC-AVR mailing list is mostly comprised of people
> who already know what they are doing. BASCOM, here I come!
AVRfreaks.com is a heavy supporter of the GCC-AVR, so they might have
additional help files and whatnot. Although CodeVision is not free, my
understanding is that is has a free eval version you can try and CodeVision
seems to get good reviews from people.
BASCOM is a great program. It is what I have been learning the AVR chips with
and highly recommend it if BASIC programming is the way you want to go.
=====
Patrick Timlin ptimlin@ptim...
http://www.geocities.com/ptimlin/
__________________________________________________

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] AVR Right for newbie hobbyist? - danjmaclean - Feb 12 12:08:00 2003
--- In avrclub@avrc..., "Patrick A. Timlin" <ptimlin@y...>
wrote:
> > Flush with Birthday present cash I'm about to take the plunge and
> > purchase an STK500!
>
> You won't be sorry.
>
<snip!>
WOW! That's a lot of good information. I'll spend some more time at
AVRfreaks.
I'm looking exclusively at DIP's right now because of the ease of
assembly. I'm not good enough at soldering to trust myself with
anything surface-mounted. Although, I think there are ZIF sockets
available. But why not go straight to the DIP?
I'm reading an excellent book called "The Robot Builder's Bonanza"
and it is extremely helpful with covering the basics (including going
over exactly what parts the beginner should probably have on hand
including the specific part numbers. That's nice because I know I'll
need resistors and capacitors, but what values?)
I feel on the verge of making my first LED blink! Pretty exciting!
But I'll have to place that order first.

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] AVR Right for newbie hobbyist? - Patrick A. Timlin - Feb 12 13:36:00 2003
--- "danjmaclean <captainvideo@capt...>" <captainvideo@capt...>
wrote:
> I'm looking exclusively at DIP's right now because of the ease of
> assembly. I'm not good enough at soldering to trust myself with
> anything surface-mounted. Although, I think there are ZIF sockets
> available. But why not go straight to the DIP?
I hear ya man. I too am using DIPs. ZIF sockets are very expensive. Tens of
dollars easily per socket. A few of the AVRs ONLY come in surface mount. The
mega64 and mega128 come to mind. However, they are way more chip than I will
ever need, so I am not likely to need to deal with that.
Most of the other ones come in some sort of DIP package. 40-pin ones seem to
be the most common among the mega series. The mega8 is 28-pins and the tiny26
is 20-pins.
> I feel on the verge of making my first LED blink! Pretty exciting!
> But I'll have to place that order first.
Oh I just remembered. The STK500 does not come with a power supply. It does
come with the piece of cord that plug into the board itself, so it is easy to
splice onto (if needed) the wall-wort you supply. But I mention it, because
you will need to get some sort of wall-wort type DC supply for the STK. All
Allectronics has bunches, some already with the right plug on the end. But
you may find you have one laying around that will work. For example, if you
have a scanner, it likely runs off a wall-wort rated at 12V, 1A and it may
already have the right connector, so you can use that.
Thought I would mention that so when you got your STK-500, you wouldn't be
dissappointed finding you still need to locate a supply thus putting off play
time for another day.
=====
Patrick Timlin ptimlin@ptim...
http://www.geocities.com/ptimlin/
__________________________________________________

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Wall-Wort for STK - further thought - Patrick A. Timlin - Feb 12 13:41:00 2003
--- "Patrick A. Timlin" <ptimlin@ptim...> wrote:
> But I mention it, because you will need to get some sort of wall-wort
> type DC supply for the STK.
On further reflection, the STK will actually accept an AC or DC input, so you
might be able to use an AC output wallwart if you have one hanging around. I
can take a look at the STK500 schematic and give you a range of voltage
values you can use if you need it. Or just let me know what power supply you
have on hand you are wondering about using with teh STK and I can let you
know if it will work or not.
=====
Patrick Timlin ptimlin@ptim...
http://www.geocities.com/ptimlin/
__________________________________________________

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: Wall-Wort for STK - further thought - danjmaclean - Feb 12 15:19:00 2003
I downloaded the STK500 user's manual and it says it requires a 10V -
15V DC power supply. I'm certain I have that laying around. I don't
think I've ever thrown away a good plug-in AC adapter;)
It also claims you won't mess it up by reversing the polarity.
Negative center is preferred because a positive center will require
you to define ground elsewhere, such as the RS232 cable shield.
Strange.
>The mega8 is 28-pins and the tiny26
>is 20-pins.
Did I read somewhere that BASCOM is incompatable with the tiny's
because of the SRAM thing?
And I notice some do and some don't have an on-chip multiplier (a
kind of math coprocessor?). Does this affect programming?
Thanks!

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] Re: Wall-Wort for STK - further thought - Patrick A. Timlin - Feb 12 16:26:00 2003
--- "danjmaclean <captainvideo@capt...>" <captainvideo@capt...>
wrote:
> I downloaded the STK500 user's manual and it says it requires a 10V -
> 15V DC power supply. I'm certain I have that laying around. I don't
> think I've ever thrown away a good plug-in AC adapter;)
The STK500 uses a diode bridge for the power input which is why you can use
any polarity DC supply. But because of the bridge, you can also use an AC
supply (which Atmel does not mention), but you have to be careful to get an
AC voltage that won't cause the onboard linear regulator to get too hot.
Also a 9V input voltage works fine. I mention that because "9V" is a more
likely voltage rating to run across in your junk drawer than "10V".
> It also claims you won't mess it up by reversing the polarity.
> Negative center is preferred because a positive center will require
> you to define ground elsewhere, such as the RS232 cable shield.
> Strange.
No I think the issue is the switch switches the outside of the plug. So if
you have a positive center, then your switch is turning off the "ground" side
of your supply. If you have a ground connected elsewhere in your system, then
this might complete the circuit and you simply won't be able to turn off the
board with the switch. This is not likely to be an issue with an isolated
wall-wort type supply, but might effect you if you use a bench power supply
where the (-) terminal might be tied to earth ground.
> >The mega8 is 28-pins and the tiny26
> >is 20-pins.
> Did I read somewhere that BASCOM is incompatable with the tiny's
> because of the SRAM thing?
Ya I said it to you this morning. <grin> The Tiny26 DOES have SRAM so it can
be used with BASCOM. The other tiny chips (Tiny11, 12, etc) can not be used
with BASCOM or in a very limited fashion.
> And I notice some do and some don't have an on-chip multiplier (a
> kind of math coprocessor?). Does this affect programming?
??? I am not sure what you are speaking of.
=====
Patrick Timlin ptimlin@ptim...
http://www.geocities.com/ptimlin/
__________________________________________________
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
[AVR club] Re: Wall-Wort for STK - further thought - badpacket94501 - Feb 12 21:11:00 2003
Patrick, thanks loads for the information.
I think I got more out of your several posts than I've gotten out of
searching AVRfreaks and such for a couple of days. Information
overload.
Just a question maybe?
I am looking at probes for aquaria, and I understand most of them
require some sort of ADC input on the mcu side. While the 1-wire part
you mentioned seemed the exception, using the Dallas CAN protocol?
Anyways, I am planning on have perhaps 3 probes initially. Would I
need an MCU that has three ADC's, or is there some sort of simple
circuit that I can build from the digital IO to switch between each
probe on the ADC input?
I'm sure this is a pretty noobie question, but before I jump for the
STK500, thought I'd ask.
Also, I was asking about using a breadboard with the STK500 as I
fibure thats a lot faster to set up, and fix my goofs with before
whipping out the soldering iron. Or, do I not need the breadboard to
hook up my probes to the STK? Not too clear on how to do that from
the pictures of the STK500 I've seen, but then I am a newbie :)
Thanks again for your time and help!

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] Re: Wall-Wort for STK - further thought - Patrick A. Timlin - Feb 13 14:18:00 2003
--- "badpacket94501 <badpacket94501@badp...>" wrote:
> I am looking at probes for aquaria, and I understand most of them
> require some sort of ADC input on the mcu side. While the 1-wire part
> you mentioned seemed the exception, using the Dallas CAN protocol?
"1-Wire" (a registered term by Maxim/Dallas semiconductor) devices use a
serial protocol to transfer data over a single wire. Actually they are really
two wire devices since you need a ground wire. But Maxim cheats and doesn't
count the ground wire. Marketing mumbo jumbo and all that. You can find out
more by going to...
http://www.maxim-ic.com/1-Wire.cfm
CAN bus is an entirely different kind of serial bus system, developed mainly
for the automotive industry but used in other types of industrial
applications where you might have a lot of electrical noise and need a bus
system to transfer data around.
> Anyways, I am planning on have perhaps 3 probes initially. Would I
> need an MCU that has three ADC's, or is there some sort of simple
> circuit that I can build from the digital IO to switch between each
> probe on the ADC input?
>
> I'm sure this is a pretty noobie question, but before I jump for the
> STK500, thought I'd ask.
Well the mega163 chip which will likely be included with your STK500 (or they
might start including the mega16 instead) has up to 8 ADCs available. So as
long as you do not need the I/O pins for other uses, you can probably use
three seperate ADC inputs if you want. However you will likely need some sort
of analog circuitry between the probes and the ADC input depending on the
type of signal your probes put out. Maybe some sort of OP-Amp cicuit.
Keep in mind, that with this sort of project, the price of the electronics is
nothing compared to the price of the probes depending on the type. For
example, cheaper pH probes will probably run you around $40-$50 just for the
probe.
Temperature is easy and cheap. The nice thing about the 1-Wire temperature
sensors is they output a digital value that converts directly to a
temperature and you can string more than one on the same I/O pin. So you
could have a handful of aquariums all with their own 1-Wire temp sensor in
them, but all strung on the same single I/O pin. So your AVR can monitor many
tank's temperature readings without having to dedicate any additional I/O
pins than if you were only monitoring one tank.
> Also, I was asking about using a breadboard with the STK500 as I
> fibure thats a lot faster to set up, and fix my goofs with before
> whipping out the soldering iron. Or, do I not need the breadboard to
> hook up my probes to the STK? Not too clear on how to do that from
> the pictures of the STK500 I've seen, but then I am a newbie :)
If I remember, I will try and get a digital picture or two of an example of
how you might interface stuff to an STK-500. I can show you how I have an LCD
hooked up with a bit of perf board and some cabling or how I interfaced a
1-Wire device by using an empty socket on the STK-500 and some clip leads. As
you said, sometimes you have to see it to understand what others are talking
about as it is hard to put into text at times.
To be completly honest with you, you might put the probes on the back burner
for a little while. You might start off with some smaller projects. Initially
of course you will just be learning how to write some code and get the
onboard LEDs and pushbuttons of the STK500 to do stuff for you. Then you
might output text thru a serial port to your computer or hook up an LCD
display. Interfacing the 1-Wire to read that would be a good next step as
well as simple ADC work by hooking up a potentiometer to the kit and
adjusting the voltage to the ADC input and see if you can read it correctly.
THEN, moving toward an aquarium application, you might start of with a few
simple projects at first and build on them as you go along. For example,
first stab might be a simple digital thermometer for the tank using the
1-wire sensor and an LCD display. Next you might add serial outputting of the
temperature than will allow you to data log temperature over time on your
computer (which could then be imported to a spreadsheet and graphed or
whatever). Maybe next you make a box that plugs into the wall for power, then
your light system and heater(s) plug into the box. The box would now monitor
your temperature, be able to cut off the power to the heater if needed
(overtemp), sound an alarm if temp was over or under a predetermined range,
and also control your lighting system (the box taking the place of the usual
electro-mechanical light timer). For the latter, you might next learn how to
implement a real time clock (RTC) or use the 60Hz from the power input to do
timing so your light go on/off at the same time each day.
Then you start investing the bucks and time into the expensive stuff. A pH
probe first, learn to use it and read it, then build/add it to your previous
project where now lights, temp AND pH are monitored or controlled.
As you can see, there is a LOT you can do with much cheaper components and
still have fun "automating" your aquarium and learning the AVR chips before
you start spending $$$ on probes. I don't want to discourage you from doing
that, but I think stuff like pH might be put on the "eventually" list so you
don't bite off more than you can chew from the get go and maybe get
discouraged or give up on AVRs completely.
=====
Patrick Timlin ptimlin@ptim...
http://www.geocities.com/ptimlin/
__________________________________________________

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
[AVR club] Re: Wall-Wort for STK - further thought - badpacket94501 - Feb 15 23:14:00 2003
--- In avrclub@avrc..., "Patrick A. Timlin" <ptimlin@y...>
wrote:
> --- "badpacket94501 <badpacket94501@y...>" wrote:
> > I am looking at probes for aquaria, and I understand most of them
> > require some sort of ADC input on the mcu side. While the 1-wire
part
> > you mentioned seemed the exception, using the Dallas CAN protocol?
>
> "1-Wire" (a registered term by Maxim/Dallas semiconductor) devices
use a
> serial protocol to transfer data over a single wire. Actually they
are really
> two wire devices since you need a ground wire. But Maxim cheats and
doesn't
> count the ground wire. Marketing mumbo jumbo and all that. You can
find out
> more by going to...
> http://www.maxim-ic.com/1-Wire.cfm
>
> CAN bus is an entirely different kind of serial bus system,
developed mainly
> for the automotive industry but used in other types of industrial
> applications where you might have a lot of electrical noise and
need a bus
> system to transfer data around.
> > Anyways, I am planning on have perhaps 3 probes initially. Would
I
> > need an MCU that has three ADC's, or is there some sort of simple
> > circuit that I can build from the digital IO to switch between
each
> > probe on the ADC input?
> >
> > I'm sure this is a pretty noobie question, but before I jump for
the
> > STK500, thought I'd ask.
>
> Well the mega163 chip which will likely be included with your
STK500 (or they
> might start including the mega16 instead) has up to 8 ADCs
available. So as
> long as you do not need the I/O pins for other uses, you can
probably use
> three seperate ADC inputs if you want. However you will likely need
some sort
> of analog circuitry between the probes and the ADC input depending
on the
> type of signal your probes put out. Maybe some sort of OP-Amp
cicuit.
>
> Keep in mind, that with this sort of project, the price of the
electronics is
> nothing compared to the price of the probes depending on the type.
For
> example, cheaper pH probes will probably run you around $40-$50
just for the
> probe.
Yep, I expected the probes to run somewhere around 40+ each. But,
looking around at controllers for aquaria, they're extremely
expensive ($200 for a cheapie 1 or 2 controller), so it should more
than even out eventually.
> Temperature is easy and cheap. The nice thing about the 1-Wire
temperature
> sensors is they output a digital value that converts directly to a
> temperature and you can string more than one on the same I/O pin.
So you
> could have a handful of aquariums all with their own 1-Wire temp
sensor in
> them, but all strung on the same single I/O pin. So your AVR can
monitor many
> tank's temperature readings without having to dedicate any
additional I/O
> pins than if you were only monitoring one tank.
Hmm, so I just need to find out how to interface 1-Wire, cool.
>
> > Also, I was asking about using a breadboard with the STK500 as I
> > fibure thats a lot faster to set up, and fix my goofs with before
> > whipping out the soldering iron. Or, do I not need the
breadboard to
> > hook up my probes to the STK? Not too clear on how to do that
from
> > the pictures of the STK500 I've seen, but then I am a newbie :)
>
> If I remember, I will try and get a digital picture or two of an
example of
> how you might interface stuff to an STK-500. I can show you how I
have an LCD
> hooked up with a bit of perf board and some cabling or how I
interfaced a
> 1-Wire device by using an empty socket on the STK-500 and some clip
leads. As
> you said, sometimes you have to see it to understand what others
are talking
> about as it is hard to put into text at times.
>
> To be completly honest with you, you might put the probes on the
back burner
> for a little while. You might start off with some smaller projects.
Initially
> of course you will just be learning how to write some code and get
the
> onboard LEDs and pushbuttons of the STK500 to do stuff for you.
Then you
> might output text thru a serial port to your computer or hook up an
LCD
> display. Interfacing the 1-Wire to read that would be a good next
step as
> well as simple ADC work by hooking up a potentiometer to the kit and
> adjusting the voltage to the ADC input and see if you can read it
correctly.
>
> THEN, moving toward an aquarium application, you might start of
with a few
> simple projects at first and build on them as you go along. For
example,
> first stab might be a simple digital thermometer for the tank using
the
> 1-wire sensor and an LCD display. Next you might add serial
outputting of the
> temperature than will allow you to data log temperature over time
on your
> computer (which could then be imported to a spreadsheet and graphed
or
> whatever). Maybe next you make a box that plugs into the wall for
power, then
> your light system and heater(s) plug into the box. The box would
now monitor
> your temperature, be able to cut off the power to the heater if
needed
> (overtemp), sound an alarm if temp was over or under a
predetermined range,
> and also control your lighting system (the box taking the place of
the usual
> electro-mechanical light timer). For the latter, you might next
learn how to
> implement a real time clock (RTC) or use the 60Hz from the power
input to do
> timing so your light go on/off at the same time each day.
>
> Then you start investing the bucks and time into the expensive
stuff. A pH
> probe first, learn to use it and read it, then build/add it to your
previous
> project where now lights, temp AND pH are monitored or controlled.
>
> As you can see, there is a LOT you can do with much cheaper
components and
> still have fun "automating" your aquarium and learning the AVR
chips before
> you start spending $$$ on probes. I don't want to discourage you
from doing
> that, but I think stuff like pH might be put on the "eventually"
list so you
> don't bite off more than you can chew from the get go and maybe get
> discouraged or give up on AVRs completely.
Agree, I just ordered the STK500 from Mauser, along with the color-
coded jumper-wire kit.
Of course, I just had to order the "Hantronix Chip-On-Glass Graphic
Display Modules 128X64 FSTN COG" http://www.mouser.com//index.cfm?
handler=listproduct&categoryid=89&lst_pcode=6875
though, only $20 too!
Appreciate the suggestions and advice.
> =====
> Patrick Timlin ptimlin@y...
> http://www.geocities.com/ptimlin/
>
> __________________________________________________

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Make it stop!!! - badpacket94501 - Feb 16 2:56:00 2003
Sigh, I just keep finding more and more cool little components for my
uber-project. Needed to find a way to xfer data from my as yet
theoretical datalogger, and was looking into interfacing CF or
somesuch. Then, had the thought of using IrDA, but found out the
range was way to short.
Then of course, I find the RF solution AT86RF211, and its only $9 at
Digi-Key.....
Since I probably won't even be able to get an LED lit for a while, I
think I'd best stop drooling over this stuff....

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] Re: Wall-Wort for STK - further thought - Patrick A. Timlin - Feb 16 14:38:00 2003
--- "badpacket94501 <badpacket94501@badp...>" wrote:
PT> So you could have a handful of aquariums all with their own 1-Wire
PT> temp sensor in them, but all strung on the same single I/O pin.
> Hmm, so I just need to find out how to interface 1-Wire, cool.
Depending on the programming package you use it might be trivial or take some
serious coding. For example, in assembly, you have to do everything yourself
like getting the timing right and all that. Although there must be assembly
routines floating around the 'net you can grab and paste in to your code. But
some of the higher level languages for AVR have nice built in commands.
BASCOM, for example, has very easy to use "1Wire" commands that make talking
to 1-Wire devices about as simple as it can get. You only have to figure out
what sort of commands to send to a chip to get it to reply with the stuff you
want, but the actual 1Wire communication protocol is taken care of. I had a
DS18B20 hooked up on my STK500 and get reading from it within the hour. I
spent most of my programming time just coming up with neat ways to display
and/or convert the data, rather than struggling with getting the data. The
Maxim data sheets give very nice flow charts that tell you exactly the order
and kinds of command you have to issue to get a temp reading.
> Agree, I just ordered the STK500 from Mauser, along with the color-
> coded jumper-wire kit.
>
> Of course, I just had to order the "Hantronix Chip-On-Glass Graphic
> Display Modules 128X64 FSTN COG" http://www.mouser.com//index.cfm?
> handler=listproduct&categoryid=89&lst_pcode=6875
> though, only $20 too!
I'll have to check that out later when I get a bit of spare time. Price
sounds nice.
> Appreciate the suggestions and advice.
Just to please edit your replies for the mail list. Your reply/post was 18k
long but boiled down to you only adding about 11 lines. Just a friendly bit
of email list advice. It is not that big of a deal with people who get
individual posts (although editing makes it much easier to read), but it can
be particularly brutal for the digest people who get one giant email with all
the day's posts in it. When people don't edit, it gets painfully large and
very hard to sort thru to spot the new info vs. the quoted stuff from
previous posts. The result is that sometimes people will just skip it and not
really read it, when that person might have a good bit of info to share on a
particular subject but doesn't respond.
=====
Patrick Timlin ptimlin@ptim...
http://www.geocities.com/ptimlin/
__________________________________________________

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] Make it stop!!! - Patrick A. Timlin - Feb 16 14:42:00 2003
--- "badpacket94501 <badpacket94501@badp...>" wrote:
> Sigh, I just keep finding more and more cool little components for my
> uber-project.
Don't you just hate that? Lot of cool ideas and cool part, little time and/or
money to play/implement them all.
> Needed to find a way to xfer data from my as yet
> theoretical datalogger, and was looking into interfacing CF or
> somesuch. Then, had the thought of using IrDA, but found out the
> range was way to short.
How about sending the data serially to a computer or laptop? Or you could use
an EEPROM (the AVR's or external) to temperary store values, create a serial
port in your product, then hook up the device to a computer occationally, hit
a button, get a data dump to your computer, then the AVR goes back to
monitoring and recording reusing the EEPROM storage. You could even implement
some sort of alarm where the AVR warns you when the storage space in your
device is close to being full so you can do the dump and clear it out.
=====
Patrick Timlin ptimlin@ptim...
http://www.geocities.com/ptimlin/
__________________________________________________

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] Make it stop!!! - badpacket94501 - Feb 16 18:04:00 2003
--- In avrclub@avrc..., "Patrick A. Timlin" <ptimlin@y...>
wrote:
> How about sending the data serially to a computer or laptop?
Thought about that initially. Problem for me is that my aqaurium is
not near my computer. As I'm an apartment dweller, I can't go really
fixing things up the way I want, so some sort of wireless or IR is
now my preferred route.
Initially, the plan was to take a Mini-ITX $100 full blown computer
and runs probes to that, and then from a wireless 802.11b card to my
main system. If anyone is interested, the Mini-ITX is pretty darn
cool at $100 for a full X86 system.
http://www.mini-itx.com/hardware/intro.asp
http://www.itxpc.com/toaster.htm
However, the Atmel micro's should allow for a much cheaper solution,
although more 'work' is definately required. What I will also need
eventually is some sort of PC-side RF-USB data receiver now.
And of course, some sort of program to read in the data. I will
probably have to add some SRAM to the data logger so that I only need
to initiate a D/L once every couple of weeks or so.
Anyone looking to interface stuff with the PC, might want to look at
Pure Basic, www.purebasic.com
This is a Basic-like language that allows direct calls to the Windows
API, creation of DLL's, and in general is about as fast as C++,
sometimes faster. And, its only $60, with lifetime updates/support.
My project is taking on a life of its own now....

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] Make it stop!!! - badpacket94501 - Feb 16 18:04:00 2003
--- In avrclub@avrc..., "Patrick A. Timlin" <ptimlin@y...>
wrote:
> How about sending the data serially to a computer or laptop?
Thought about that initially. Problem for me is that my aqaurium is
not near my computer. As I'm an apartment dweller, I can't go really
fixing things up the way I want, so some sort of wireless or IR is
now my preferred route.
Initially, the plan was to take a Mini-ITX $100 full blown computer
and runs probes to that, and then from a wireless 802.11b card to my
main system. If anyone is interested, the Mini-ITX is pretty darn
cool at $100 for a full X86 system.
http://www.mini-itx.com/hardware/intro.asp
http://www.itxpc.com/toaster.htm
However, the Atmel micro's should allow for a much cheaper solution,
although more 'work' is definately required. What I will also need
eventually is some sort of PC-side RF-USB data receiver now.
And of course, some sort of program to read in the data. I will
probably have to add some SRAM to the data logger so that I only need
to initiate a D/L once every couple of weeks or so.
Anyone looking to interface stuff with the PC, might want to look at
Pure Basic, www.purebasic.com
This is a Basic-like language that allows direct calls to the Windows
API, creation of DLL's, and in general is about as fast as C++,
sometimes faster. And, its only $60, with lifetime updates/support.
My project is taking on a life of its own now....

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )