2

Author Topic: Controlling a robot Via Flash Memory?  (Read 2958 times)

0 Members and 1 Guest are viewing this topic.

Offline AnorocTopic starter

  • Full Member
  • ***
  • Posts: 55
  • Helpful? 1
Controlling a robot Via Flash Memory?
« on: April 11, 2008, 09:44:08 AM »
Has anyone experimented with this? I'm wondering how easy or difficult it would be to make your robot accept, lets say, an SD card for a set of specific directions.

Offline Asellith

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 648
  • Helpful? 9
  • "I'm a leaf on the wind. Watch how I soar"
Re: Controlling a robot Via Flash Memory?
« Reply #1 on: April 11, 2008, 07:16:36 PM »
Depends on the controller. A small board computer takes compact flash and some take SD cards. Another option is the dos on a chip module found at http://www.dosonchip.com  It even uses a uart and I2c so it can be used with most microcontrollers. All you need to do is program it.
Jonathan Bowen
CorSec Engineering
www.corseceng.com

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Controlling a robot Via Flash Memory?
« Reply #2 on: April 20, 2008, 02:47:11 PM »
sparkfun sells SD card boards that are billed as data storage devices for mcu's

might be worth looking in to

Offline Asellith

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 648
  • Helpful? 9
  • "I'm a leaf on the wind. Watch how I soar"
Re: Controlling a robot Via Flash Memory?
« Reply #3 on: April 20, 2008, 09:31:36 PM »
I think we are talking about the same board Admin. Sparkfun is the only US distributor for dosonchip
Jonathan Bowen
CorSec Engineering
www.corseceng.com

Offline darkywarkey

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Controlling a robot Via Flash Memory?
« Reply #4 on: June 23, 2010, 11:55:39 PM »
I'm a web programmer by day, and am entirely new to working on embedded/small devices such as the Axon (any MCU for that matter). That said I can easily see myself surpassing the 64kB of space within a few months of tinkering.

Curious, would the Axon work with a storage device such as http://www.robotshop.com/4d-systems-tiny-embedded-microsd-module.html  ?

And if so, would its storage be accessible via the code you load onto the MCU? If for example I wrote a sufficient amount of code to surpass the onboard 64kB of space, it would utilize this extra space for the code and various serialized/data logging? Not sure what this would require doing but that's my end result.

Eventually, I would like my robot minions to have speech recognition software (will probably get a DSP for this), in order to understand commands to fire it's death rays :)

Learning as I go, this is just for future reference.

Offline billhowl

  • Supreme Robot
  • *****
  • Posts: 375
  • Helpful? 32
  • Your success is in your hands.
Re: Controlling a robot Via Flash Memory?
« Reply #5 on: June 24, 2010, 05:07:43 AM »

And if so, would its storage be accessible via the code you load onto the MCU? If for example I wrote a sufficient amount of code to surpass the onboard 64kB of space, it would utilize this extra space for the code and various serialized/data logging? Not sure what this would require doing but that's my end result.

That storage device can only store your data but not your code.
« Last Edit: June 24, 2010, 05:09:32 AM by billhowl »

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: Controlling a robot Via Flash Memory?
« Reply #6 on: June 24, 2010, 05:13:55 AM »
64k seems like a little, but once compiled, code for these microcontrollers is very small. You won't be filling itnup anytime soon. Out of all of the Axons sold, only one person has filled the  64k, and thst was with a 20+ servo humanoid with kinematics.

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Controlling a robot Via Flash Memory?
« Reply #7 on: June 24, 2010, 05:37:33 AM »
Speaking of Voice Command from Sparkfun, take a look at this: https://www.sparkfun.com/commerce/product_info.php?products_id=9753
And for SD serial access, take a look at this:
http://www.sparkfun.com/commerce/product_info.php?products_id=9530
Check out the uBotino robot controller!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Controlling a robot Via Flash Memory?
« Reply #8 on: June 24, 2010, 07:49:42 AM »
Quote
64k seems like a little, but once compiled, code for these microcontrollers is very small. You won't be filling itnup anytime soon. Out of all of the Axons sold, only one person has filled the  64k, and thst was with a 20+ servo humanoid with kinematics.
A hexapod with inverse kinematics :P
(it all fit btw, but just barely)

You're going to have to 'forget' everything you know about programming to move from web apps to microcontrollers. It requires an entirely different thought process . . . you now have extremely limited processing power and RAM to work with, and even perfect flawless code can make you think there is a software bug when your hardware has a problem.

And yea, 64Kb is a *lot* for a robot. My ERP only uses like 35kb, and I put little effort into conserving memory with my code.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Controlling a robot Via Flash Memory?
« Reply #9 on: June 24, 2010, 06:54:48 PM »
Hi,

I'm a web programmer by day, and am entirely new to working on embedded/small devices such as the Axon (any MCU for that matter). That said I can easily see myself surpassing the 64kB of space within a few months of tinkering.
Bloated programming and programming languages is a direct consequence of still larger memory capacities (on RAM, HD etc).
You won't be using C++, Java or similar for a µController.
Back in the old days, a spreadsheet, a wordprocessor and similar programs could be stuffed into 10..40kB - remember, no graphics overhead or other atrocities  ;D
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 Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Controlling a robot Via Flash Memory?
« Reply #10 on: June 24, 2010, 07:06:53 PM »
Hi,

Has anyone experimented with this? I'm wondering how easy or difficult it would be to make your robot accept, lets say, an SD card for a set of specific directions.
That would be relatively easy (with the relative going towards your skills of course).
SD cards can be accessed by SPI and either you have a µController with dedicated SPI, or it can be bit-banged.
The program just needs to have a command interpreter which fetches the next direction and translates it into whatever action is needed (eg. F40 => rolling forward 40mm, 40s or whatever you choose).

The reason that not many will do this, is probably because it nix the autonomy of the robot and bring it on par with an R/C car (just much slower) and where's the fun in that?


With a controller that can "reprogram in action" (those that can be used with a bootloader), it would be possible to store a range of programs on SD and let it change its own program in response to environmental changes or similar.
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 darkywarkey

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Controlling a robot Via Flash Memory?
« Reply #11 on: June 26, 2010, 11:00:01 PM »
I understand by large I won't need the extra space for quite some time. But I would like to get to a point of programming enough logic to toy with AI. And speech recognition I'm sure is no small use of space. I may end up using an ARM core or something more powerful at that point, right now I'm just going to see how far I can get with the devices I'll be using (Axon MCU, DSP etc..) and learn the ropes.

I'm fully aware this is going to require a different method of coding, keeping processing power and RAM in mind. I actively have to update bloated inefficient code at work so this is nothing new to me  :D I simply need some direction moving into hardware and interfaces I'm largely unfamiliar with.

My one electronics class is all but forgotten, not that it was anything more than simple components and theory  ;D

Thanks for the input.

Offline darkywarkey

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Controlling a robot Via Flash Memory?
« Reply #12 on: June 26, 2010, 11:15:04 PM »

With a controller that can "reprogram in action" (those that can be used with a bootloader), it would be possible to store a range of programs on SD and let it change its own program in response to environmental changes or similar.


So let me see if I understand you here. This would basically be switching out the code on the fly, loading the new binaries(?) from the SD card according to the condition?

or..

The program just needs to have a command interpreter which fetches the next direction and translates it into whatever action is needed (eg. F40 => rolling forward 40mm, 40s or whatever you choose).

Would essentially have the ability to accept commands that are received via some means (bluetooth etc), and then run some code set to respond via the command issued?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Controlling a robot Via Flash Memory?
« Reply #13 on: June 27, 2010, 11:39:51 AM »
Hi,


With a controller that can "reprogram in action" (those that can be used with a bootloader), it would be possible to store a range of programs on SD and let it change its own program in response to environmental changes or similar.


So let me see if I understand you here. This would basically be switching out the code on the fly, loading the new binaries(?) from the SD card according to the condition?
Yes, more or less - you'd have to suspend the animation for the up to a few seconds it would take (depending on size), while the loader does it's stuff - you'd probably need to use a bit of the SD (or other external memory) for storing the present data that initiated the code change, unless you want it to go Alzheimer on the past.


or..

The program just needs to have a command interpreter which fetches the next direction and translates it into whatever action is needed (eg. F40 => rolling forward 40mm, 40s or whatever you choose).

Would essentially have the ability to accept commands that are received via some means (bluetooth etc), and then run some code set to respond via the command issued?
Completely different scenario for a completely different situation.

Either you want this or the former, but I doubt both would be needed in the same 'bot.
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 darkywarkey

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: Controlling a robot Via Flash Memory?
« Reply #14 on: June 27, 2010, 04:24:19 PM »
Thanks for the info. That's what I was wondering. And no, preferably I don't want my robot to suffer from alzheimer's haha...

So if I'm looking for something I could upgrade the space for the code, what kind of devices/architecture would make sense starting at the beginning of the design? Just so I'm aware of what to shop for or put on my x-mas list, ha.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Controlling a robot Via Flash Memory?
« Reply #15 on: June 27, 2010, 04:42:16 PM »
Hi,

So if I'm looking for something I could upgrade the space for the code, what kind of devices/architecture would make sense starting at the beginning of the design? Just so I'm aware of what to shop for or put on my x-mas list, ha.
If you are going with AVRs, the one used in the Axon does have the "self write" i believe and both AVR, PIC and most other controller families have members with this ability - look for wording like "protected memory" or boot loader capable.

But, if you are serious about AI, speech recognition etc. and wanna benefit from your previous programming experience, I'd suggest whispering Pico-ITX into the ear of the funny smelling dude in the red suit.
If he complies, you have a complete PC in 7 x 10 cm (~3"x4"). A flash disk makes it quite rugged and you just plug in keyboard, screen and mouse to program - right on the 'bot.

It have been on my list for some years now, just not at the top, but some fine day... ;D
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 Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Controlling a robot Via Flash Memory?
« Reply #16 on: June 28, 2010, 07:36:17 AM »
Quote
But I would like to get to a point of programming enough logic to toy with AI. And speech recognition I'm sure is no small use of space. I may end up using an ARM core or something more powerful at that point, right now I'm just going to see how far I can get with the devices I'll be using (Axon MCU, DSP etc..) and learn the ropes.
Another option, which actually models the human brain, is to have one central processor (ie microcontroller) linked up to a bunch of specialized sub-controllers.

For example, an Axon with a Blackfin for computer vision and a Razor for dedicated IMU and Kalman filter calculations. There are also speech recognition modules you can hook up to your microcontroller.

This is my style of robot . . . none of my robots have just one microcontroller anymore, giving me parallel processing capabilities . . .

 


Get Your Ad Here