Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Master/Slave Connection with Netduino's?


  • Please log in to reply
11 replies to this topic

#1 karthick

karthick

    Member

  • Members
  • PipPip
  • 12 posts

Posted 25 September 2011 - 11:33 AM

Hi Master/Slave connection....is this possible? i have been trying to connect two netduino's using I2c Bus ... i couldn't achieve it... Any suggestions pls.....

#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 25 September 2011 - 12:37 PM

I don't think Netduino/MF supports the I2C slave mode. The most simple, yet reliable way to exchange data between two (or more) Netduinos are using the UART. Until you don't use the RS232, you may wire the two boards without any additional hardware. Supposing to use the COM1 on both the Netduinos, wire the I/O #0 of the first board to the I/O #1 of the second one. The other wire is the complementary. Cheers
Biggest fault of Netduino? It runs by electricity.

#3 karthick

karthick

    Member

  • Members
  • PipPip
  • 12 posts

Posted 25 September 2011 - 04:02 PM

I don't think Netduino/MF supports the I2C slave mode.
The most simple, yet reliable way to exchange data between two (or more) Netduinos are using the UART. Until you don't use the RS232, you may wire the two boards without any additional hardware.
Supposing to use the COM1 on both the Netduinos, wire the I/O #0 of the first board to the I/O #1 of the second one. The other wire is the complementary.
Cheers

Hi Mario

Thanks for the valuable information... i will Try this and hope i get through this problem....

#4 Vassili

Vassili

    New Member

  • Members
  • Pip
  • 7 posts

Posted 26 September 2011 - 12:53 PM

What is max wire length, connecting two Netduinos using UART?

#5 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 26 September 2011 - 01:55 PM

What is max wire length, connecting two Netduinos using UART?

It depends on the cable quality, and the baud-rate.
If you want to use normal wire (i.e. without any shield, nor impedance adapting), you might consider up to 1mt @ 9600 (maybe 19200). If you keep the wiring shorter than 10-15cm, you may increase the speed up to 115200.
Anyway, there are several factors to consider.
Cheers
Biggest fault of Netduino? It runs by electricity.

#6 Vassili

Vassili

    New Member

  • Members
  • Pip
  • 7 posts

Posted 29 September 2011 - 01:06 PM

It depends on the cable quality, and the baud-rate.

Thanks for your answers.
Using CAT5 helps? What is the best solution to connect master N+ and couple of Netduinos in a distance of 20 meters? What about 100 meters?

#7 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 29 September 2011 - 01:31 PM

Thanks for your answers.
Using CAT5 helps? What is the best solution to connect master N+ and couple of Netduinos in a distance of 20 meters? What about 100 meters?

For cabling over 10-15 meters the standard RS232 is not supported, and may not work.
For our devices working in very hard conditions, we support up to 1.5km cabling with RS485.
However, under the following conditions:
  • baud rate 9600 or 19200 (38400 max), parity=E, bits=8, stop=1;
  • the cable must be a twisted-pair coax with shield;
  • the termination must be 120 Ohms;
  • the RS485 hardware is opto-isolated (that's for better decoupling, especially against lightnings);
  • if more than slave connected, the wiring must be a single path (not star).
Of course these are industrial requirements, but are *VERY* reliable.

There are many other solutions, even (maybe) cheaper, but it depends on what you are going to do.
For example, is it a generic approach to deploy several systems, or just one in particular?
Will the cable run along a heavy noisy environment (e.g. big motors, industry, etc)?
Is it more important the reliability of the communication, or the economy/simplicity of the system?
Biggest fault of Netduino? It runs by electricity.

#8 Vassili

Vassili

    New Member

  • Members
  • Pip
  • 7 posts

Posted 29 September 2011 - 09:21 PM

As mentioned before the purpose connect Netduino Plus with couple of Netduinos in a distance from 5 to 30 meters with RS485 interface in a flat or a house. Got information that on such short distances with CAT5 cable no needs for termination resistors. What IC should be used for this simple project? Have found here: http://www.sparkfun.com/products/10124 can this be used on both ends with CAT5? Or simple CAT2 also suitable for this project?

Thanks.

#9 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 30 September 2011 - 04:04 AM

I would prefer the CAT5 cable. Also it is probably acceptable avoiding the terminal resistor for so short distances. However, I would not get the baud-rate over the speeds that I mentioned above. The RS485 breakout is okay, but you must use an extra I/O to drive the transmission. This is quite normal for the RS485, but you can't perform the standard timings required for (e.g.) Modbus. That's because Netduino runs managed code, which is not real-time. The result will be probably a longer overhead of delays, so that the overall throughput is much lower than the actual baud-rate. Cheers
Biggest fault of Netduino? It runs by electricity.

#10 Vassili

Vassili

    New Member

  • Members
  • Pip
  • 7 posts

Posted 11 November 2011 - 10:46 PM

Thank you for your detailed answers, have upgraded my N+ to write in my favourite VB, so will try. Results of my prototype connection with two Netduinos over RS485 and 30 meters wire will post here after my tests.

#11 Jay Dee

Jay Dee

    New Member

  • Members
  • Pip
  • 1 posts

Posted 24 April 2012 - 08:43 PM

I don't think Netduino/MF supports the I2C slave mode.
The most simple, yet reliable way to exchange data between two (or more) Netduinos are using the UART. Until you don't use the RS232, you may wire the two boards without any additional hardware.
Supposing to use the COM1 on both the Netduinos, wire the I/O #0 of the first board to the I/O #1 of the second one. The other wire is the complementary.
Cheers


Quote:
The most simple, yet reliable way to exchange data between two (or more) Netduinos are using the UART

Question:
(or more)?
can anyone point me in the right direction for conecting more than two Netduino's together as a simple network.
i dont want two have to use my Netduino Plus bords, it seams a waste, i have spair Netduino's and i am trying to work out how to connect 4 of them together, one running an LCD displaying basic data colected from the other three.
I have two connected fine with UART but i carnt work out how to implement more.

any help gratly apresiated.

regards

Jay Dee

#12 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 25 April 2012 - 03:36 AM

Quote:
The most simple, yet reliable way to exchange data between two (or more) Netduinos are using the UART

Question:
(or more)?
can anyone point me in the right direction for conecting more than two Netduino's together as a simple network.
i dont want two have to use my Netduino Plus bords, it seams a waste, i have spair Netduino's and i am trying to work out how to connect 4 of them together, one running an LCD displaying basic data colected from the other three.
I have two connected fine with UART but i carnt work out how to implement more.

any help gratly apresiated.

regards

Jay Dee


How far are they each other?
Biggest fault of Netduino? It runs by electricity.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.