Author Topic: Have a question about controller boards??  (Read 3304 times)

0 Members and 1 Guest are viewing this topic.

Offline heinz357Topic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 1
Have a question about controller boards??
« on: June 28, 2011, 06:18:41 AM »
Hi,
   I've been lurking around as a guest for a while now, trying to look up answers to the questions I have, without having to ask them!!
  I'm new to the world of robotics, but have a few projects in mind, first of which is a high speed Japanese style 500g sumo bot.
  Question is... to get the resolution/processing speed I think I need to acheive the goal, I understand its probably 90% the coding I come up with, but, which one of these three boards would be the least restrictive speed-wise??

http://www.dfrobot.com/index.php?route=product/product&path=35_38&product_id=56
http://www.dfrobot.com/index.php?route=product/product&path=35_38&product_id=341
http://www.emartee.com/product/41989/Arduino%20Nano%20Mega%202560

...can these all acheive the speed of processing, and resolution I'm looking for, and which is likely to hold me in good stead for future wheeled projects??

Many Thanks!!

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
    • http://www.garrettgalloway.com/
Re: Have a question about controller boards??
« Reply #1 on: June 28, 2011, 08:28:57 AM »
The Leaf Maple appears fastest by far at over 70mhz. The arduinos and anything based on the atmel mega line typically tops out at 20mhz. The arm based (Maple) platform is going to be a bit harder to get initially started in if you don't have much experience with micros due to the difficulty in getting the compiler setup, though the maple looks to have it's own IDE and I have no experience with it. Of course that purely subjective. The arduino environment is pretty simple.

If understanding your IDE is not the issue, go for the Maple, it is a superior platform.

Edit:
After some looking around, it looks like Maple cloned the Arduino IDE as well as the functionality in the libraries. Maple is clearly the winner if you MUST have intense processing.
« Last Edit: June 28, 2011, 08:30:58 AM by garrettg84 »
-garrett

Offline BigKLaxer

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 2
    • Power Wheels Robot Project
Re: Have a question about controller boards??
« Reply #2 on: June 28, 2011, 12:13:35 PM »
I have some experience with the maple and can say it's most definitely fast.  At 72MHz, speed probably won't be an issue.  It's also pretty easy to use, and while the support docs and libraries are no where near as complete as Arduino's, they're working on extending their code and have a pretty good arduino-like base already.  However, at twice the cost of an arduino, I'd still say go for an Uno or some other Arduino clone.  72MHz is fast, but 16MHz is probably fast enough if your code is as efficient and concise as it should be.  Most of the things I see the Maple used for involve complex math like digital signal processing as well as very time dependent applications like UAV's and quadcopters.  Unless you have a huge amount of calculations to do and need the speed of 72MHz and money is not an issue, I'd say go for a 16MHz Arduino or similar board.
Experimental Mobile Robotics Platform: http://www.udrobot.blogspot.com

Offline heinz357Topic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 1
Re: Have a question about controller boards??
« Reply #3 on: June 29, 2011, 09:05:59 AM »
First off, many thanks to both you Gents for the rapid, detailed replies, you gave me a lot to think about!!

Financial constraints, and the fact I've never attempted to code/program anything more than a VCR before, have lead me to ordering the Romeo controller, due to the built in motor control, and the vast amount of info concerning the 328 chip. :)

...heres hoping its upto the task!

With regards to the Romeo, does it have enough onboard memory to cope with more than one simple program to be stored at a time, and does it have the ability to allow the mounted push buttons to be able to select between programs...ie, could I mount a line following code assigned to button 1, and have an object avoidance code assigned to button 2....and not have to plug into the pc to change between the two??

I'm possibly asking a lot from it, but as a complete beginner I'd like to know where the boundaries and constraints lie! ???

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Have a question about controller boards??
« Reply #4 on: June 29, 2011, 09:21:48 AM »
With regards to the Romeo, does it have enough onboard memory to cope with more than one simple program to be stored at a time, and does it have the ability to allow the mounted push buttons to be able to select between programs...ie, could I mount a line following code assigned to button 1, and have an object avoidance code assigned to button 2....and not have to plug into the pc to change between the two??
Space available should be stated in datasheet of Your board; if size of hex file (Your compiled program file) is not larger than space available in Your uC - You're good to go. Having two programs in one uC is impossible as far as I know, however You can merge them two (or three or more) programs manually with directives to run loop#1 when btn#1 is pressed and go to loop#2 when btn#2 is pressed and so on and so on.

Why do You want to have more than one program in Your uC?

It does not take long time to re-flash Your uC with new software if You have Your hex files ready. Plus it is always easier debug/update Your code when it is as short as possible and is used for one specific task rather than everything You might need in Your life  ;D (OO concept - each module of software is responsible for specific task; hence OO programming languages are widely used nowadays, as code is easier to reuse/update/debug than compared to old script-like languages).
« Last Edit: June 29, 2011, 09:30:38 AM by newInRobotics »
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline heinz357Topic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 1
Re: Have a question about controller boards??
« Reply #5 on: June 29, 2011, 12:26:53 PM »
Quote
You can merge them two (or three or more) programs manually with directives to run loop#1 when btn#1 is pressed and go to loop#2 when btn#2 is pressed and so on and so on.

...this is what I wanted to know, so it is acheivable, but as parts of a single code, not as a seperate code entirely!  ;)

The idea of having seperated programs is for the benefit of the learning curve, the thought being that a couple of small, simple codes may well be easier to perfect than one larger, more complex code, eg... the bot will have b/w line sensors, IR rangefinder servo mounted, 2x microswitches for contact sensing, and diff drive, so in theory, I could have 3 programs eventually, selectable onboard, one for line following to start with, one for obstacle avoidance when I get a little more advanced, and then one for Sumo when I get more confidence in my coding ability.

...quick edit.... is the Romeo supported by Webbotlib??
« Last Edit: June 29, 2011, 02:19:19 PM by heinz357 »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Have a question about controller boards??
« Reply #6 on: July 01, 2011, 07:59:58 PM »
Hi,

(OO concept - each module of software is responsible for specific task; hence OO programming languages are widely used nowadays, as code is easier to reuse/update/debug than compared to old script-like languages).
No, Object Oriented Programming (OOP) is programming where, as the name implies, you work with data as objects with all that this entails (Google opportunity ;D)
OOP has nothing to do with being "script-like" or not, scripting languages are interpreted languages, interpreted one line at a time at run time, just like eg. old variants of BASIC.

What you describe sounds more like State Machine (SM) programming, without really being it.
SM's are blocks of code that is executed when the task scheduler passes control to a SM and the SM decides when to pass on control.

It is quite possible to place more than one program in a microcontroller. The linker is used to chain whatever code fragments/programs into a contiguous file, whether the purpose is to link in library functions or a collection of smaller programs - in the latter case, it's just so much easier to make it as a flat file, as it makes it far easier to make the code for switching, but in the memory of a controller, you cannot tell the difference.


That said, my advice will be the same - to go with one program at a time, at least for the first couple of years, to keep focus on a limited spread of functions to learn and to get familiar with - the goal is to reach the state where you, sort of  imagine the skeleton of the program as soon as you hear or think the needed feature list. This is best done in small steps that is revisited from time to time.


About the processing speed... It's a standard beginner flaw to think that flashing an LED plus what little extra is conjured up in the first couple of years of programming needs extreme speed - reading the datasheet ought to tell anyone that even a measly 1MHz clock cycle is more than enough - If it isn't, you need to take a long hard look at the way you code.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline richiereynolds

  • Full Member
  • ***
  • Posts: 112
  • Helpful? 3
Re: Have a question about controller boards??
« Reply #7 on: July 03, 2011, 07:13:48 AM »
I wouldn't worry too much about keeping your "programs" separate for simplicity, your program will be divided into separate "functions" which you'll "call" based on certain criteria e.g. which button a user has pressed as you suggest. One functionality doesn't necessarily conflict or even interact with another.

Of course you should start with something simple and get one set of functionality working first which will help you get to grips with the whole thing!

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Have a question about controller boards??
« Reply #8 on: July 03, 2011, 11:13:36 AM »
Hi,

I wouldn't worry too much about keeping your "programs" separate for simplicity, [...]
And how many decades of programming experience and how many millions of code lines are talking here?
Did you ever tried linking programs and calling them from other programs yourself, so you know what you're talking about?


your program will be divided into separate "functions" which you'll "call" based on certain criteria e.g. which button a user has pressed as you suggest. One functionality doesn't necessarily conflict or even interact with another.
You know, the needle in the hay stack is so much easier to find if the stack is small.


Of course you should start with something simple and get one set of functionality working first which will help you get to grips with the whole thing!
Yes, a couple of years of getting to know each detail before merging programs to monsters.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline richiereynolds

  • Full Member
  • ***
  • Posts: 112
  • Helpful? 3
Re: Have a question about controller boards??
« Reply #9 on: July 03, 2011, 01:47:01 PM »
And how many decades of programming experience and how many millions of code lines are talking here?
2 decades, and I've not counted, why anyone would count code lines as a measure of skill or experience I've no idea. I know awful programmers who've written lots lines of code and superb programmers whio've written much less, in general the good ones move onto architecture, design etc.

Did you ever tried linking programs and calling them from other programs yourself, so you know what you're talking about?
Not relevant to my reply, or the OP's question. A raw beginner would not even consider such a thing. He wants a way to make his robot run different code without rebooting it to ease his experimentation. There are simple ways to do this.

You know, the needle in the hay stack is so much easier to find if the stack is small.
And it will be small, do you think a first time programmer is going to write a large program? That doesn't preclude him from experimenting with various functionality. Functions are usually in the opening group of chapters in any programming text.
« Last Edit: July 03, 2011, 01:48:21 PM by richiereynolds »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Have a question about controller boards??
« Reply #10 on: July 06, 2011, 10:00:22 AM »
Hi,

2 decades,
Then you certainly should know, that for a beginner, each added function can be an added source of confusion.


and I've not counted, why anyone would count code lines as a measure of skill or experience I've no idea.
We're not talking skills, but just experience here and I'd think it's basic math, that experience goes hand in hand with the work done.


I know awful programmers who've written lots lines of code and superb programmers whio've written much less,
So, you don't think that people learn from doing?
I'd postulate that in each individual, the more lines done lead to more experience - as a matter of fact, isn't that exactly what the word "experience" means?


in general the good ones move onto architecture, design etc.
Do you have the least shred of documentation on that?
In my experience, the good ones are good because they love it so much that they cannot help doing it.


Did you ever tried linking programs and calling them from other programs yourself, so you know what you're talking about?
Not relevant to my reply, or the OP's question. A raw beginner would not even consider such a thing. He wants a way to make his robot run different code without rebooting it to ease his experimentation. There are simple ways to do this.
Highly relevant I'd say. You tell a guy to just go ahead with something that you haven't ever done (how you have avoided that during 2 decades is a puzzle to me though).

Comparing the "trouble" of re-flashing a chip to the very real trouble of stockpiling linked but separate programs and then creating call code for the segments is really a no-brainer.

Teaching programming to beginners, I have learned that, if you can make something with just 2 functions, but add 3..4, you're asking for confusion, longer debug times and the sense of failure in the students that's really demotivating.
KISS.


You know, the needle in the hay stack is so much easier to find if the stack is small.
And it will be small, do you think a first time programmer is going to write a large program?

I wouldn't worry too much about keeping your "programs" separate for simplicity, [...]
I don't think your definition of a small program is really "cut to the bone" and anything beyond the bare essentials will just be adding to complexity.
There's a reason for the Hello World/LED type programs.


That doesn't preclude him from experimenting with various functionality. Functions are usually in the opening group of chapters in any programming text.
Which usually starts with the above mentioned Hello World/LED type program. But sadly, few programming books are written by people with pedagogical training, which is quite evident when even semi-experienced folks sometimes just don't get a particular writer.

Taking on new stuff before you have played around for some time with what you've already learned, to really get it under the skin, will just slow your learning.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline richiereynolds

  • Full Member
  • ***
  • Posts: 112
  • Helpful? 3
Re: Have a question about controller boards??
« Reply #11 on: July 06, 2011, 03:49:25 PM »
Then you certainly should know, that for a beginner, each added function can be an added source of confusion.
yet you mention options such as program linking when you consider having some extra functions too confusing?

We're not talking skills, but just experience here and I'd think it's basic math, that experience goes hand in hand with the work done.
Experience without skill is not very valuable and common.
 
So, you don't think that people learn from doing?
Some do, and some don't, there are plenty of joiurneymen out there happy to repeat the same mistakes and remain at the same level for their entire working life.

I'd postulate that in each individual, the more lines done lead to more experience - as a matter of fact, isn't that exactly what the word "experience" means?
Experience without skill is not very valuable and common.

in general the good ones move onto architecture, design etc.
Do you have the least shred of documentation on that?
In my experience, the good ones are good because they love it so much that they cannot help doing it.
Why would I keep documentation on such a thing? I speak from personal experience and the knowledge that humans who are not journeymen generally want to move on to new and bigger things and increase their skill and knowledge in all fields.

Did you ever tried linking programs and calling them from other programs yourself, so you know what you're talking about?
Not relevant to my reply, or the OP's question. A raw beginner would not even consider such a thing. He wants a way to make his robot run different code without rebooting it to ease his experimentation. There are simple ways to do this.
Highly relevant I'd say. You tell a guy to just go ahead with something that you haven't ever done (how you have avoided that during 2 decades is a puzzle to me though).
What???! Have you read my post? It's you who suggested this as a possibility, I suggested not doing this, simply using functions to achieve his goal.
I also didn't say I hadn't done this, I said it's not relevant, please could you read more carefully.


The OP was asking for some options to have his bot carry out multiple functions, I encouraged him and told him that this is possible with quite simple code, which it is. Of course he will start with something fairly simple and work from there. Why you have jumped on this and decided to call into quesition my working experience etc. I've no idea.

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: Have a question about controller boards??
« Reply #12 on: July 07, 2011, 07:13:08 AM »
Hi,

(OO concept - each module of software is responsible for specific task; hence OO programming languages are widely used nowadays, as code is easier to reuse/update/debug than compared to old script-like languages).
No, Object Oriented Programming (OOP) is programming where, as the name implies, you work with data as objects with all that this entails (Google opportunity ;D)
OOP has nothing to do with being "script-like" or not, scripting languages are interpreted languages, interpreted one line at a time at run time, just like eg. old variants of BASIC.

Soren, I have a lot of respect for your ability as an engineer, but I'm not really sure why you're going after this the way you are. Object oriented programming is a term that has lots of definitions ranging from C variables to Smalltalk entities. It typically just means that code and data exist together as a unit. However, C has always used the term object to refer to any region of memory - which is probably why it was used when C++ was thought up, because it was intended to be a "better C".

That being said, the idea behind OOP is to make each object responsible for operations on its data, hiding the implementation of those operations and the data as well. Not too far off from the C idea of a module.

BTW, interpreted languages can be just as OOP as compiled languages. Indeed Smalltalk is an interpreted language, as is Java and Python, etc. All of which are capable of threaded execution.

I agree though, that this is probably beyond what a beginner would like to be thinking about :-)

Joe

 

SMF spam blocked by CleanTalk