Guys i'm planning to use two arduino. One will output a data and the other one will recieve the data.. Is there a specific range of wire between this two MCUs?
When the wire between arduino is 5m? does it affect the data that will be transfer?
Guys i'm planning to use two arduino. One will output a data and the other one will recieve the data.. Is there a specific range of wire between this two MCUs?
When the wire between arduino is 5m? does it affect the data that will be transfer?
It may... it all depends on the type of wire, how good the connections, protocol, type of communication and baud rate.
So I think it may be best to give it a try first, or use a MAX232 or 485 (or is it 422??) to drive the communication down the wire.
MAX232 or 485 or 422 are all good.
RS232 only needs three wires - Tx to RX one way, Tx to Rx the other way, and Gnd.
Depending on the speed selected, could be all one needs for 5m.
I have some arduino's that talk to each other over 110 feet of wire or so (could be a little longer); the Tx goes out thru a 74LS04 and the receiver inverts it back. Only going at 4800, but it works great.
if your not on a budget you may try some wireless communication
transmitter RF Link Transmitter - 315MHz - WRL-08945 - SparkFun Electronics
receiver RF Link Receiver - 4800bps (315MHz) - WRL-10533 - SparkFun Electronics
or this transceiver http://www.sparkfun.com/products/9582 - which can act as transmitter or receiver
CrossRoads:
MAX232 or 485 or 422 are all good.
RS232 only needs three wires - Tx to RX one way, Tx to Rx the other way, and Gnd.
Depending on the speed selected, could be all one needs for 5m.I have some arduino's that talk to each other over 110 feet of wire or so (could be a little longer); the Tx goes out thru a 74LS04 and the receiver inverts it back. Only going at 4800, but it works great.
Sir can you explain or give me a tutorial about this. My main purpose is using multiple LM35 temperature sensor without wireless communication. But LM35 need to be at the side of MCU to be more accurate. That's why i will do:
LM35->Atmega ------------------------------------------------>LM35->Atmega----------------------------------------->LM35->Atmega->LCD
Seems pretty straightforward :
Arduino #1 reads data from LM35, sends Serial.write (data) message to Arduino #2
Arduino #2 receives the data, adds it to the data from its LM35, sends Serial.write (data) message to Arduino #3
Arduino #3 receives the data, adds it to the data from its LM35, writes it to the display.
5m should be no problem. Use a low-ish baud rate and twisted-pair cable connected like this:
Arduino nearest power source | Arduino far from power source | |
---|---|---|
Twisted-pair #1 | Connect to TX & Gnd | Connect to RX only |
Twisted-pair #2 | Connect to RX & Gnd | Connect to TX only |
Twisted-pair #3 | Connect to V+ & Gnd | Connect to V+ & Gnd |
Of course you can skip one of the pairs if communication is uni-directional.
Your string of arduinos might look something like this, using Prominis as an example (as they fit nice on a schematic).
tim7:
5m should be no problem. Use a low-ish baud rate and twisted-pair cable connected like this:
Arduino nearest power source Arduino far from power source Twisted-pair #1 Connect to TX & Gnd Connect to RX only Twisted-pair #2 Connect to RX & Gnd Connect to TX only Twisted-pair #3 Connect to V+ & Gnd Connect to V+ & Gnd Of course you can skip one of the pairs if communication is uni-directional.
Sorry sir, but i can't understand it. What kind of wire will i use in this connection? It would be better for me if it has picture. Sorry i'm not good at this.
If all you are needing is remote temperature sensors you might consider using
directly attached DS18B20s instead.
You can easily get 10-20ft and with proper wiring and termination
that can extend to 100+ feet. Multiple sensors can even share the
same single wire for measurements.
--- bill
i wanted to suggest that but the cost of an DS18s20 @ digikey its 5.1$ compared to LM35 which its 1.7$ (price for one item) and didn't looked like a good suggestion
but you can buy cheaper DS18s20 from ebay 10 items for 30$ w/ free shipping
putyn:
i wanted to suggest that but the cost of an DS18s20 @ digikey its 5.1$ compared to LM35 which its 1.7$ (price for one item) and didn't looked like a good suggestion
but you can buy cheaper DS18s20 from ebay 10 items for 30$ w/ free shipping
These guys have them much cheaper. About $1.75 for quantity 1 and very cheap shipping.
http://www.taydaelectronics.com/servlet/the-(-IC-)-Integrated-Circuits-cln-Temperature-Sensors/Categories
I have bought various products from them several times.
Not as large a stock of merchandise like a digikey but what they have is very well priced.
(great prices on things like caps, resistors, transistors, voltage regulators, RTC chips, leds, crystals, resonators, etc...)
While the LM35 is cheaper about ($1 vs $1.75), by the time you consider what it takes to use them in
remote applications, the DS18B20 can quickly end up being cheaper.
For example, in this case if all that is needed is remote sensing you no longer need but a single Arduino
which more than likely can reduce the overall project cost and definitely reduces the overall software complexity.
I prefer the DS18B20 over the DS18S20 - Cheaper and more features.
--- bill
much cheaper wonder how much its the shipping + handling costs
thanks for sharing the link
but one question why are they so cheap compared with others places you can buy them ?
Shipping is very cheap even for small orders. ($5 USD minimum order)
You can see shipping costs by putting a few things in the cart.
The question shouldn't be why is this so cheap, but why are the
other guys able to charge so much?
The internet and search capabilities is a beautiful thing in that
now price is no longer a function of locality.
(I have other links to inexpensive electronic hobby stuff, PM me if interested).
--- bill
Sorry guys but i really need to use LM35 temperature sensor. Can you guys help me. What is the furthest range from LM35 to the Arduino. Maybe i need .5m to 1m. And i need to use 4 LM35 scattered in different sides of the ARduino..
May I ask if range 0.5m or 1m is alright from the LM35 temp sensor to the Arduino. Can i Ask what formula will i use to get an accurate measurement
It puts out 10mv per celsius
so first you convert the 10 bit value to millivolts
AnalogRead(pin); //dummy read to get rid of possibly false reading
Rawvalue = analogRead(pin); //reading from lm35
Mvvalue = rawvalue / 5; // convert to mv
Then interpret to celsuis
Celsiusvalue = mvvalue / .01; //to celsuis mv/c
You can then convert to fahreinheit if u want or use that
you may also want to average a punch of reading to smooth it out
But warning the adc isn't always perfect and you may get spikes from other sources, even on a short line, a longer line just means more possible interference, a small cap will help that
Is 0.5m or 1m okay?
Yes, use wire thicker than 26 SWG.
Grumpy_Mike:
Yes, use wire thicker than 26 SWG.
Do you have any idea what is the name of that wire?
Sorry i don't have any information about different kinds of wires.