Show Posts
Pages: 1 ... 336 337 [338] 339 340 ... 377
5056  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Arduinos IN SPAAAAACEEE! on: March 08, 2010, 06:21:33 pm

So - is this all just some kind of "thought experiment", with some notes that come out at the end to be filed away for later for when it seems that launch prices are coming waaaaay down? Beyond that, I don't see much practical need.

If you were designing something for harsh earth-bound environments, then I could at least see the possibilities. For space-bound (and lunar-bound) devices, even if you managed to gather all of the information, then design and built a device, it would still be a moot point because it is unlikely that, within your lifetime or your children's lifetime, that the political will and technology will be there to enable ordinary people to put stuff into orbit or send it to the moon.

The energy costs alone are that huge. You should know this. Unless there is some breakthrough in energy research (sustainable fusion?), space is simply out of reach for all but large multinational corporations, and governments - and so far, only government entities have managed to put men in orbit, on the moon, and send devices to other planets, orbit the sun, and out of the solar system.

Even if there is an energy breakthrough, you still have the political issues to solve; we could loft large buildings into orbit TODAY, were it not for the lack of political will (and a pesky thing called the above-ground nuclear test ban treaty). The population gets real butt-achey about anything with the word "nuclear" in it, because they are ignorant and selfish, mainly. Too bad that the only thing that will effectively get us off this planet, and out among the stars, will most likely have to be nuclear powered.

The thing is, all of the problems you are asking about are pretty much solved. They were solved a long time ago (and the vast majority of the information regarding them is free for the asking for US citizens, because it was paid for with your parents tax dollars). You can go ahead and attempt to re-engineer them, but as soon as it does become cheap enough to go into orbit and then to the moon, those companies which have solved the problems will simply pull some plans off the shelf, build the vehicle, and launch it. They'll probably be able to do it cheaper than an individual could. Just don't expect this to happen in the next 50 years - or even a hundred.

If you are simply doing a thought experiment, why ask here? Have you researched at your library? At university libraries? Have you travelled to Cal-Tech (JPL) and did some research there? Have you looked online? The answers to your questions are all there; tons of books and papers have been written covering all of them.

Honestly, there isn't much special - for most of it, you do what you can with light-weight materials for shielding, put the rest behind certain kinds of mass/matter (lead is one, there are others), then use redundancy with voting (for the processors), as well as watchdog interrupts and such, and you still have to pray. Getting rid of radiation is mainly done with external heatsinks and a "slow roll" to even out the temperatures involved. You also need to think about dust and such (once on the moon); sealed systems, positive pressurization, etc - can help with that (but eventually, it will fail).

As others have noted, you can learn a lot just by trying to design something to deal with harsh earth-bound issues (for instance, I am constantly amazed at the design and evolution of the iRobot Roomba - the floor is a very harsh environment for a vacumming robot!). If you can get something to survive a month in your backyard without fixes or updates, your next step would be to stick it in the Black Rock desert for a year; if it can survive there, it can probably survive on the moon!
5057  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Does Arduino Mega require a motor shield? on: March 15, 2010, 02:09:07 am
What I would do is look into writing an interface control program on the Serializer to take commands via the serial interface, and control the rest of the platform. Then, interface the Arduino Mega to the Serializer. Set up the control program so that everything about the Serializer is exposed via serial commands, burn the code onto it, and leave it, never to touch it again except for debugging. Offer to those who want to migrate from the Serializer.

If you wanted to "rip" the Serializer out, though, it looks like you would need to add your own h-bridge controllers to replace what was on the Serializer; fortunately, these are well available and documented - there are several companies that make a variety of modules (Pololu, for instance) for h-bridge motor control that can be interfaced to the Arduino, and none of them are expensive.

As far as the batteries are concerned, it depends on how they are hooked up; if they are in parallel (for double current capability at 9.6 volts), then you can hook it up to the external input to go through the regulator; if they are separate (one powers the Serializer, one to the motor voltage inputs on the Serializer), then you can do the same with the Arduino Mega and whatever h-bridge driver you use. Only if they are wired in series to provide 19.2 volts will you need to do something different (lots of options are available; the easiest would be to separate the packs, unless the motors require such higher voltage; then you might want to add a split in the pack to give a 9.6 volt leg for the Arduino's external voltage input).

As far as the encoder wire is concerned, it will depend on the h-bridge; you might find one with an encoder input, but likely you would just run that to a digital input on the Arduino, and monitor that in code (it isn't what you would call a "native" support; but you might be able to find an encoder library out there somewhere - or, if it doesn't exist, you could be the first to code one!).

Hope this helps...

5058  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: newbie, dumb question - have read - tried to find on: March 13, 2010, 02:10:00 am
It's just going to take me awhile to review what you said, but yahoo! so now we can do embedded ourselves, what a great state the technology is at.

It's always been possible for a long time for hobbyists to do embedded CPUs in their projects; it hasn't always been cheap, but it has been possible. For instance, a 6809 CPU board (or a Z-80 board, for that matter) is fairly easy to design and connect up, only a few support chips are required (typically the cpu, some memory, and some control logic for the bus; plus clock, eproms, etc).

What has always been difficult was programming the beast; early (mid/late 1970's thru early 1980s) embedded designs, like you saw on early hobbyist robotic designs (as presented in old TAB books), typically used toggle switches to hand-assemble hex codes for the assembly instructions into each memory location (basically this was the design of the Altair and other early S-100 bus computers of the 1970s).

There were other ways of getting code into these systems; typically involving EPROMs that only held a few K of code, and using a special programmer (which tended to be relatively expensive) to dump the code into the chips, then they were read by the CPU at boot time. Serial monitor software and BASIC interpretors were common.

When the 8051 came out, it was like a sea-change; there was finally a system cheap enough and could use standard C compilers to create code with; it opened up a lot of new ground. Then the PIC came along, which revolutionized the whole electronics scene (shifting it from using discrete components to blink an LED to using a small microcontroller to do the same thing, and more).

Mainly it was a cost vs ease-of-use thing; today we have very cheap microcontrollers that are more powerful (in some ways) than early personal computers, and cheap (free) tools to create code and easily upload to the chip (so no need for special programmers or such).

It really is a very interesting time to be alive and experiment with this technology! We've come a long way just in the past 15 years; the next 15 years may just prove to be amazing...

5059  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: newbie, dumb question - have read - tried to find on: March 13, 2010, 01:56:27 am
Here's the thing, though - inserting and removing the ATMega chip from the Arduino can be difficult (like all socketed DIPs); use a  small flat-blade screwdriver (not the jeweler kind; you want one that looks like a regular flat flared-blade screwdriver, only tiny), slip it under one end, and twist it a little side to side, put it in a little more, twist a little, and keep doing this until is it fully loose, then you can pull it free fairly easily.

Putting in a new ATMega will require you to slightly bend the pins inward on a flat surface (they also make a tool for this) - this is because fresh from the factory the pins are spread out a bit, and are very difficult to insert into the DIP socket without potentially bending one or more pins.

If you plan on doing this kind of task more than a few times, you might want to consider building a ZIF socket shield for programming bootloaded ATMega's; examples of such a board can be found on the site (I think in the playground?); SparkFun also has an example of such a board.

Basically, it is a shield (a protoboard shield PCB should work perfectly; in many cases you also have a reset button and LEDs on the shield as well, which are both very useful to have) in which the pins brought up by the headers are connected to the appropriate pins on a 28-pin ZIF socket to match the ATMega8/168/328 pinout. You have to then supply your own 16 MHz resonator/crystal, plus the loading capacitors (18-22pf), because the crystal connector pins on-board the Arduino aren't brought up via the headers. Remove the ATMega from the Arduino board, install the custom ZIF shield, then install the ATMega into the ZIF socket; the board at that point should work as it normally did, but it will be much easier to swap out bootloaded ATMega ICs for programming at-will.

So far, I haven't found a vendor of such a shield anywhere, so it is currently still very much a DIY project...

5060  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: newbie, dumb question - have read - tried to find on: March 13, 2010, 01:34:16 am
Is it possible to program a chip with the arduino, then disconnect the arduino and just have the chip run by itself?

I am going to make an assumption here, and assume by "chip" you meant the ATMega168/328 that is on the Arduino board, correct?

So, you are asking "is it possible to use the IDE to program the ATMega168/328 (with bootloader) on the Arduino board, then power down the board, remove the chip, then put it in something else, and have it run?".

The answer to that question is "yes" - there are a few extra parts needed if you want it to continue to run at 16 MHz (otherwise, you just need to supply 5V and ground, and the internal clock running at 1 MHz will be used - some timing related code will be affected, I believe); these parts are mainly the 16 MHz resonator/crystal and 18-22pf parallel loading capacitors (all of which are very cheap). If you want to continue to be able to program it (in-field programming), you can supply a set of header pins for rx/tx and use an FTDI cable, or you can supply an ISP header and use an ISP programmer to upload the .hex file of the compiled sketch.

Is this what you were asking?

5061  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Servos vs DC Motors? on: March 13, 2010, 10:16:53 pm
Well, from some of the replies, I'm baffled because if you go to Adafruit you can get a continuos rotation servo.

These are standard servos which have been modified in some manner to allow continuous rotation; using the term "servo" with these is kind of a misnomer, as they are no longer servomechanisms, but rather gear motors with a built in controller for direction of rotation dependent on a specific PWM signal for command input.

It used to be that you had to modify a servo to get it to continuously rotate, but now some manufacturers sell them pre-modified (they can be useful in certain R/C contexts), or vendors modify them and then re-sell them as modified.

I have never ordered from them, but they seem to offer very cheap servos (not as cheap as direct-from-china ebay sellers, but almost as good), plus a lot of other hobby R/C parts:

These guys are expensive, but they offer some interesting higher-power servo solutions:

5062  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Cheap, small , project boxes on: March 13, 2010, 08:51:33 pm
I just bought a small clear plastic box today at Staples (an office supply store); it was an impulse buy - I was walking around the store when I spotted a display filled with small plastic boxes. I remembered this thread, and...

I found one that was a little larger than an Arduino - it can easily hold the Arduino and my prototyping shield together; I've only done a test fit, but it looks like you would have to put the Arduino in a far corner of the box in order to be able to drill/cut holes for the external power supply input and the USB port; I might play with it some tonight if I have the time after I work on cleaning my shop.

It cost $1.79 US.

They had one that was smaller, but I wasn't sure the smaller one would be able to fit an Arduino inside. They had another with the same footprint as the one I bought, but about twice as tall (you could probably stack a couple more shields on and it would still fit - I think it was the .3 or .7 litre version). Several other sizes were also available. They were all fairly low priced.

They were made by this company:

Mine is the "0.2 Liter - Small business card size box"; it looks like these:

...but it is clear with blue snaps. It feels pretty sturdy, and has reinforced corners (its kinda molded like a small milkcrate). With the lid and snaps closed, it is a surprisingly sturdy box. I also just noticed another thing: if you look at that photo above, notice the holes on the snaps? There are corresponding holes on the box lid; you could easily use four small machine screws to secure the lid down! Pretty neat, huh? Its almost like they designed it to be used as a project box! In fact, it seems like all of their boxes are designed in this manner...
5063  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Cheap, small , project boxes on: March 12, 2010, 11:02:39 pm
If you have them in your area, dollar stores typically sell cheap plastic storage containers in a variety of sizes. Craft stores also sell cardboard, wooden, and plastic containers for storage and crafting. There's also discount retailers (like TJMaxx/Ross) that sell decorative boxes that could be repurposed (some would make awesome boxes for steampunk designs).

5064  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Buying parts in small batches (I'm a noob) on: March 12, 2010, 11:24:14 am
Ebay is suprisingly a fantastic place for components. A lot of chinese vendors on there who sell the components at much lower prices than other vendors, and I haven't had any problems. Also good for hard to get items.

Right now it looks like the only place you can go to in order to get small quantities of ATMega168/328 chips; both Digikey and Mouser are out-of-stock, at least until May-July (?) - but there are tons available in China and Asia (check - compared to Digikey and Mouser - you'll see what I mean).

So, all the drop-shippers in Asia are selling low quantities of these parts - the only problem is that they don't seem to (?) be combining shipping! So, you may be able to get 5 pieces of a 168 for $2.50 each (cheap), but shipping is $5.00 per piece (!!!), which is really, really STUPID.

Of course, I haven't checked with the seller's to see if they will combine shipping, but nothing on any of the item pages indicates that they will do so (small rant: I hate what Ebay has become - I miss bidding on old electronics and such - does anyone have any suggestions on good auction sites run like Ebay used to be, where I can dicker and bid on old electronics items and other garage sale junk? PM me if you do).

But that's just those parts, mainly - and if you are only looking for one or two, maybe the uncombined shipping isn't that bad (still seems like a ripoff, though - I mean, you could probably order 1000 from some supplier off ic2ic if you wanted to, and you wouldn't likely pay even a dollar per to ship them).

I don't know why there is a preference (or market forces?) keeping those chips in Asia (are they doing nothing but churning out Arduinos and other ATMega-based stuff?) - but you can't get them otherwise. It kinda concerns me (I had a small rant here, but I am leaving it off).

5065  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: 4-Button Sequencial Code using Arduino ? on: March 12, 2010, 11:20:30 pm
BOTH the programming part and the "which one" to choose.


If you haven't ever done it, then look at the examples in the IDE, peruse the online reference, check out code in these forums, and check out the playground; try the examples, try changing them to do different things or make them work differently; try combining the code you think you need. Look online for circuit examples, etc and then try to adapt them. If you have a concern, draw up a schematic as best as you can, write up your code, and post it in the appropriate area on these forums for help.

Ultimately, what most of us don't want is to do your work for you; if you show us you are trying, though, we will help you get the rest of the way and hopefully expand your understanding of the Arduino, programming, and electronics.

As far as "which one" for the project:

You will likely be best served by prototyping your project using a regular ole' Arduino Duemilanove (that's Italian for 2009, I believe); later (after you have things debugged) you might want to get a smaller version, or build an RBBB (Really Bare Bones Board), or roll-your-own (standalone). Don't worry about getting a "Mega" or one of the other "big boards"; they aren't needed for your learning, and the extra features might confuse you.

You'll also want to invest in a breadboard and some jumpers; I recommend Elenco for their breadboards (I've had one of the smaller ones for almost 20 years now and it still works great) - they are more expensive than other brands, but worth it IMHO.

Get a set of good jumpers (either straight or flexible - each person has their preference; I prefer straight for on-board runs, with flexible between separated boards or components); for your initial project you'll also want a relay (5V SPDT is fine), some NPN transistors (2N2222 are perfect), a selection of resistors and some cheap standard red LEDs - you might also want to get some pushbuttons, small toggle switches, maybe an 8-position DIP switch, some rectifier diodes (1N4004 is fine), a 7805 voltage regulator (or two), and a 4-cell AA battery holder (for 6 volt output - you can use a 7805 regulator to drop the voltage down properly). You might also want to pick up a cheap servo or two.

Those are the basic parts. Pick up a storage box with compartments to hold the components as well. Eventually, if you really get into this hobby, you will have many rows of those multi-bin storage cabinets; I have several myself, and will probably be shopping for more this weekend (part of my ongoing "clean up my shop" effort)...


5066  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Cheapest chip supplier? on: March 12, 2010, 11:26:05 am
I've seen 168s on Ebay for $2.50 US each, approx (drop-shipped from Asia); the problem was the advertisements didn't say the seller combined shipping, and shipping was $5.00 per piece! I have yet to contact any of the sellers.

5067  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Few questions about the power of the Arduino on: March 11, 2010, 12:22:28 pm
Many performance problems are due to poor software design, not the Arduino hardware.

I'd say that more than a few performance problems are caused not just by software design, but system level design included.

Too often an individual or group will come up with an idea, and rush to implement it without fully understanding what the constituent parts do; they don't understand the processes each unit or area manages, nor what those processes entail, or how the inputs and outputs to and from those processes affect the system as a whole.

Instead, they just throw money and hardware down the drain.

The better approach is to design the whole system (to the best of your knowledge and ability), breaking down sub-units of the system into processes, understanding those processes and what resources they require, and how they affect other processes or units, and how others effect them in turn. Those processes may be further broken down into their own sub-processes. Re-iterate, plan, and design as needed.

Once you understand the whole, you can then intelligently, rationally, and logically decide what parts or resources are needed to accomplish the goals of each area; maybe one are needs an entire PC, while another can get by with a microcontroller, and a third only needs a 555 timer, and maybe a fourth an LED or something. Doing this will save you time, effort, and money in the long run. While it can be arduous and mind-numbing to do, if you truely want to be successful you will do it.

This isn't to say you have to go this route; but sooner or later you will find yourself in this position, and it is better to have a handle of some sort on it beforehand, rather than finding out years down the road that all of the processes have grown "organically", and no one understands what is going on or how anything works, then you have to reverse engineer everything already accomplished just to understand how you got to that point - and then you find out where the problem lies because your process maps and flowcharts look like the squiggle from "The Dot and the Line"...

What I wrote above applies equally to processes and problems like a circuit design, a piece of software, a building, a corporation, or a country and its government. Unfortunately, humans in general are all-to-poor at proper planning like this (and it shows).
5068  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: why should I use a H-Bridge on: March 10, 2010, 04:25:08 pm
The trick is not to have inputs that you can put in that way, so on a simple level this means having only one input and taking the inverse of it to drive the other half of the bridge. Look at a chip like the UC2714, the data sheet has a block diagram of the sort of thing you need.

So basically the two inputs become "direction" and "enable", instead of two logic inputs, right? Guess I have a small amount of redesign to do, then - but no problems...

5069  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: why should I use a H-Bridge on: March 09, 2010, 10:39:39 pm
So half the batteries drive it forward and half of them backwards. It doesn't make for a very even battery usage. You end up changing them all when only half are discharged.

Yeah - this was a problem with it; but it shifted the extra cost to the user, away from Milton Bradley...  ;D

Can't see why you say that if all LEDs are on there is still a short through the transistors of the bridge.

Ok - so how do you design a "safe" h-bridge such that no matter what the inputs are, there isn't a direct short? That is the question I would like to see answered - that, or how do I ensure that the outputs of the Arduino are always in the "safe" position? Right now, my only answer to the question is to delay the power-up of the h-bridge until I am certain the Arduino has everything set properly (via some kind of "enable" pin or something), coupled with a fuse on the power supply rail feeding the h-bridge.

Seems kinda like a hack.

5070  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: why should I use a H-Bridge on: March 08, 2010, 06:30:16 pm
without an H bridge you can only control the speed of the motor in one direction

Actually, on the Milton Bradley Big Trak, they used a weird "half h-bridge" design with a dual ended power supply; only two transistors used per motor.

Regarding h-bridges: on another thread, someone mentioned that using only NPN transistors for such a bridge could be a bad design; it wasn't said, but I got the gist that it was better to use NPN on one half, and PNP on the other. I have designed an h-bridge using 2n3055 NPNs (TO-3 cases), but after hearing that information, I looked into other designs - I found this:

If I used the 2n3055 complement (MJ2955) for the other half, is this really a better design? It seems safer (ie, no possibility for SEDs/FEDs), and would allow me to implement coasting and braking (something I can't do with only NPNs?).

Am I looking at this wrong? Is there a way to use only NPNs and still get the safety from shorts? I am already using opto-couplers, and only drive one half at a time - but if both halves are high, fireworks (I imagine!) could appear...

Is an NPN only h-bridge safe, or -must- you use complementary pairs? If I have to re-design, no big deal - I am just looking for some feedback (PM me if you want).

Pages: 1 ... 336 337 [338] 339 340 ... 377