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

0 Members and 1 Guest are viewing this topic.

Offline Warhawk87Topic starter

  • Full Member
  • ***
  • Posts: 109
  • Helpful? 0
Choosing and using a microcontroller for a first robot
« on: May 27, 2010, 07:55:39 PM »
Hey everyone!

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.

Thanks for all your help!

Offline z.s.tar.gz

  • Supreme Robot
  • *****
  • Posts: 540
  • Helpful? 5
  • Linux Guru
Re: Choosing and using a microcontroller for a first robot
« Reply #1 on: May 28, 2010, 05:35:19 AM »
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.
Save yourself the typing. Just call me Zach.

Offline Warhawk87Topic starter

  • Full Member
  • ***
  • Posts: 109
  • Helpful? 0
Re: Choosing and using a microcontroller for a first robot
« Reply #2 on: May 28, 2010, 09:19:32 PM »
Do the type of sensors matter? Can i use a microcontroler for photoresisters and later reuse it with a touch sensor?

Offline vinito

  • Full Member
  • ***
  • Posts: 101
  • Helpful? 6
Re: Choosing and using a microcontroller for a first robot
« Reply #3 on: May 28, 2010, 10:36:00 PM »
Quote
Do the type of sensors matter?

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.

$.02
« Last Edit: May 28, 2010, 10:38:03 PM by vinito »

Offline Pratheek

  • Contest Winner
  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 3
    • Probots
Re: Choosing and using a microcontroller for a first robot
« Reply #4 on: May 28, 2010, 11:14:17 PM »
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.

Offline Warhawk87Topic starter

  • Full Member
  • ***
  • Posts: 109
  • Helpful? 0
Re: Choosing and using a microcontroller for a first robot
« Reply #5 on: May 28, 2010, 11:33:21 PM »
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

thanks again i will definetly look into AVR!

Offline Warhawk87Topic starter

  • Full Member
  • ***
  • Posts: 109
  • Helpful? 0
Re: Choosing and using a microcontroller for a first robot
« Reply #6 on: June 01, 2010, 05:59:42 PM »
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?

Offline Warhawk87Topic starter

  • Full Member
  • ***
  • Posts: 109
  • Helpful? 0
Re: Choosing and using a microcontroller for a first robot
« Reply #7 on: June 01, 2010, 06:07:46 PM »
Also, I'm not sure what makes one board better than another but this board looked promising http://www.digilentinc.com/Products/Detail.cfm?Prod=CEREBOT-II&Nav1=Products&Nav2=Embedded.  I just wanted to ask some experienced people if this board gives a good bang for its buck and is versatile enough for my needs.

P.S. If it has an onboard voltage regulator does that mean I dont need to buy one?

Offline Warhawk87Topic starter

  • Full Member
  • ***
  • Posts: 109
  • Helpful? 0
Re: Choosing and using a microcontroller for a first robot
« Reply #8 on: June 03, 2010, 11:13:56 AM »
Does anyone know anything about the Arduino boards and which one is best?  Is the best Arduino board better than the board I posted previously?

Offline Warhawk87Topic starter

  • Full Member
  • ***
  • Posts: 109
  • Helpful? 0
Re: Choosing and using a microcontroller for a first robot
« Reply #9 on: June 06, 2010, 08:30:38 PM »
I dont know if this is allowed but bump

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: Choosing and using a microcontroller for a first robot
« Reply #10 on: June 06, 2010, 08:42:16 PM »
Roboduino and Romeo Arduino are good choices for robotics. I personally prefer Seeeduinos, however I don't do much robotics stuff with them (wiring servos to those are a pain also)

Offline Canabots

  • Contest Winner
  • Robot Overlord
  • ****
  • Posts: 245
  • Helpful? 6
  • It's not a bug, it's a feature!
    • Salmigondis Tech
Re: Choosing and using a microcontroller for a first robot
« Reply #11 on: June 07, 2010, 05:47:39 AM »
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.
My robotics, electronics, software, or other stuff blog:
www.saltech.wordpress.com

Offline Joker94

  • Supreme Robot
  • *****
  • Posts: 1,119
  • Helpful? 26
Re: Choosing and using a microcontroller for a first robot
« Reply #12 on: June 07, 2010, 06:20:11 AM »
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.

Good Luck

Joker94

Offline Warhawk87Topic starter

  • Full Member
  • ***
  • Posts: 109
  • Helpful? 0
Re: Choosing and using a microcontroller for a first robot
« Reply #13 on: June 07, 2010, 07:34:29 PM »
Why would I not be able to use servos/motors without the shields?  I would think its as easy as plug the wire into the pin and voila....

 


data_list