PDA

View Full Version : Building a rover



sam
12-26-2008, 06:52 PM
I want to make a rover for fun.

I would like to know what you guys would recommend in terms of quality/price.

For the moment I will keep the robot simple. Maybe remotly controlled via a PS2 controller and could be autonomous at the same time with a couple of sensors.

The first decision I need to take is the base. I was looking at lynxmotion's tri-track desing. For the price it looks like a good deal. I could later modifie it since I'm not a big fan of the Triangle part of the tracks...

My second option would be to buy the parallax (http://www.trossenrobotics.com/store/p/5761-Motor-Mount-Wheel-Kit-with-Position-Controller.aspx) and build my own base. Sinc eI have no tools to do this, it would most likly be a square with little shape. I'm slowly thinking of rulling this option out because if I ever need beter motors than the ones in the lynxmotion kit, I would want fster motors, and these motors only run at about 190 RPMs.

Anyone have any other ideas as waht the base could be? I'm open to any idea :happy:

I will ask for controlling option later when I have more time.

Sam

Adrenalynn
12-26-2008, 07:11 PM
Don't know if you saw my posts - but I really like the tri-track but the motors stink. I replaced them with Banebots about 12x as quick.

4mem8
12-26-2008, 08:11 PM
I definitely like the Lynx tracks, very strong, easy to put together and are extendable with more links.They are durable and have great rubber traction for treads. Downside, A bit on the expensive side.

ooops
12-27-2008, 12:05 AM
Sam, I really like the parallax (http://www.trossenrobotics.com/store...ontroller.aspx (http://www.trossenrobotics.com/store/p/5761-Motor-Mount-Wheel-Kit-with-Position-Controller.aspx)). This is a great kit that comes with the everything you need for the powertrain. As far as attaching this to a body, you can bolt it to a plastic plate, alum plate, a box of some sort and not a lot of heavy tooling required. That said, you can find a few complete rovers for what this kit costs. Maybe you should lean toward a kit that has most of the parts supplied, spend more time coding/hacking and enjoying it, and less time on the build?
Myself, I love the build and fear the code. Don't be like me ... learn to code, live to code, build to code:)

robologist
12-27-2008, 02:31 AM
Guess it might depend on where you intend to "rove" and what parts of robot building you enjoy. If the bot is mainly indoors, the Lynx kit with some different motors might be good, keeping the robot down under 2 foot per second, or maybe a little faster. The Parallax drive train looks like about 6" wheels at 150 rpm possible, getting near 4 feet per second for more of an outdoor robot speed, still catchable in case of program probs. The PS2 controller might be more for an indoor robot due to probable range issues though, but wireless upgrade to XBee later on might allow more outdoor distance.

If you enjoy building stuff, try a few simple platforms, just to see if you've got something you like. Or adapt something, like a cool looking chrome trashcan or mixing bowl. Many things can be a robot if you look hard enough. If you are more into programming than hammering and wiring, a kit might be best.

Adrenalynn
12-27-2008, 03:01 AM
What, no love for my [now dialed back] 12-16ft/sec TriTrack? :tongue:

robologist
12-27-2008, 04:16 AM
What, no love for my [now dialed back] 12-16ft/sec TriTrack? :tongue:

Sounds very fast, very fun, and a whole lot of liability. :D Is this the Lynx tracks with Banebots motors?

I had a set of EV Warrior motors at one time, planned for an outdoor bot, that might have gotten into that speed category. Sadly sold them a while back. :( May have been a good thing due to 1/2mv^2 though.

Adrenalynn
12-27-2008, 04:55 AM
Yup. The tracks held up amazingly well - not even any scratches on the sprockets. Those things are tough - it looks painful though with them rubbing on the frame as the tracks wrap around it. (Could use more support there, imho).

I've dialed it back to about 960 RPM at the shaft. (Stock on the stock Lynx motors I had was sub-60RPM @ 7.2v)

The target for this bot is a 4' x 4' formica (backside) sheet with 1x2 surrounding it. Even at present horsepower/torque curve it will literally launch into the air off of the 1x2 if you're not paying attention (R/C transmitter controlled at the moment, probably 2x Wii Nunchuk in tank control style using the accelerometers by the time it's done, depending on schedule and time)

sam
12-27-2008, 07:51 AM
I just read the the other thread about your transformation... :eek: I'll probably wait util I get the tracks to figure if I want to change them and when. Looking at your videos again, it looks really fun to control.

Listening to what you guys said, I will try to be more on the programing side of things. So probably just a kit will fo for the moment. The tracks look good and will last a long time. I could also change configuration later on, which would be nice.

Anyone has another kit that they bought or that they would want to recommend?

Next thing I need information on is the main controller. Now taht I've fried my Basic Atom, I need to buy another (micro) one. I'm looking for a micro that I will be able to get a PS2 gamepad to work with. I also want it to be able to send commands to the SSC-32 easily. I am not very good programmer and I might need somethings with program examples. I was looking at the Basic ATom pro or maybe the arduino contorller that seems to be used by lots of you guys.

Any comments about what you are using as controller, how they work, do program examples exist?

Thanks a lot for helping me!

Sam

4mem8
12-27-2008, 12:29 PM
Sam, If it is of any help to you you could also look at my T-1 tracked base unit, as this is the type of base that I think you are eventually wanting, It is constructed out of Lynx parts, but you have to make some of the parts to get it working as Lynx have NOT got parts made to make it work, Just another option for you. Here (http://robosapienv2-4mem8.page.tl/T_1-Rise-of-the-Machines.htm?PHPSESSID=8f2f67254c87626105420fb61c2 74db4).

robologist
12-27-2008, 12:38 PM
@Adrenalynn : Ok, just found the thread where your Tri-track Banebot combo was, pretty cool video. Sounds like fun and a chore to keep it in the box. New toys I gotta try soon!
http://forums.trossenrobotics.com/showthread.php?t=2575

Adrenalynn
12-27-2008, 12:57 PM
Yeah, that's dialed-down. You should see it at 9.6 or 12v with the accel curve turned up on the controller. ;)

sam
12-27-2008, 11:07 PM
Sam, If it is of any help to you you could also look at my T-1 tracked base unit, as this is the type of base that I think you are eventually wanting, It is constructed out of Lynx parts, but you have to make some of the parts to get it working as Lynx have NOT got parts made to make it work, Just another option for you. Here (http://robosapienv2-4mem8.page.tl/T_1-Rise-of-the-Machines.htm?PHPSESSID=8f2f67254c87626105420fb61c2 74db4).


I went all over your site, very nice and the robot too is great! Yeah I was kind of looking to do something like that. I would also like to move to PC robots sometime in the future (1-2 years) so a big base like that can give me enough space.

I see that you don't use the Basic Atom. DO you think it's worth rebuying one (just fried mine :sad:)?

Will a small basic atom be good enough to be a good investment? Would you recommend a special type of controller?

AS for Sensors : Maybe adding a few IR range detectors and a rotation base with servos and a laser. Anything else that would be interesting to try to andvance mayself in programing?

Thanks,

Sam

Adrenalynn
12-27-2008, 11:32 PM
If you want to "advance in programming", BASIC wouldn't be at the top of my list, especially not an embedded BASIC interpreter...

sam
12-28-2008, 08:16 AM
Ok, I see what you meen.

I saw the Axon controller, would it be pretty much the same thing as an embeded Basic enterpretter? Have any of you guys used it? DO you like it?

Another thing that I saw was the serializer (http://www.trossenrobotics.com/store/p/5196-Robotics-Connection-Serializer-WL.aspx) Which seems pretty neat but I'm affraid it will be too advanced for me. I would need lots of tutorials and such. Can I program the serializer or does it have to be plugged in something (like my PC) at all times? It's not very clear what exacly it is. What do you control your robots with Adrenalynn?

This part of the robot seam so overwhealming. :confused:

Best Regards,

Sam

jes1510
12-28-2008, 09:12 AM
Take a look at the Arduino. It'll get you familiar with C and it has tons of tutorials and documentation.

www.arduino.cc

lnxfergy
12-28-2008, 10:41 AM
Ok, I see what you meen.

I saw the Axon controller, would it be pretty much the same thing as an embeded Basic enterpretter? Have any of you guys used it? DO you like it?

Another thing that I saw was the serializer (http://www.trossenrobotics.com/store/p/5196-Robotics-Connection-Serializer-WL.aspx) Which seems pretty neat but I'm affraid it will be too advanced for me. I would need lots of tutorials and such. Can I program the serializer or does it have to be plugged in something (like my PC) at all times? It's not very clear what exacly it is.

Yes, the serializer would have to be "plugged into" something like a PC via the serial port (although you can use XBEE modules to do this wirelessly).

The AXON is simply an AVR microcontroller. You could buy a BASIC compiler for the AVR family -- or you could use the free AVR-GCC package, but you would be programming in C. If you are running windows - look at WINAVR, its a complete development package for AVR.

Similiarly, you could use an Arduino. This chip is also an AVR, and the arduino software builds on AVR-GCC - the only real difference is that Arduino provides a bunch of libraries (although so does the AXON now).

As for AXON vs Arduino, the AXON is quite a bit more expensive (and also out of stock still?), but the big advantage is that it has all the I/O brought out to servo-stye headers - this could save you a lot of soldering as you would have to make a seperate I/O board for the Arduino. However - this also just came out the other day (hence, I haven't tried one yet) http://www.curiousinventor.com/kits/roboduino

-Fergs

sam
12-28-2008, 11:01 AM
Yes, the serializer would have to be "plugged into" something like a PC via the serial port (although you can use XBEE modules to do this wirelessly).

The AXON is simply an AVR microcontroller. You could buy a BASIC compiler for the AVR family -- or you could use the free AVR-GCC package, but you would be programming in C. If you are running windows - look at WINAVR, its a complete development package for AVR.

Similiarly, you could use an Arduino. This chip is also an AVR, and the arduino software builds on AVR-GCC - the only real difference is that Arduino provides a bunch of libraries (although so does the AXON now).

As for AXON vs Arduino, the AXON is quite a bit more expensive (and also out of stock still?), but the big advantage is that it has all the I/O brought out to servo-stye headers - this could save you a lot of soldering as you would have to make a seperate I/O board for the Arduino. However - this also just came out the other day (hence, I haven't tried one yet) http://www.curiousinventor.com/kits/roboduino

-Fergs

But I could probably plug a SSC-32 servo controller into the Ardruino and control the SSC-32 to be able to control servos. This would make me skip over loots of solfering I guess. Can this be done?

So I could program both the AXON and the Arduino in C and in Basic depending on which program/compiler I use?

If what I said is true (and I'm really guessing here), since I already have SSC-32, I'd be better of with an Arduino and plugging my SSC-32 into it. Would save me money and would do the same thing as the AXON? Can I plug sensors directly into the Arduino?

Thanks a lot for the information! Very appreicated!

Sam

Adrenalynn
12-28-2008, 02:29 PM
Yes, hooking the Arduino up to the SSC32 is easy - but still requires building (soldering) a shield for the Arduino because of its stoopid pin spacing.

You can plug most sensors directly into the Arduino.

The Axon and the Arduino have other pretty major differences. The Axon has dozens more I/O than the Arduino does. It has tremendously more RAM and code space. It's more powerful all the way around.

I own a couple Arduinos, one of the earliest Axons (pre-Trossen selling them), and many other controllers. It's all about picking the right one for the job. The Arduino is pretty fun to learn on, and would be good for you. The Axon might be a little intimidating.

My arm controller runs an Arduino, connecting over XBee Wireless serial and sending commands to the SSC-32 without any issue. My only issue with the Arduino is that the complication and size of my code can quickly overwhelm it, where I've never even come close to doing so on the Axon.

sam
12-28-2008, 09:56 PM
I don't know, seems like the 3 line desing is missing (I know you can do witout, but it doens't seem practical). I have an ATmega 8 chip lying next to me that seems really good for waht I want to do (6 ADC so I will be able to use IR sensors unlike the Basic Stamp unless I use RCtime with resistors and capacitors :robotindifferent:, 3 PWMto control SSC-32 for the motor controller). I guess I will make my own connector with the parrallel port and program it in C via my PC.

I'm just going to buy a few IR range finders, tri-track and saberooth 2X10 so I will be able to program right when my kit arrives.

What do you think? Seems like a good idea from where I stand... I will maybe build my own board for the ATmega 8 later own and then advance to the 168 and then the 640.

Thanks for the feedback guys! :happy:

Sam

Adrenalynn
12-29-2008, 12:01 AM
3 line design? You mean power, ground, signal? The Arduino has power, ground, and signal - just not right next to each other - which is far more "real world". Nothing but hobby stuff really demands or supports that layout. Generally I've found that having all three packaged up is the "impractical" thing for interfacing to the real world. Too cramped.

revoltage
12-29-2008, 06:30 AM
IMHO the parallax kit eats a lot of current...I tested mine 2A a motor while running takes with no load (apart from the shaft given with the kit)...if you want to build a rover that is relatively light and consumes not much energy the parallax is not that good

sam
12-29-2008, 08:21 AM
3 line design? You mean power, ground, signal? The Arduino has power, ground, and signal - just not right next to each other - which is far more "real world". Nothing but hobby stuff really demands or supports that layout. Generally I've found that having all three packaged up is the "impractical" thing for interfacing to the real world. Too cramped.

Well, If I build my own board I can decide which one I prefere, so I still have both options. Seems like a lot of sensors have that layout now. OF course if I make my own sensors, I would have to make a 3 hole connector. Shouldn't be too hard...:tongue:

@Revoltage = Ok, it's good to know. With 2 amps continuosly, my battery would drain in a couple of minutes. I guess I will keep it for the bigger projects.

Thanks

Sam

sam
12-29-2008, 10:39 AM
Ok, I just ordered all the parts that I need to get starting. I will keep you guys updated!

Sam

jes1510
12-29-2008, 11:08 AM
Ok, I just ordered all the parts that I need to get starting. I will keep you guys updated!

Sam

Did you decide to build your own processor board? If so then you took the more uh "adventurous" route for a beginner. Definitely keep us updated.

ooops
12-29-2008, 11:54 AM
Sam, please keep us posted - share the parts list, when it arrives, and all the good details!

sam
12-29-2008, 02:20 PM
I sure will. Already the Tri-track base wasn't in stock so that will take a while to arrive at my place.

@Jes = I've already done some work with microcontrollers and connected them to my PC without any boards that are sold, just with a solderless board. I think (hope) I will be able to andle this.

As for building my own board, I would like to do it but I don't quite get how to do your own PCB and I'm not ready to ask a company to do it for me. I will have to look more into doing it myself.

lnxfergy
12-29-2008, 02:39 PM
As for building my own board, I would like to do it but I don't quite get how to do your own PCB and I'm not ready to ask a company to do it for me. I will have to look more into doing it myself.

Sparkfun has a series of tutorials on laying out your own boards in Eagle:
http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=108
http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=109
http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=110
http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=111

Once you have a board laid out, lots of places to have it made.

-Fergs

Adrenalynn
12-29-2008, 03:10 PM
@Revoltage = Ok, it's good to know. With 2 amps continuosly, my battery would drain in a couple of minutes. I guess I will keep it for the bigger projects.


That's 2A per motor under absolutely zero load, which isn't a practical. Under 60% load, I measured 14A/motor. They'll peak up to around 27A when stalled.

sam
12-29-2008, 03:50 PM
That's 2A per motor under absolutely zero load, which isn't a practical. Under 60% load, I measured 14A/motor. They'll peak up to around 27A when stalled.

Which is much worse, espacialy for small robots that can't hold 10 pounds of batteries. :wink:

@fergs : Thanks a lot for the links! I was kind of looking to make it myself just for the fun/learning parts. I will looks a bit deper the links that you provided. the program could still be very usefull for myself if I want to remember what I did (could forget easily).

Adrenalynn
12-29-2008, 04:56 PM
It's worth noting that the "little" Banebots motors I'm running on the TriTrack (not stock) draw about 7.5A each under an estimated 50% load and will send a 2x10 Sabertooth into thermal shutdown if you open them up for more than a couple seconds. They peak up over 25A each when stalled. So the current requirements aren't unreasonable, but yes, those motors are excessive for tiny 'bots unless there's a good purpose for them.

sam
12-30-2008, 10:41 AM
Yeah of course. You can have 600 HP motors that are raesonable, but just now on a robot the size of a computer :tongue:

I will try to start communicating with the ATmega8L soon. I've been realy busy on another project that I will enter in the contest a little latter. This is just a small side project.

sam
12-31-2008, 02:56 PM
Update :

I just went to buy a multiimeter (afeter breaking mine, but still 3 years for 10$ is not bad) and some voltage regulators. I'll try to build a small board soon and get my ATmega8 to work!

Still no ida when the rover will come.

4mem8
12-31-2008, 03:15 PM
Take your time Sam, no rush, get it right first time. Nothing more satisfying than building some electronic part and it works first time round.

sam
01-19-2009, 04:13 PM
Well I just received my stuff. Looks really great! :happy:

When I was reading about controlling the ATmega8L, I believe that I have to use a Max232 IC to be able to program the ATmega directly from my serial port. Since my electronics store is out, I will have to buy a batch from Digikey. I just have a question regarding the Digikey part labeling.

A DIP format is when there are leads that come out right?

Lets take an example of the ATmega168 :

ATMEGA168-20PU-ND

What does it mean? Do I need to understand to manage to order some things? I was looking at the max232 ICs avaible and I am overwhealmed by the possibilities...

Thanks for all your help! :happy:

Sam

lnxfergy
01-19-2009, 05:11 PM
Well I just received my stuff. Looks really great! :happy:

When I was reading about controlling the ATmega8L, I believe that I have to use a Max232 IC to be able to program the ATmega directly from my serial port. Since my electronics store is out, I will have to buy a batch from Digikey. I just have a question regarding the Digikey part labeling.

A DIP format is when there are leads that come out right?

Lets take an example of the ATmega168 :

ATMEGA168-20PU-ND

What does it mean? Do I need to understand to manage to order some things? I was looking at the max232 ICs avaible and I am overwhealmed by the possibilities...

Thanks for all your help! :happy:

Sam

ATMEGA168 = well yeah, ATMEGA168.. the 20 is the max speed - 20MHZ, PU says its a commercial version (that defines the operating temps - PI would be industrial, slightly wider temp range I think - but pretty much irrelevent), ND = digikey part number, you'll find that at the end of nearly every digikey part number...

DIP = DUAL IN-LINE PACKAGE - aka black box with pins sticking out that you can slip into a breadboard/perfboard...

As for max232 - the CPE is the standard model I believe: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=MAX232CPE%2B-ND

Others may need less/smaller caps, or have higher heat ratings, or come with a free latte, or some other stuff, but the base model is typically good enough...

-Fergs

Rudolph
01-19-2009, 07:34 PM
When I was reading about controlling the ATmega8L, I believe that I have to use a Max232 IC to be able to program the ATmega directly from my serial port. Since my electronics store is out, I will have to buy a batch from Digikey.
Sam

Older Arduinos used an Atmega8 and a serial port connection, without a max232. This page (http://arduino.cc/en/Main/ArduinoBoardSerialSingleSided3) contains a schematic showing it hooked up with some transistors and resistors. Here's another one (http://www.ladyada.net/make/ybox2/progcable.html) that should be the same. Both of these may require a bootloader though, I don't know for certain. Avrdude should use these as a "dasa" programmer.

Also check PonyProg (http://www.lancos.com/siprogsch.html) for some schematics on programming an AVR via serial.

lnxfergy
01-19-2009, 10:14 PM
Older Arduinos used an Atmega8 and a serial port connection, without a max232. This page (http://arduino.cc/en/Main/ArduinoBoardSerialSingleSided3) contains a schematic showing it hooked up with some transistors and resistors. Here's another one (http://www.ladyada.net/make/ybox2/progcable.html) that should be the same. Both of these may require a bootloader though, I don't know for certain. Avrdude should use these as a "dasa" programmer.

Also check PonyProg (http://www.lancos.com/siprogsch.html) for some schematics on programming an AVR via serial.

With AVRs you need one of the following to program them: ISP (in-system programmer), High Voltage Parallel programmer (aka STK500 development board), or serial + bootloader. The bootloader basically acts like an ISP in software (actually most AVR ISPs are built out of, you guessed, an AVR). So a bootloader would be required for programming via serial, but you need something like the AVR-ISP to install a bootloader... eh yeah.

And of course you can get away with no max232 - but your speed may be limited - and your error rate may go up.

-Fergs

Rudolph
01-19-2009, 10:33 PM
Right. My mind was elsewhere with the older arduinos with serial.

The PonyProg thing should be a serial port ISP though. Here's another schematic (http://www.olimex.com/dev/images/avr-pg1b-sch.gif) for a serial port one (sold at sparkfun (http://www.sparkfun.com/commerce/product_info.php?products_id=14)). It's still the ponyprog way, just a one-piece schematic. You can just tell avrdude to use a ponyprog programmer.

You can also "fake" an AVR ISP through USB with an FTDI chip (possibly others?) and a bitbang version of avrdude, but I've only seen mention of it with windows. I got an AVR-based AVR programmer already so it doesn't matter much to me :)

sam
01-20-2009, 03:26 PM
Thanks a lot for the input guys!

What micro do you guys think I should use for a mini-sumo or a rover? I saw that Jon's Seeker2x uses the ATmega 128, which is much more expensive (Why?). It has 2 more A/D...

It seems like a nice place to start. I should be placing my order this week. I think I'm going to buy a couple motor drivers (http://www.solarbotics.com/products/l298/) to build the intire circuit on one PCB.

Anyone has any ideas on what else I would need to build a rover? Any more pratical or must have's?

Rudolph
01-20-2009, 03:42 PM
Compared to the mega8? Yeah, it's only got two more A/D. But, it's also got 2 UARTs (8 has 1), 128k of flash (8 has 8), and a grand total of 53 I/Os (8 has 20 I think).

Adrenalynn
01-20-2009, 04:12 PM
16K byte self-programming Flash Program Memory, 512 byte SRAM, 256 Byte EEPROM

vs

128-Kbyte self-programming Flash Program Memory, 8-Kbyte SRAM, 4-KByte EEPROM + JTAG.

Memory is king in MCU's.

The price difference is about seventy-nine cents...

Adrenalynn
01-20-2009, 04:12 PM
Oh - I was comparing it to the 128, sorry.

sam
01-20-2009, 05:00 PM
Should have been a bit clearer:tongue:

I'm comparing the ATmega 168 to the ATmega 128.

128 Format : 64 QFN (can't have DIP, well I can but minium order is 250...)
53 I/O
128*8=1024K program memory size
16 MHz speed
4*8 = 32k of RAM
4*8 = 32K EEprom

168 Format : 29 DIP
23 I/O
16*8 = 128K program memory size
20MHz speed
1*8 = 8K RAM
512*8= 4k EEprom

So... I have a couple questions.

What is QFN format? I guess its surface mount and a square shape. Can I solder surface mounted stuff with a normal solder iron?

What is most desirable (memory, as Adrenalynn said I guess) RAM, EEPROM, programing memory in a micro?

For the price, I go a digikey (cause I'm in Canada). Its about 13$ difference( 6$ and 19$). It doesn't really matter (the price) just wondering why.

Adrenalynn
01-20-2009, 05:29 PM
You do not want QFN unless you have a wave table laying around. ;) Actually, you can bake 'em, but lining them up aint pretty.

QFN is Quad Flat No leads, aka MLF

You can solder SMD with a soldering iron. You need to develop the skills on something other than a CPU though. And it has to be a GOOD soldering iron, radio-shack-junk need not apply.

Adrenalynn
01-20-2009, 05:36 PM
Here: http://www.futurlec.com/ICAtmel.shtml

Get 'em onsie-twosie.

sam
01-21-2009, 04:11 PM
Hoo...

Ok that's taken off the list (the QFN) . Thanks for the site BTW!

I'm still heasitating between the ATmega 168, 16 and 644

I have 2-3 of each for the moment. I want to have some on hand if I need them later, so I think having more is better since I will end up using them anyway.

Having those three modules will let me follow diffirent tutorials and try to learn by myself.

What do you guys think? Thanks a lot for the input.

Sam

Adrenalynn
01-21-2009, 04:39 PM
Well, the 644 gives you lots of options and lots of pins. But it's lots of pins. ;)

The 168 can be flashed to emulate an Arduino which gives you access to all the Arduino code, projects, wiring language, etc. That's fun.

Make sure you get the appropriate crystals, and budget for a programmer.

sam
01-21-2009, 05:00 PM
Waht kind of programers are there? I have eard of the WinAVR, which is freeware and seems OK. Should I invest and buy one? if so, which one?

Adrenalynn
01-21-2009, 05:46 PM
A programmer isn't a compiler/linker. It's the hardware that lets you program different chips. I use the STK500 (http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=2735) which will program just about anything in the AVR line. It's intended to work with WinAVR or AVRgcc, etc.

It even comes with an ATMEGA8515 chip that you can reuse for something else once you're done running their learning stuff.

lnxfergy
01-21-2009, 05:46 PM
Waht kind of programers are there? I have eard of the WinAVR, which is freeware and seems OK. Should I invest and buy one? if so, which one?

Nah, you need a HARDWARE programmer. WinAVR is a software suite built around AVR-GCC, which is a compiler for C code. In order to get the hex file onto your chip you need a hardware programmer. If you have a parallel port or old-fashioned serial port there are ways to conjure up something - look at ponyprog. However, I would really recommend spending the $20-40 and getting a real, USB, hardware-programmer:

The official Atmel one: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ATAVRISP2-ND
Several places, including pololu: http://www.pololu.com/catalog/product/740 make knock-offs, but really, for the extra few dollars, why not get the original? Who the heck hacks a programmer anyways....

All of these can use either the AVRDUDE software, or AVR-STUDIO, to program the chip through the hardware programmer.

-Fergs

lnxfergy
01-21-2009, 05:47 PM
A programmer isn't a compiler/linker. It's the hardware that lets you program different chips. I use the STK500 (http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=2735) which will program just about anything in the AVR line. It's intended to work with WinAVR or AVRgcc, etc.

It even comes with an ATMEGA8515 chip that you can reuse for something else once you're done running their learning stuff.

You beat me by like 12 seconds....

-Fergs

Adrenalynn
01-21-2009, 05:50 PM
Your answer was a bit more complete than mine - so we'll give you the twelve seconds. :)

sam
01-21-2009, 08:14 PM
Ok, I get it.

SO I could use the MAX232 to program a couple of ATmel micros, but the programer will let me program practicly any Atmel microcontroller from a USB port? It sems a lot like the wire configuration that you can get from the 232.

Is it really worth it/practical? I can't quite understand why, sorry :confused:

:Dthanks a lot for the information!

lnxfergy
01-21-2009, 08:20 PM
Ok, I get it.

SO I could use the MAX232 to program a couple of ATmel micros, but the programer will let me program practicly any Atmel microcontroller from a USB port? It sems a lot like the wire configuration that you can get from the 232.

Is it really worth it/practical? I can't quite understand, sorry :confused:

:Dthanks a lot for the information!

For programming over RS-232 you need a bootloader on the chip (which it does not come with from the factory!) or you need a bit-banging software driver (I wouldn't recommend this).

The AVRISP is not quite like the MAX232, it has a similar chip for USB->Serial, but then it has an AVR in between the USB port and the AVR you want to program, that chip converts the information into a format that programs the destination AVR.

Seriously, if you plan to use AVRs, just get an AVRISP or STK500. If you don't want to do that, I would recommend getting a pre-programmed AVR from Sparkfun (has the Arduino bootloader on it) and then following the schematics for the Arduino serial port... and probably using the Arduino software. But really, these questions indicate that a bit-banging serial connection is probably not for you (as it will likely have to be debugged).

-Fergs

sam
01-22-2009, 03:11 PM
Ahh, ok I get it.

So basicly I can buy one of the two (STK500 or AVRISP) and forget about the MAX232s?

Which one should I go for? Can the STK500 program more chips? Is it easier? I guess I whould take the easiest one to use there is:tongue:

I cant wait to get started! :veryhappy: It's been way to long I haven't been doing robots.

EDIT: If I understand correctly, I won't need a crystal to communicate with my PC wince there is one included in the STK500 or AVRISP USB programmer?

Rudolph
01-22-2009, 05:42 PM
The max232's may be handy for having the micro talk back to the PC, or for serial communications to other micros (or some sensors, or anything else that speaks serial).

I can't say for the STK500 or AVRISP specifically, but my AVRs can't talk back to the PC through the programmer, it's just for programming (I have the USBtinyISP (http://www.adafruit.com/index.php?main_page=product_info&cPath=16&products_id=46), which supposedly can program any chip supported by avrdude (http://www.nongnu.org/avrdude/user-manual/avrdude_4.html#SEC4) (atmega, attiny, some(?) at90))

For reliable, squeaky-clean serial communications you'll probably want a crystal anyway. I don't think the crystal in the AVRISP works for the AVR you're programming with it, it's for the AVR in the programmer.

lnxfergy
01-22-2009, 06:28 PM
Ahh, ok I get it.

So basicly I can buy one of the two (STK500 or AVRISP) and forget about the MAX232s?

As Rudolph said, you can forget about MAX232 for programming - but if you want to open a serial communications channel, you'll need one




Which one should I go for? Can the STK500 program more chips? Is it easier? I guess I whould take the easiest one to use there is:tongue:

They can both program the same chips. The AVRISP can only program chips on another board - the STK500 can do anything the AVRISP can, plus it has prototyping spots and such - take a look at the manuals to see which you would prefer - the STK is about 2x the price I believe. I own both an AVRISP and an STK500 - but the STK stays in the box most of the time (unless I really frig something up)...



EDIT: If I understand correctly, I won't need a crystal to communicate with my PC wince there is one included in the STK500 or AVRISP USB programmer?

You may still want a crystal. The issue is this: when you are communicating with a PC you need to get a correct BAUD rate - which is dependent on the SYSTEM CLOCK. Most of the ATMEGAs have an internal oscillator that can be configure for 1MHZ or 8MHZ - this is going to limit your choice of baud rates to 9600, 19200 and I believe 56700 since any other has too big of an error based on the clock and the internal circuitry. Most of my chips run on a 14.7456 MHz clock - because I can do 115200KBps with no error, and its as close to the 16MHz I can easily go and do such (newer chips can go up to 20MHz, so there is a freq like 18.something that would be similiar - you can find tables of all of this in the AVR datasheet for the particular chip you want to use).

EDIT: oh, and you can't use the crystal in the AVRISP to run your AVR. You can use the STK500 one - but you probably don't want to build the STK500 into your project - it's pretty big!

-Fergs

sam
01-22-2009, 06:57 PM
As Rudolph said, you can forget about MAX232 for programming - but if you want to open a serial communications channel, you'll need one



They can both program the same chips. The AVRISP can only program chips on another board - the STK500 can do anything the AVRISP can, plus it has prototyping spots and such - take a look at the manuals to see which you would prefer - the STK is about 2x the price I believe. I own both an AVRISP and an STK500 - but the STK stays in the box most of the time (unless I really frig something up)...



You may still want a crystal. The issue is this: when you are communicating with a PC you need to get a correct BAUD rate - which is dependent on the SYSTEM CLOCK. Most of the ATMEGAs have an internal oscillator that can be configure for 1MHZ or 8MHZ - this is going to limit your choice of baud rates to 9600, 19200 and I believe 56700 since any other has too big of an error based on the clock and the internal circuitry. Most of my chips run on a 14.7456 MHz clock - because I can do 115200KBps with no error, and its as close to the 16MHz I can easily go and do such (newer chips can go up to 20MHz, so there is a freq like 18.something that would be similiar - you can find tables of all of this in the AVR datasheet for the particular chip you want to use).

EDIT: oh, and you can't use the crystal in the AVRISP to run your AVR. You can use the STK500 one - but you probably don't want to build the STK500 into your project - it's pretty big!

-Fergs

I'll still take a couple MAX232 just to have them handy if I want to do serial comm. Let's say I would want to control Robotis's RX-64 servos, I could use a MAX485 to open the serial communication and then control them?

From what I can understand of the STK500, I have to put the AVR in it, and then I can program it. After, do you change it boards to put it in your own board? If so you wouldn't really need another crystal since it's mostly for programing. This seems pretty silly to do (well, I'm not that advanced in this matter so I can't really give an opinion :rolleyes:) , Is the STK500 just to test the AVR functionnality then?

As for a crystal in my own circuit. All I need is a crystal that can be divided by 1.8432MHz (read this on another forum) and get a full number (no decimals) and that is the closest to the clock speed on the AVR?


Thanks to both of you for your nice and clear answers!

lnxfergy
01-22-2009, 09:24 PM
From what I can understand of the STK500, I have to put the AVR in it, and then I can program it. After, do you change it boards to put it in your own board? If so you wouldn't really need another crystal since it's mostly for programing. This seems pretty silly to do (well, I'm not that advanced in this matter so I can't really give an opinion :rolleyes:) , Is the STK500 just to test the AVR functionnality then?


The STK500 also can do ISP -- In System Programming. You have to wire up a special 10- or 6-pin header, and then the STK500 (or the AVR ISP) connects a cable to this header and programs the chip while it sits in it's own board.

-Fergs

sam
01-30-2009, 11:00 AM
Ok, thanks for all the information!

I just odered all the parts I need from Digi-Key. :veryhappy: Once they arrive I will start the fun part! I'll start in my solderless board, but I want to do some simple PCBs for the final thing. I'm looking at a couple of tutorials on the net.

I have less stuff at school for a week, so I will try to take advantage of it.