Show Posts
Pages: 1 2 3 [4] 5 6 ... 378
46  Using Arduino / General Electronics / Re: Strange acting motor + servo combo! on: August 10, 2014, 01:28:53 am
I would love to have one single power supply to power the Arduino, the motor, and the servo! :p

If you want to do this right - use hobby R/C batteries. Likely the best for you would be a 9.6 volt NiMH pack, such as:

http://www.amazon.com/Tenergy-2000mAh-Capacity-Battery-Security/dp/B001BA292A

You'll also want to get a charger - best is a smart charger, like:

http://www.amazon.com/Tenergy-Universal-Smart-Charger-Battery/dp/B003MXMJX8

Don't cheap out on batteries or chargers here - and when you are charging a battery, always be around to monitor it (don't just hook it up and forget it) - this goes triple if using lithium-chemistry batteries!!!

For the servos, you will need to find out what voltage they support, but most like 4.8 - 6.0 volts. To that end, in order to run them, you need to drop the voltage from the battery to that level (DO NOT use the 5 volt output of the Arduino - it can't supply enough current). Your best bet is to use what is known as  "BEC" in the hobby R/C world (Battery Eliminator Circuit) - it's basically a voltage regulator packaged up for the R/C world:

http://www.amazon.com/FPV-Focus-2S-8S-Switching-Regulator/dp/B00LPRGPJC

That one will output 5 amps at 5 volts; most BECs are integrated as part of a speed-controller - you'll have to look around to find a standalone unit, but that one above should work OK. It's a switching regulator, so it is fairly efficient as well. You could run both the Arduino and your servo easily off of it (and bypass the wasteful linear regulator on the Arduino).

One other thing:

You might want to put a fuse of appropriate size in-line with the positive output of the battery, just in case of any shorts or over-current issues. Measure (or calculate) the maximum amount of current used for all of your devices at once, add the current values together, add 10 percent, then select a fuse that comes close to that value.

Doing this is cheap protection in the event you need it. The alternative can be much worse (the battery catching fire or exploding).
47  Using Arduino / General Electronics / Re: Beginner Soldering iron Choice on: August 10, 2014, 01:11:00 am
First off, stay away from that first 35 watt Weller (WP35) you posted; while I am sure it is a fine iron for certain work, it is likely way to hot for a beginner to use, and it isn't temperature controlled.

The second Weller (WLC100) you posted seems like a better bet; temperature controlled and such - it's not a bad price, either - just realize that such an iron is going to take a while to come up to temperature (about 10 minutes).

The third Weller you posted (WES51) is a much better iron - it will heat up quickly and stay at temperature properly. But on both of those Wellers, you really have no real idea what the temperature actually is, just a number on a knob.

I second Chagrin's suggestion of the "936 clone" - for example:

http://www.amazon.com/Tekpower-Digital-Soldering-Station-TP936D/dp/B000QFN1DC

These are clones of a popular Hakko soldering station - they are great devices.

Also as a beginner, be sure to pick up and use leaded solder (60/40 or 63/37) - much easier to use than non-leaded, and you want every advantage you can get while learning. Make sure to get rosin-core (NOT acid-core) solder - the kind meant for electronics (acid-core is typically meant for joining metals - like pipe).

You might also want to either pick up some liquid flux or make some of your own; actually, just pick some up - then look into how to make your own once you are used to using it. For most stuff it isn't needed, but sometimes it can be helpful. Make sure the flux is for electronics (rosin-based flux). For instance:

http://www.amazon.com/SRA-80-Soluble-Soldering-refills/dp/B008QPT8R2

Beyond the soldering iron, you should also invest in a tip cleaner. Whatever you do, don't use a wet sponge. While it will work, over time it will destroy the tip on your iron. You can go cheap and find a real copper scouring "pad" and stuff it into a cheap steel pipe-cap from a big-box home improvement store (it works just fine - I built one myself), or you can buy one:

http://www.amazon.com/Aoyue-Soldering-Cleaner-sponge-needed/dp/B005C789EU

Other items to consider:

Some kind of "third hand" device to hold what you are working on - these can be built (plenty of instructables out there) or bought. They typically consist of either a vice-like device or something with aligator clips. Over time you'll probably collect a few of each.

Desoldering tools (the best way to learn to solder is to de-solder stuff, and re-solder it back on - use some kind of junk electronics board) - the number of tools here seems endless - there are bulbs, pumps, desoldering braid, etc - all of it is useful, so you might as well pick it all up.

You might also want to look into a set of used dental picks - you might ask your dentist for any old ones that are no longer useful for his practice (make sure to boil them at home just in case). Such tools are useful mainly for re-work and cleanup, as well as desoldering - on thru-hole boards and parts.

When I learned to solder, it was with a cheap 25 watt pencil iron - no heat control or anything. As such, I can pretty much solder with anything, but I have found that I like a temperature controlled iron. Just realize that it isn't the tool that makes you a good solderer; practice, practice, and more practice is what will. You can easily solder with a non-temperature controlled iron (even that 35 watt Weller) - you just have to know how such an iron responds to the environment and your joints, and how to move fast and precisely - adding only the heat you need to make the joint, then moving on to the next. After all, back in the day, soldering was literally done with an iron the size of a hammer and heated with a blowtorch - granted, this was during a time when everything was point-to-point, and semiconductors didn't exist, but the point still stands.

Good luck, and enjoy your new hobby!
48  Using Arduino / Project Guidance / Re: RC car hack on: August 10, 2014, 12:45:03 am
Can you read the information on the IC's on both the transmitter and the receiver?

If you can - and you see anything like what is detailed in this "mega thread" - then you need to read that thread completely:

http://forum.arduino.cc/index.php/topic,86883.0.html

The ICs you photographed seem to have the proper number of pins to be of the TX#/RX# chipset "family" - you have also identified some of the pins; matching those up to the pins in the various datasheets detailed in that mega thread should get you everything you need to be able to control the vehicle.

Indeed - if you read that thread closely, toward the end I put a link over to another thread (and there is a link from that thread to the "mega thread" as well) whereby an individual was playing around with having the Arduino control the IC directly using a single pin, and emulating the pulse output that is normally provided by the transmitter.

In fact, since you have both the transmitter and the receiver - you should be able to use the transmitter and identify the pin from the radio on the receiver which feeds into the IC (an oscilloscope or similar would be handy to find this) - it will be a repeating square-wave style pattern. From there, you can see what the pattern is for each function on the transmitter, and what the frequency is as well. Once you know that, you could have an Arduino emulate that pattern, and feed that pattern into the IC in lieu of the receiver - thus allowing complete control of the vehicle using only a single pin!

Again - review the thread I posted - there is a ton of information in that thread, which is better to review than to rehash again here.

49  Using Arduino / Motors, Mechanics, and Power / Re: L298 question on: August 08, 2014, 07:33:28 pm
Here's the likely datasheet for your motor:

http://www.pittman-motors.com/Brush-DC-Motors/14202-Brush-DC-Motor.aspx

The 30.3 volt variant is listed in the table.

The key to finding the information (sometimes) for these motors is to take the number from the markings (in your case, "MT14202C652-R2") - and start knocking off parts while googling.

Generally, manufacturers use letters to designate differences in model numbers, so to find your motor, I first struck off the "-R2" and googled it. When that didn't work, I struck off the next bit ("C652") - with that, it worked ok by googling "Pittman MT14202". Note that the model # has changed to "DC054B-2" as well.

As you can see, while it's no-load current is fairly small (190 mA), it's peak current is fairly large (11 amps!) - much too large for the L298 (at least when loaded).

Hope this helps to sort things out...
50  Using Arduino / Project Guidance / Re: Trying to source strong (and cheap) electromagnets on: August 05, 2014, 11:48:50 pm
Long shot - but rather than trying to use electromagnets - which have a permeable ferrous core (which as designed is mean to shunt the magnetic field closer to the device) - why not just use plain coils instead, with the steel ball acting as the core?

In a solenoid, the core is "pulled into" the middle/center of what is essentially an air-core coil. The same thing is done by a so-called coil gun (the projectile is "pulled along" by the air-core coils).

So - wind your own coils - I would get some heavy gauge wire (so you can dump a lot of current through it), and wind some coils of about a hundred or so turns (maybe "cable lace" the layers together) on a cardboard or wooden dowel close to the diameter of the steel ball.

Make one, and experiment with it using a fairly beefy power supply (something that can source a lot of amps - your current power supply may be sufficient; you'll have to measure your coil resistance and calculate the amperage drawn for the voltage its run at).
51  Using Arduino / Motors, Mechanics, and Power / Re: Hardware options for Stepper Motors on: July 27, 2014, 01:36:43 pm
What are the pros and cons of driving a bipolar stepper motor with a motor driver IC, like the TI DRV8824 (perhaps packaged on a carrier board like Pololu's http://www.pololu.com/product/2131), vs. using the Arduino Motor Shield based on the L298, or perhaps just an H-bridge as documented in the links in the documentation for the Stepper Library?

Likely that TI chip is more efficient than the L298 - so that would be one thing it would have going for it.

On the other hand - in theory using the L298 (or better, your own custom driver system using discrete components or some other mosfet-based h-bridge or half-bridge chip) - driving it directly with the Arduino would potentially allow you to experiment with your own software-based chopper driving system (via code and such - you would need to implement a current feedback monitoring system, too) - different stepper drive modes, etc. Again, in theory, all of this could be done going that route.

If I used a 8824 or similar driver chip, would I be able to use the the Stepper library, or the AccelStepper library?

Unlikely - as you have noted:

It looks like these libraries are designed to handle controlling the 2 stepper coils directly, while the 8824 would do this itself, providing higher-level direction and step inputs.

Yes - the 8824 does everything for you. I bet if you looked, you could even find someone who has already created a library for the Arduino to make interfacing with the Pololu 8824 fairly easy - if not, such a library wouldn't be difficult to write (and would help others).

The thing you are likely missing about the L298 is that in the case of stepper motors, it wasn't meant to be used alone except in really low-cost applications (such as a DC h-bridge controller or for stepper motor uses where cost was a main factor) - there is a companion chip called the L297 which is meant to be interfaced to the L298, and it provides a lot of additional functionality to the L298 when used for stepper motor applications (take a look at the L297 datasheet, and reference the L298 datasheet side-by-side to see what I mean).

Even so - the pair of chips likely doesn't give everything that the 8824 does, it will have a larger layout on a PCB, and it won't be as efficient.

Then again, if you used that pair of chips, you still couldn't use the existing Arduino stepper libraries with it, because they weren't designed for that combination.
52  Using Arduino / Project Guidance / Re: Projector hardware? on: July 27, 2014, 01:24:44 pm
You could use an old-school galvanometer movement.

This could actually be more expensive and/or more difficult than anything else.

If you try to do anything like this without proper positional feedback (on professional galvos, this is usually done via capacitive or optical sensing) - you'll get a mess on the output.

More expensive if you decide to go with actual galvos - those aren't cheap (even used unless you get really lucky), and you need two of them; you also need proper driver boards (with feedback sensing), supplies, etc.

More difficult if you attempt to build your own galvos - which can be done (a few people have done so), but it requires a lot of time, effort, and money to build one, then duplicate it. Lots of fiddling with parts placement, etc (coils, magnets, positional sensing devices and more); then you still need to build custom drivers and feedback electronics to control the parts. Once you have something working, then you're back to tuning, etc. You'll be spending an equal - or likely longer - amount of time building the galvo system than you will on your primary project.

Again - open loop isn't the way to go here, but it can be done if you don't expect quality results (the output will look like a serial killer's scrawl at best). Basically, you want your positioning system to have low mass and high speed, with little "ringing" (settlement at stopping points). Feedback is used to achieve this in actual galvos; with homebrew open-loop "galvos" the problem is that the system usually has high-mass and no way to counteract this (because it is open loop).

One possibility (which will work ok - but still won't be ideal) would be to use bipolar stepper motors for the galvos (with a mirror mounted on the shaft); you energize one set of coils to "hold" the rotor, then you drive the other set of coils to work against the first set. The stepper will "vibrate" as you "position" (based on the voltage polarity, amount, etc). There's a bit on the internet on how to do this - again, it isn't the best method, but it works ok compared to other open-loop designs.
53  Using Arduino / Project Guidance / Re: What class do I use to make server. on: July 27, 2014, 01:10:00 pm
I assume you are referring to:

http://arduino.cc/en/Reference/Ethernet

If you look at that - note the following:

http://arduino.cc/en/Reference/ServerConstructor

Note the link for "Server" is referenced as the "ServerConstructor" - and reads:

"Server is the base class for all Ethernet server based calls. It is not called directly, but invoked whenever you use a function that relies on it."

Therefore - you NEVER call this; it is a constructor method - and is invoked automatically. Now note the following:

http://arduino.cc/en/Reference/EthernetServer

Which reads:

"Create a server that listens for incoming connections on the specified port."

As you can see - that is the method of the Server class you want to be calling.

In fact, the example code in that section appears to be everything you need to get started - essentially you would replace the "server.write()" portion in the if-then inside the loop() construct with your code to take the bytes written, and interpret them as you have already explained.
54  General Category / General Discussion / Re: don't understand the meaning of a warning in a motor driver board user guide on: July 26, 2014, 06:15:46 pm
I also don't understand "impending" in that context.
I think the "can't long time use high level" is related to their spec that "This driver can operate at 0% -99% PWM modulation duty ratio". It is saying you should not drive the motors at 100% (high level) for too long, although they don't specify what a "long time" is.

That's exactly what it means.

This driver needs to be driven with a PWM signal only; you can't supply a steady HIGH state (ie - PWM=255) to it, because it likely uses an all N-channel MOSFET design, and needs the PWM switching states to keep the high-side boost circuit running properly. Otherwise, the high-side MOSFETs will stop conducting - I'm not sure if that will cause damage in some manner, it might.

Since they specify a 0-99% PWM rate - if you're using PWM of 0-255, then you would be limited to the values 0-252 (where 252 => 99% of max PWM on the Arduino).
55  Using Arduino / Programming Questions / Re: Need help with code for autonomous rc car on: July 26, 2014, 06:03:28 pm
Im amazed you never learned what a state machine.

I've known 30 year professional programmers who didn't know what a state machine was (likely they just didn't know the name, but probably used the pattern often - heck, I'm that way about certain "common patterns" - I don't know the names, because I never went thru an academic setting to learn software patterns - so some patterns I use and understand, but don't know they have a "formal name" so to speak). Anyhow...to answer bdavis21's question, "what is a state machine?":

A state machine is a processing and decision structure designed such that the computer (and note, it doesn't have to be a computer - but today it typically is) is in one of a number of different "states" - and stays in that state until some particular condition is met, at which point the state is changed to cause the system to move to another state.

Typically, state machines in most programming languages are implemented using switch-case logic - though this isn't always necessary; it is certainly possible to implement a state machine using other logic decision operators and statements.

A simple state machine could be as follows (pseudocode):

Code:
state = 1 // initial state

do
  a = readSensor()

  switch (state)
    case 1:
       if a > 10 then state = 2
       break
    case 2:
       b = readOtherSensor()
       if b < 55 then state = 3
       break
    case 3:
       setLampOn()
       state = 4
       break
    case 4:
       if a < 10 then state = 5
       break
    case 5:
       setLampOff()
       state = 1
loop

So here we can see that - as the system is looping it is in a state (1) to check a sensor for a value - if that value becomes greater than 10 it changes to the next state (2), where it checks another sensor for a value less than 55 - if that value is less than 55, then it changes to the next state (3), where it turns on a lamp, then sets things to go to the next state (4). In this state (4) is a check for the original sensor to fall below the value of 10 - if so, then the next state (5) is set, which turns off the lamp, and resets the state back to its original state (1) - to begin the cycle all over again.

During this time, the loop continuously runs - it is never "halted" or anything else. This - along with some extra code - is the essence of the whole "blink without delay" example (essentially, that example is a state machine with two states - one where the LED is on, the other where it is off, and the controlling condition is the amount of time which has passed). Since the code never halts, you could use this to allow for the ability to have many different "tasks" or "processes" running at the same time, rather than pausing to wait for something to happen (which is error prone, and typically will lead to other side effects in your program - especially for robotics).

I hope this helps to explain what a state machine is, what it is for, how to implement it, and why you might want to use it for your system.
56  Using Arduino / Project Guidance / Re: Converter videos from VHS to digital (hd mp4) on: July 26, 2014, 05:35:04 pm
I want to convert my VHS videos to a digital format only

Echoing the others: Again, what role do you envisage the Arduino playing, because honestly - there isn't really a need for the Arduino for this process.
57  Using Arduino / General Electronics / Re: H-Bridge component for designing 24V ,10A motor driver on: July 12, 2014, 02:26:43 pm
Any solution ?

By "driver", are you meaning or wanting to design a discrete component system (ie - using individual mosfets for the h-bridge, etc) - or are you looking for a "single chip" solution (plus any extra parts) - and how to design the circuit for that?

If the latter - then you would do best to see what current driver boards are using (such as the one posted on Ebay), and find out what chip they use, then get the datasheets, etc for that chip - and become familiar with the reference design, etc contained in those documents so that you can lay out such a board.

If the former, though - then you will have a long row to hoe, so to speak. You need to become intimately familiar with a whole host of topics and parts for creating such a driver: Understanding p-channel vs. n-channel mosfets, more generally how to implement an all-n-channel mosfet bridge, high-side drivers (how they work, how they can be implemented, that or use of IC high-side driver chips for all n-channel designs), how to properly size the mosfets (and potentially any heatsinks - though your current requirements are low enough that if you can obtain n-channels with a very low Rds(on) value, they could be mostly eliminated - but if you didn't understand what I just said - well, again, more learning); then there is the actually software controls, other interfacing, elimination or prevention (or protection) against shoot-thru, etc.

In short - if you really wish to learn discrete h-bridge design, at the current levels you are wanting you will need to be prepared to spend some money, because you may be blowing FETs left and right. If you do go down that route, I would personally try to find and use FETs that are smaller with a small motor (maybe 12 volts at 1 amp or so) - that way, as you blow parts, you won't blow a budget, plus you'll still get the design experience and knowledge needed for implementing the larger bridge in the future (hopefully, with fewer costly mistakes).

Oh - you're also going to want to invest in a good oscilloscope and power supply, if you haven't already got these tools - if you insist on going down the discrete component design path.

I'm not trying to discourage you here; you've stated this is for learning, and there is nothing wrong with that. I'm just wanting to make sure you understand that it won't be an easy or inexpensive route to take. If you are good with that, then - go for it. Beyond that, I don't have any specific design knowledge or experience to impart.

Good luck.
58  Topics / Robotics / Re: artificial intelligence robot. on: July 06, 2014, 07:51:37 pm
yes  cr0sh i agree you but could you please post me an better link to know more about AI. even though i search in google i am unable to find a proper one  smiley-eek-blue

The thing is, your not going to find much on simply googling "artificial intelligence" - it would be like expecting to learn how to program in C++ by googling "computer science" (not the greatest analogy, but good enough for now I think).

If you really want to learn about artificial intelligence - you'll need a foundation to work from, and you'll need to put in the work. I posted a couple of links to courses via Coursera and Udacity. Take a look at those, and maybe also other coursework those organizations offer. Neither course will be easy (although I found the Coursera ML Class to be easier than the Udacity class) - you will need to have good grounding in statistics, probabilities, and linear algebra to make headway and understanding. Each course takes about 6 to 8 weeks to complete (working a few hours each evening, plus some extra on weekends).

Once you have that understanding, then you can start looking into machine learning concepts outside that scope, plus topics on neural networks and such. I have to also say that the Udacity course, while the more difficult of the two, will give better understanding on how to relate artificial intelligence and machine learning concepts to a robot - since that is the point of the course, to teach you how to "build" a self-driving vehicle - it is after all taught by the guy behind google's self-driving car.

There is so much information out there on such a vast and wide array of topics under the "artificial intelligence" umbrella; many of them relate to robotics, but you have to understand and have that foundation to know how they relate. Also - much information is only available in book form, so you may want to build your library.

Also - you may want to check out this Udacity course as well:

https://www.udacity.com/course/cs271

It was first released as a Stanford class back in 2011 as well (I took it but had to drop out about halfway through due to personal issues). When it was taught then, you had to get this book for the class - which is a great book to learn from (it's a textbook, though - so realize that if you get a recent edition, expect to pay a lot of money):

"Artificial Intelligence: A Modern Approach"

http://aima.cs.berkeley.edu/

Finally - though these books should be considered "dated" - I like to recommend them; they are mainly an example of something now known as "subsumption architecture". At the time (late 1970s - early 1980s) which was before Rodney Brook's machines - the author was just playing around with some interesting "homebrew" technology of sorts. In the end, his machine that he named "Rodney" became this robot, which was sold for a while for educational purposes:

http://www.rbrobotics.com/Products/RB5X.htm

Anyhow - the author's name is "David L. Heiserman" - his books are:

Build Your Own Working Robot - #841 (ISBN 0-8306-6841-1), HB, © 1976
How to Build Your Own Self-Programming Robot - #1241, (ISBN 0-8306-9760-8), HB, © 1979
Robot Intelligence...with experiments - #1191, (ISBN 0-8306-9685-7), HB, © 1981
How to Design & Build Your Own Custom Robot - #1341, (ISBN 0-8306-9629-6), HB, © 1981
Projects in Machine Intelligence For Your Home Computer - #1391, (ISBN 0-8306-0057-4), HB, © 1982
Build Your Own Working Robot - The Second Generation - #2781, (ISBN 0-8306-1181-9), HB, © 1987

Note that all of these are long out-of-print - if you want to read them, you'll have to purchase them used or find another source. They are very interesting to read, and give a great idea about the "state-of-the-art" in hobbyist robotics for the time period. Virtually all the examples contained in those books could be easily re-created using an Arduino and a simple robotics platform (heck, you could probably do most of it with the Arduino Robot). But again, they shouldn't be thought of as teaching "modern techniques of artificial intelligence" - they need to be looked at and understood with hindsight from today's understanding and knowledge (that's also one of the problems with AI - being able to know what "old stuff" is still relevant, and what isn't).

59  Topics / Robotics / Re: artificial intelligence robot. on: July 05, 2014, 06:32:05 pm
i am preparing my coding now onward. i just ordered a robot chassis on ebay and i am waiting till it arrive  smiley-wink. here is a piece of my code below.

What you coded is not artificial intelligence - it's also not an expert system. It is merely a simplified decision tree of sorts to potentially avoid obstacles based on what the sensor(s) report.

There is no self-learning involved in the decision tree; it will always make the same decisions given the same inputs.

I am not saying that such code can't work - I am just saying it is not artificial intelligence. An artificial intelligence algorithm - if it were implemented - would actually behave quite poorly at first. The robot would blunder into things, wouldn't be able to get "un-stuck", etc. But over time, it should be able to learn how to avoid obstacles (with only the occasional blunder).

Now - that isn't to say that eventually, it wouldn't "evolve" the same rules that you (as a programmer) could hard code into the system in the beginning. What it might do, though, is come up with a far better set of rules that would work for most cases. Then again, it might not - it might actually evolve a set of rules that are sub-optimal (this is called "getting stuck in a local minima").

I am not sure what it is you are wanting to implement; a simple set of rules for obstacle avoidance, like you have coded (note - I didn't review the code enough to know if your code will actually work as you intend it to) - or if you are wanting a robot to self-learn those rules by blundering around and figuring out the rules itself...
60  Topics / Robotics / Re: artificial intelligence robot. on: July 05, 2014, 06:24:17 pm
What cr0sh puts forward is an expert system: it relies on an algorithm based on how an expert would handle the circumstances. The algorithm is turned into code, and then the device behaves as the expert would have.

No - I am not postulating on an "expert system":

http://en.wikipedia.org/wiki/Expert_system

"In artificial intelligence, an expert system is a computer system that emulates the decision-making ability of a human expert. Expert systems are designed to solve complex problems by reasoning about knowledge, represented primarily as if–then rules rather than through conventional procedural code."

Those "if-then" rules are also typically represented in a "fuzzy logic" manner; the output of an expert system is typically given in percentages - that is, when the solution of the expert system is arrived at, via the user answering a series of questions presented by the expert system - the solution will be something like "...with 97.32 percent certainty" - or similar output.

What I was proposing was more akin to a machine learning algorithm - and I was trying to simplify the explanation of the process in such a manner without having to get into some of the more esoteric areas of artificial intelligence research - which I admit that I am not an expert on myself - but I have studied the topic at a hobbyist level, and I also took the following courses and passed them (both were very fun and informative):

https://www.coursera.org/course/ml

https://www.udacity.com/course/cs373

BTW - here's an example of self-learning robotic car (namely a neural network) that came out of the ML course (which I originally took when it was presented by Stanford in the Fall of 2011 - the Coursera version of the class came later, but it's the same course):

http://blog.davidsingleton.org/nnrccar/

Anyhow - my point is that what I was trying to describe was an algorithm that attempts to learn which direction to turn best, based on input parameters. Those parameters could be numerous, but imagine a system where the robot "scans" (with an ultrasonic sensor) the area in front of it. It could potentially have multiple obstacles in front of it, at different locations and distances. Now - when it scans, it could build up a "knowledge map" of where things were and how far away they were, then use that information to try to look up in its past knowledge map of what it did in the past, and how successful it was. If it finds something in that map, it could try it out. If it works - then great, update the map to say that it worked again, with a greater probability (my number was "0-10" - 0 being least likely, 10 being most likely; you could easily use a number between 0 and 1 if you would rather work with floating point values, but I was again simplifying things). If it doesn't, lower the probability, then try something else (either re-select out of the knowledge map, or try a random choice of direction, and update the map with that new choice and it's outcome for future tries).

BTW - I am using "knowledge map" here meaning something akin to an array list - not any actual "map" or anything, just to be a bit more clear.

You should be able to see that there isn't any explicit "if this, then turn this way, else turn that way" logic. At first (because the knowledge map is empty) - it's a random choice based on the inputs (what the robot senses); then as the knowledge map is built up, and there exist potential matches (notice I say "potential" - all of this stuff is based on probability matches - not -exact- matches) - those may be tried instead, and depending on how things work out (ie - does the robot get unstuck or does it collide with the object it was trying to avoid?) - the knowledge map is updated (ie - the probability scores for the selected action), etc.

I can't really make it any more clear, only to say it isn't an expert system, it's not a set of rules, and that the program in the computer (controller, mcu, etc) updates it's internal set of states (ie - it's knowledge map of what to potentially try and do based on it's sensor readings) in a continuous fashion as it explores the world. Initially that "map" is empty, but over time it builds it up - hopefully improving as it goes along.
Pages: 1 2 3 [4] 5 6 ... 378