Author
Topic: Choosing and using a microcontroller for a first robot (Read 1882 times)

I have become interested in the field of robotics and have decided to take on a little challenge of building one. Unfortunatly, I know next to nothing about any of this. I have already created a thread about powering the robot, if you would like to take a look at that and give some pointers it would be much apreciated. From that, Ive decided that I should use a 6V NiMh battery with an adjustable regulator to power my microcontroller. Which brings us to the next step in the problem, what mircocontroller?

I know how to program using VB.net, Java, C++, RobotC, and easyC, so if the programming language matters to the microcontroller I would like it to be one of those. What other things should I look for in a microcontroller? What differentiates one from the other?

The idea for my robot right now is a four wheeled(powered by two servos), photovore (I thats what its called 0.o)with an arm powered by a non-continuous servo. Battery may be a 6V NiMh. If you need any other specs, let me know because that probably means that I overlooked something that I may need.

You should look at either AVR microcontrollers or PIC microcontrollers as they are the most popular.They both have advantages and disadvantages but overall they offer mostly the same features so really it's just a matter of personal preference.Both can be programmed in C so you should be fine as far as programming languages go.

Look for one that has lots of I/O, a high clock speed, and has a lot of memory.

Google is your friend!!!Just kidding.Man you are greener than I am, hehe.That's at least half the fun. The micro doesn't understand anything but voltages. It needs sensors attached to live, so it's up to you and your own whim to attach whatever sensors you want to make the micro do stuff. Figuring out the circuit needed to make the sensor output something that the micro can understand (usually fairly simple), then programming the micro to take that in and do stuff with it, is pretty much what it's all about.So anyway, my answer is the sensor doesn't matter and there are tons of different types of sensors to pick from. You just have to make the sensor output digestible by the micro.I'd suggest you start by following a recipe (there are many - I'd start here (click)) rather than starting from scratch with your own idea. This will get your feet wet and you'll quickly become familiar with how things are done. Try to resist going off on tangents and just get one built and working - the tangents will slow you down. Save them for the next one and go wild. A little success will serve you well and shoot you off into a positive trajectory, but getting bogged down on your first project because you went down the unknown path could put you off on the whole idea. Trust me.

There is a good middle road to take, i.e. just buying a robot kit, putting it together and pasting code the manufacturer wrote for you doesn't leave enough to chew on to learn much - a totally new creation completely out of your own head can be too difficult to grok and cause you to surrender before it goes very far. Taking a proven design and building it yourself leaves plenty of opportunity to learn a ton, but it's likely to be a success because every step is described to guide you through the waters.

When choosing a microcontroller, do a little research on available IDEs, compilers, programmers and their cost. Microcontrollers cost only a few dolloars, but compilers and programmer, which are required to make any use of the microcontroller may cost you hundreds of dollars.

AVR has a free IDE - AVR Studio and a open source compiler - WinAVR. There are a lot of programmers for AVR which are available for low costs and even some which can be built at home. So I would go for AVR.

Alright thanks for the advice and link! And im green in the building from scratch department but i have built robots for FIRST vex and lego, problem is those kits always did everything for you and i didnt learn anything like microcontrollers 0.o

I was looking at a couple of the AVR boards and i realized that I dont know how many pins i need for my robot. What is a good amount of pins for a couple of sensors, three servos, and some room to expand?

Another thing about the arduinos seems to be their vast variety. They come in all shapes and sizes, and some have different purposes than others. For you, since you are beginning, I'd probably recommend something more general, like the Duemilanove, as you will have more room to expand on. The only problem with that one is that you'll have to create your own shield to use servos and other output/input devices. Because you want to be more robot specific (I assume) I'd recommend the Roboduino, as it already has the .1" pins on the board.

I would recommend the Duemilanove or a similar arduino as it is the most versatile. you can add servo shields, sensor shields etc later on. You can also do this on the romeo arduino but the good thing about the Duemilanove is that you can change over the chips if needed. This may be a good thing if anything happens in the future.

the roboduino is also a good option as it comes already set up, really easy to use( i would think the most easy to use of the "duinos").

so all in all i would go with the Duemilanove as it has the best features in my opinion. and it is not over complicated like the romeo. and will always be of use. you will never need to throw it out as long as you need less than app 20 IO pins.