Show Posts
Pages: 1 ... 311 312 [313] 314 315 ... 375
4681  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Blink - Flickering??? on: October 16, 2010, 02:40:15 pm
Is the LED -only- the on-board LED, or are you using an external LED as well?
4682  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Serial communication with PHP on: February 21, 2010, 10:21:36 pm
soup:

Something minor I noticed about your code; it obviously had nothing to do with your problem, but was something to keep in mind (for this small sketch, it really doesn't matter - but for larger projects, it might matter a lot)...

You declare the variable "inByte" for reading from the serial port as an integer...[stop]

soup - I am not asking the following of you, but if you know, please chime in...



Ok - I just went to the Serial.read() function definition on the Arduino site:

http://arduino.cc/en/Serial/Read

I just noticed that it reads:

"Returns...the first byte of incoming serial data available (or -1 if no data is available) - int"

Why isn't the return value of this function a byte, instead of an int? Aren't integers on the Arduino defined as 2 bytes long?:

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

So - why does Serial.read() return an int, and why doesn't the documentation match up? Also, what is the return value type for Serial.available() - it isn't mentioned in the documentation, either?

 :-?
4683  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Arduino for flight simulation on: October 12, 2010, 10:27:19 am
Lots of shift registers and analog multiplexors?

Actually - you might be better off designing a custom "standalone" arduino-controlled board with several addressable SPI/I2C-based shift-registers and ADCs...

Or - go with an Arduino Mega...

Another solution to throw in the mix (though not a complete solution, I don't think - I think its for digital i/o only) would be a Centipede shield...

 smiley
4684  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How to transfer my finished arduino to stripboard! on: July 14, 2010, 05:54:41 pm
Quote
I just want to connect it the first time to upload a sketch and test it.(its going to be put in circuits for lights home applications)

For something like this, you would actually want to place the individual ATMega controllers on a serial bus of some sort, or communicate with them wirelessly, not run a USB->serial converter to each one. By putting them on a bus (say RS-485 - but there are other options), you can have a single one of them hooked up via the convertor cable (the "master") to which you send the commands, and then it would relay the commands to the rest of the system nodes (the slaves) on the network.

With that said, what you are trying to do is not going to be inexpensive, unless you are willing to integrate components (some SMD based - and even doing this may not get you in the "under 10 euro" range) into the standalone as well. For instance, for RS-485 connected or wireless nodes, you would need to embed not just the microcontroller, but also the communications hardware involved - whether it is an RS-485 bus transceiver IC, or a wireless RF transceiver board).
4685  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How to transfer my finished arduino to stripboard! on: June 29, 2010, 06:33:40 pm
Quote
and how do i find which atmega has the right bootloader for my arduino duemilanove board???

Bare ATMega microcontrollers don't come with a bootloader by default; the bootloader, if there is one, is either put on by yourself, or if you are buying pre-bootloaded ATMegas, it was put on by someone else in the supply chain. Hopefully, if you are buying such a pre-bootloaded chip, the person/company you are buying it from can tell you which bootloader they put on it.

Regardless, though, if in doubt, flash your own! Note that this may require experience and tools you may not have; since you are asking these questions, I can almost say for certain that you lack both, so you should stick (for the time being) with pre-bootloaded chips, and talk to your vendor.

 smiley
4686  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How to transfer my finished arduino to stripboard! on: June 29, 2010, 05:49:04 pm
Quote
I am working on atmega328 but i want to know which are the other atmega chips that are exactly the same but they are smaller in size....

Compiled code size doesn't tell the whole story; there's also the number of variables (and their types) you use, and a few other details (most minor) that may be relevant.

That said, the other two most direct options would be the ATMega8 and the ATMega168 - which have 8K and 16K of program space available (6K and 14K w/ standard bootloader, respectively). They also each have smaller SRAM sizes than the ATMega328, which is where the question of "how many and what type of variables are you using?" comes into play. Look at the spec sheet for more details.

Finally - while you can still find them, I think production has shifted to predominently the 328, so keep that in mind as well. Really $6.00 each (provided it is pre-bootloaded) isn't that bad, unless you are talking a major production run (in which case the number can be brought down some by buying thousands, and no bootloader - even so, it is still an expensive chip for a production-run product).

 smiley
4687  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How to transfer my finished arduino to stripboard! on: June 24, 2010, 06:00:24 pm
Quote
In my proposed use, there is no real need for the timing to be closely synched as each chip is going to be handling differing data and outputting independantly anyways.

Most applications with multiple micro-controllers don't need it, but there could be certain applications where it would be desireable or necessary (for instance, a multiple micro-controller parallel processing implementation where you need things in tight sync for the code to work properly between/across the processors, or perhaps where you have two processors on the same address bus sharing memory - those kinds of apps).

In that kind of a situation, you need an external clock circuit, and there are other issues related to timing and clock signal trace lengths that can come into play (though less likely at the slower speed of the ATMega - but it is still possible, depending on the distance between the processors on the PCB and a whole host of other reasons). This is an area where things can get arcane and touchy; one of the "magic" areas of electronics and computer design (generally in electronics, when things start moving into the analog realm - which of course all electronics is based on mainly - it starts to almost become an art instead of a science - magic!).

 smiley-wink
4688  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How to transfer my finished arduino to stripboard! on: June 24, 2010, 04:37:37 pm
Quote
When mounting more than one Atmel onto a board, I take it that the power supply can be shared amongst say 3 chips, howver, what about the crystal?

Of course you can share the power supply, provided it can provide enough current to handle everything you are running off of it. If you are running multiple processors and other things, you have to add up the currents you are expecting to be able to size the power supply properly - don't just throw a regulator on there and hope.

As far as the crystal is concerned...

Let me say this - I know of at least one person who has done this successfully with -2- ATMegas; he had them running in tight sync with each other. Whether it could be expanded to more, it is unknown.

With that said, you -should not- do this; it isn't the proper way to provide an external synced clock to multiple devices. There are clock driver chips out there that -can- provide a synced external clock to the ATMega, but you would have to use avrdude to set the fuses properly to handle this application.
4689  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How to transfer my finished arduino to stripboard! on: June 24, 2010, 02:25:48 pm
Quote
I hear what you are say and I can't disagree with the possible failure mechanism, however I've cycled chips into and out of my Arduino 328 clone board literally hundreds of times and have never had a problem. I've also plugged the chip in backwards and off-by-one a couple of times without chip or board damage, but of course I don't recommend one do that on purpose.

Maybe they've gotten better since the 1980's? I know that on the old 8-bit microcomputers that I started with, it was always warned about such things (and people now experience them directly refurbishing these old machines), especially in regards to memory (which was a bunch of plug-in DIP RAM into sockets).

Perhaps they've made the socket's metal contact springs out of better material since then? Or maybe you've gotten lucky with your board?

There is one thing about a ZIF socket, though - its much easier to put an IC in it and extract it than from a regular socket (which is easy to bend pins on)...

 smiley
4690  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How to transfer my finished arduino to stripboard! on: June 24, 2010, 01:56:46 pm
Something you don't want to do, though, nathanas, is make this a "habit". The reason being that the socket that is on the Arduino board is not designed for repeated insertions and extractions; over time you will wear it out, and contact will become intermittent.

If you absolutely need to do this, there are some options:

1) Switch to bare-bones ICSP programming (will require some investment in hardware, time to learn the process, and a minor update to the Arduino configuration), and put a header for it on your standalone PCB.

2) Continue to use a bootloaded ATMega in your projects, but use an FTDI cable or breakout board and put a header on your standalone PCB for this purpose.

3) Build a ZIF (zero-insertion force) socket interface for the ATMega, either separate from the Arduino board, or as a shield (I've posted before how this might be possible using a prototyping shield, and I think there may be manufactured versions for sale - I also know of an example floating around the arduino.cc website, maybe in the playground somewhere).

One other thing, if you haven't already experienced it: When inserting a new IC into a socket, you may find that the pins of the IC are spread "wide" and the IC doesn't want to "seat" into the socket. Sometimes you can get it in, but more likely you will bend pins if you try to force it.

What you can do first, though, is place the IC on its side, one set of pins against a flat surface, and -carefully- bend them all in a little, then do the other side. They don't need to be bent much, just a tiny bit - but once you do that, it should fit into the socket with less fuss.
4691  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: How to buy Arduino in Ukraine? Please, help on: September 30, 2010, 10:29:33 am
Quote
I found site "sparkfun.com" and that they can ship boards into Ukraine.

Before you go ordering, I would definitely look around some more, especially to see if maybe there are any closer options; surely some place like Seeedstudio (or another Chinese supplier?) could ship you one?

Don't get me wrong, I like Sparkfun - but they are a little closer to me than you (I live in Arizona, USA), and I still find their prices a little high, but reasonable for a US distributor. You would not only be paying that premium, but the extra expense of shipping...

Good luck with your search!

 smiley
4692  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Connectors on: June 14, 2010, 10:00:06 am
Quote
I think i'm going to use cat5.  I already have cable, wall ends, ends and crimper.  It looks like for ribbons i'd have to buy another tool set.

For IDC connectors all you really need is a way to apply pressure all the way across the connector evenly (you can get by with a pair of pliers, but it isn't recommended); typically a small, cheap bench vice will work OK. You might also try a pair of welder's pliers (they have wide and flat hinged jaws for clamping metal together for welding). But a bench vice is the best deal, and from a chinese import tool shop should cost more than $10.00 US for a small one.

Quote
Any negatives on using cat5?  I will be passing power through it.

EDIT:  And I cut it down to 8 wires I need.

It is OK to use for the application you are likely looking at, especially since people use it for tethers on underwater ROVs, passing power down it and video/data up it.

I would say it has one downside, unless you are lucky and have stranded core wire (rare to see, actually, but it does exist). That downside would be that as it is repeatedly flexed, the wires inside the cable can easily break. Depending on how you have it going through that door, and how much it will be bent/flexed, will determine how long it will last. A ribbon cable w/ IDC connectors would be a better solution in the long run.
4693  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Mechanical Prototyping on: September 20, 2010, 03:20:44 pm
There's also balsa, coroplast, foamcore...

Add some bondo and/or fiberglass, etc...

Then there's polymorph/shapelock plastic (melts in very hot water; when cooled, it has the consistancy of nylon - easy to machine and work with, too).

 smiley
4694  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Mechanical Prototyping on: September 20, 2010, 10:12:46 am
Quote
We had a load in my last year of primary school.

Well, consider yourself a lucky SOB; that stuff makes Lego look inexpensive - of course, given its capabilities for prototyping and design, its no wonder.

 smiley
4695  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Mechanical Prototyping on: September 19, 2010, 06:19:50 pm
I personally just "bodge" things together, since I haven't got an interest in going from "prototype" to "production", yet - my "prototypes" are the "finished model".

What other options are there?

Well, there is fischertechnik - an expensive option, certainly.

Other things to look into:

Gridbeam (you could scale it down):

http://gridbeam.biz/
http://www.gridbeamers.com/

MicroRAX (small t-slot):

http://www.microrax.com/

Quote
Are there any good software-based solutions?

There probably are, but they probably aren't cheap (or easy/quick to learn). For instance, software like 3DStudo Max, Blender, and others could be used to create 3D models and such, but to build a complex virtual working example will be a lot of effort (heck, just creating a simple model isn't easy). Google Sketchup might be an option. Then there are expensive (and not so expensive - even free open source if you know where to look) CAD/CAM packages (AutoCAD and others on the top-end, of course). I would also imagine there are complete prototyping on-screen "lego like" packages out there, but I can't imagine them being too inexpensive...
Pages: 1 ... 311 312 [313] 314 315 ... 375