Show Posts
Pages: 1 2 3 [4] 5 6 ... 372
46  Using Arduino / Project Guidance / Re: Using Camera Component from USB Webcam on: March 02, 2014, 11:43:18 pm
The arduino is an 8 bit micro controller, how many 1980's computers do you know that had web cams on them. I will tell you zero.

Actually - barring the "web" part of things, I had a digitizer cartridge (DS-69A) for my TRS-80 Color Computer 2 - took forever to capture an image, but it did work...
47  Using Arduino / Sensors / Re: Simple angle measurement on: March 02, 2014, 01:55:55 pm
Have you thought about using a capacitive tilt sensor?

They used to use these back in the day (80's/90's) for 3DOF head tracking sensors (pitch/roll mainly - yaw was done with a compass) before gyros/accelerometers became cheap.

Basically the sensor had a liquid electrolyte and some terminals; one set of terminals was excited using an AC signal, and the other set could read the signal which would change based on the tilt level (which would alter the capacitance). At least, I think that is how they worked (?).

They suffered from "settling" issues - in which if tilted too fast, the liquid would take a while to settle - so that limited read rate (plus they had a limit as to how far they could be tilted, of course).

I'm not sure if they are still available (as a component) or not...
48  Using Arduino / Motors, Mechanics, and Power / Re: RC-Reciever to Servo -- Problem with RC-Lib on: March 01, 2014, 11:31:42 pm
First off - I have never used this library - so this might be the "blind-leading-the-blind" - that said...

...I have to ask - what version of the library are you using?

Because in the examples I see that come with the latest version of the library - specifically the examples referencing ServoIn and ServoOut - neither one of them show the setup and use of an ISR routine or a pin-change interrupt.

I tend to wonder if somehow that may be related to the issue you're having?

Beyond that, I can't offer anything else, other than to ask whether you have successfully been able to execute and use the "ServoOut" example that comes with the library (which seems to be the closest library example to what your example code is doing)?
49  Using Arduino / General Electronics / Re: Are shift registers "relatively new" chips ? on: March 01, 2014, 11:13:59 pm
Shift registers are not new.

The very concept of the shift-register has been around forever. While I've never studied it, there had to be some form of a shift register (both for input and output) in early delay-line (mercury and otherwise) machines; heck, I think that technology original came from early radar systems.

I'm also pretty sure similar ideas were embedded in some of Korad Zuse's designs; I'd be willing to go back as far as Babbage's machines, mechanically (some kind of shift-mechanism was likely needed to transfer information back and forth between the mill and store, for instance).
50  Topics / Robotics / Re: Does a PowerWheels motor need to be powered by a chunky 6v? on: March 01, 2014, 02:24:38 pm
Ok,  thanks. I was just wondering about that. I still would like to use that motor for some other project, so I'll just get the proper battery for it when I figure out what I'll do with it.

Just make sure when you do get such a battery, you hook up a fuse (or circuit breaker) near the positive terminal of the battery, so that it trips in the case of a short or fault. Such batteries can easily pump out well over a hundred amps of current for a short time, vaporizing wires, starting fires - and, in the rare case where the short or fault is over a conductor capable of handling the current - the battery itself can explode.
51  Using Arduino / General Electronics / Re: Cheap power strips on: March 01, 2014, 02:19:52 pm
On cheap power strips I have seen, that is how they are generally set up; most recent ones also include a reset-able circuit breaker rated at 10-15 amps or so. Some also contain voltage spike protection, and maybe a light to show that the power is on to the strip.
52  Topics / Robotics / Re: Does a PowerWheels motor need to be powered by a chunky 6v? on: March 01, 2014, 12:18:09 am
Out of curiosity, what would I need to power this motor using the battery charger as previously suggested? Is it just a matter of connecting the motor directly to the charger as if it was the battery?

No - generally a "dumb" battery charger for an SLA battery is limited to 600 to 800 mA; while the motor may start to turn with no load, it more than likely will just sit there, and potentially burn out the charger.

What you need is a power supply capable of supplying at least several amps in a short burst, and then 1-2 amps continuously - even then, this would only be enough to run the motors with no load on them.

If you want to be able to have some kind of load on the motors, then you need to supply the proper amperage - likely around 25 amps.

Your difficulty will be finding a 6 VDC power supply capable of outputting such amperage (if it were a 12 volt system, you could use a cheap 50 amp car starter/battery charger).
53  Using Arduino / Motors, Mechanics, and Power / Re: Arduino Relays - strange issues on: February 28, 2014, 05:00:16 pm
Okay, now I'm no longer 99% certain it is a NPN, but 98%.

What are the markings on the transistor? If you look those up to get a datasheet, that will tell you...
54  Using Arduino / Project Guidance / Re: Route mapping on: February 28, 2014, 04:51:26 pm
I wonder if designing a robot that would be able to make a map of the house would be feasible.

Yes - it's feasible - but it isn't easy.

Basically, you send it a signal saying 'BEDROOM' and it goes there. I would do the first programming by navigating with a joystick. It would on,y need to know relative data, as it's charging station is on the floor. What it would store would be move 125cm and then 90 degrees and then 398cm and 45 degrees.

And how do you propose to deal with wheel slip? Or obstacles in the way?

Relative navigation and dead reckoning can get you only so far; you (and your robot) will ultimately run into problems in a very short time.

Solutions to the issue vary; for instance, routing can be made simpler via incorporating a line following system (either a physical line drawn throughout the house, or perhaps something more invisible - such as a buried signal wire, or invisible ink/dye lines of some nature); such lines also don't need to be on the floor, either - they can be on the walls, or the ceiling.

You could incorporate barcodes, qr codes, or other forms of fiducial markers to be able to tell orientation and location information to the robot as it enters/exits rooms, hallways, and other areas (of course, this requires some form of machine vision system as well).

You could have active IR beacons in each room, which the robot could look for to know what direction it is facing, and what room it is in (each beacon sends a coded signal to tell the robot information about the beacon and room).

None of this would deal with potential collisions with known or unknown obstacles (a shoe in the way, for instance, or a chair that's been moved, etc). How you would navigate around those would need to be taken into account.

State-of-the-art (mainly research currently) systems don't use these kinds of "tricks", though - they instead use something much more complex and difficult to understand - a range of techniques known as "SLAM" (Simultaneous Localization and Mapping):

You would do well to read the PDF shown in the above article entitled "SLAM for Dummies" - it gives a really good overview of the basics of the technique.

Alternatively, there is the course posted earlier by MarkT - I don't know anything about that course, but I did take the following course back in 2012:

...which was taught by Sebastian Thrun; given his DARPA Grand Challenge winning robots, as well as his work on Google's Self Driving Vehicle - you couldn't ask for a better instructor on this topic. I found the course enlightening and instructive on learning a number of techniques that are often questioned here on these forums, including Kalman Filters and PID - you learn about those techniques, and several others, and by the end of the course incorporate them all into a simple SLAM algorithm to cause a simulated car to navigate a simple maze with obstacles from one location to another while avoiding them - all coded in Python.

55  Community / Bar Sport / Re: The "BAN THE ABOVE" Thread on: February 27, 2014, 12:08:12 pm
Ban Graynomad for being having such a fun time retired in the outback (and cool-as-punch RV)... smiley-grin
56  Using Arduino / Motors, Mechanics, and Power / Re: DIspense very accurate micro volumes on: February 27, 2014, 12:00:31 pm
I wonder if you couldn't use something like Adafruit's peristaltic pump:

...substituting the DC motor used with something a bit more controllable? The pump as-is is rated at 100 mL per minute (about 1.67 mL per second - which is still waaay too high) - but maybe you can find a manufacturer of bare peristaltic pumps that makes one with a small range?

The motor on the pump above is supposed to be a 5000 RPM motor - so in one second it turn approximately 83 rotations; it uses a tri-wheel design, so that means in one rotation it pumps out 3 "squirts" - so 250 squirts in one second.

So - 1.67 mL divided by 250 = 0.0067 mL per "squirt" = 6.68 uL

I think I have that right? If so - then if you got one of these pumps, and hooked up a stepper motor to it, and stepped it just the right amount - it would pump the amount you are looking for (and no idea whether it would be in your error range).

Yep - lot's of if's - but seems possible...? Assuming my calcs were all
57  Using Arduino / Motors, Mechanics, and Power / Re: Arduino Relays - strange issues on: February 27, 2014, 11:46:33 am
That transistor is normally a NPN transistor and a high level at 'IN' activates the Relay.
So I don't understand why a '0' activates the relay.

Actually, on a lot of these el-cheapo chinese units, the circuit consists of a high-side PNP driver, rather than the low-side NPN driver (which you would expect).

Thus - the logic is reversed, and a logic-level LOW turns on the relay, while a logic-level HIGH turns it off.

You can fix this in your code, but this doesn't fix what happens at startup.

You could probably put a TTL hex inverter/buffer after the pin to invert the output (and leave your code alone), and this would fix the problem; its a bit of a hack - but so is the cheap relay unit.

/I honestly don't know why they continue to use this circuit; one would think an NPN system would be better, make logic sense, and possible be cheaper...unless there's a glut of PNP transistors in China?
58  Topics / Robotics / Re: simultaneous localization and mapping on: February 26, 2014, 11:00:01 pm
How I can apply SLAM algorithm in arduino robot ?? With ultrasound sensors
Please any one do this algorithm with arduino mega??

SLAM is not a single algorithm - it is a process that includes several different steps - how those steps are implemented can take many different forms, ultimately resolving (hopefully) into a solution to the SLAM problem.

Examples (open source - there are ton of other solutions out there that are proprietary):

The greatest issue with most SLAM solutions is that they require a TON of memory (and in many cases, a fast "processor" - in quotes because you'll probably want some sort of highly parallel processing system to quickly do the vector math). Implementations can be "small" though - at least the code. This particular implementation (which was designed to use an expensive 2D laser range finder, btw):

...requires only 200 lines of code - but again, probably a ton of memory is needed (maybe if you can hack in extra RAM onto the 2560 Mega - it might be feasible), and it likely needs more than a bit of help for the vector calcs; on a regular CPU, this is probably not a big deal - the compiler can probably optimize things to allow for using multiple cores and such. Different thing on a Mega, though...

Ultimately, you need to come to grips with what SLAM really is, and how - at a high level - the various parts work (the sense/move loop, the mapping, route planning, issues with sensor and positional "noise", etc). You will need to be very familiar with probability/stats as well as linear algebra (vector and matrix math). If you aren't at least somewhat familiar with those, you are going to find yourself in strange waters.

Finally - I would suggest to you to take this free online course (takes about 6-8 weeks; possibly less depending on how you approach it):

(note - they've recently did some updates - there is a "free courseware" version that is at your own pace)

Programming is done using Python (so you need some familiarity with that language); when I took the course back in 2012, I found it explained a number of concepts in a manner that caused "aha!" moments; seriously - this course covers everything needed for a base introduction to SLAM:

1. Localization (Markov and Monte-Carlo)
2. Probability
3. Bayes Rule
4. Histogram filters
5. Kalman filters
6. Particle filters
7.  Motion planning (including breadth-first, A* and dynamic programming)
8. Path "smoothing" (non-90 degree paths)
9. PID algorithm (detailing all parts, and how to optimize p, i, and d)
10. Finally - pulling it all together (Graph SLAM)

Again - I took this course; I found it very difficult (mainly due to my less-than-stellar understanding of probabilities), but very rewarding, also. I learned a ton from this course - I got the above list by reviewing my notes from that time; it was really a complex and in-depth course. I encourage you (and anyone else with an interest in learning about SLAM) to participate in it.
59  Using Arduino / General Electronics / Re: breadboard fat pins and wires on: February 26, 2014, 10:16:28 pm
Components with larger leads are typically built so for higher currents; this doesn't mean you can't use them in your circuits - you may actually have to test a circuit using a particular component at a lower current than that component will ultimately be used for.

However, a breadboard is typically limited to currents of about 1 amp, max:

...anything larger, and the connections on the breadboard won't be able to carry the current (that, and a spring-loaded connection has a higher resistance than a soldered or wire-wrapped one).

I am not certain whether larger lead components that "barely fit" will distort the spring contacts or not; it might depend on how long the leads are left in place, how much current runs through them, age, etc. I myself have a breadboard with some TO-3 case transistors mounted (part of an h-bridge circuit I was playing with)  that I often wonder if they have distorted the connections - I suppose I will find out one day!

I'd say that for brief testing, it's probably not going to be a great issue, but if you want to eliminate the issue, mount the parts off the breadboard onto a piece of perfboard (soldered), and run wires from the breadboard to the parts (note - doing this will depend on your circuit; such extra long wire runs can cause parasitic capacitance issues, distort signals such as "rounding" square waves, allow for the pickup of spurious noise, and several other potential issues to crop up - again, depending on what the circuit is, what it is for, what it is doing, and how fast it is switching, along with amount of current and voltages being used).

Another option - though probably difficult to find today - is to mount the larger parts off-board onto a wooden or HDPE board (ie - a "real" breadboard) using nails/screws and/or Fahnestock clips:

...hmm - well I guess you can still get them; here's one source at least:

So - if you needed to build a higher-current prototype, mounting these clips onto a breadboard (wood or HDPE) would be a more ideal way to go about it.
60  Community / Bar Sport / Re: whats with the attitude on: February 25, 2014, 07:21:35 pm
But ... please "cut & paste" your code, or attach a file, rather than re-typing "approximately" what you did.  I've seen a lot of conversations derailed by errors  in transcriptions: "here's my code", "x is wrong!", "oh, that's correct in the actual sketch!"...  So... how is one supposed to help?  (And it's particularly annoying.)

Yeah - definitely that!

Also ...  post updates of your code as you incorporate advice.  There is little more useless than a follow-up comment of "I did all that and it's still not working."  You don't know which advice has been taken, or whether it was done correctly, or what the code looks like now...

But post the updates as a new post on the thread - don't go back and modify the original post/code/schematic with the update (because then all the comments make no sense at all!)...

Grr - I hate seeing that happen!

Pages: 1 2 3 [4] 5 6 ... 372