Author Topic: connect many microcontrollers to one pc in the same time  (Read 2834 times)

0 Members and 1 Guest are viewing this topic.

Offline MahmoudTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
connect many microcontrollers to one pc in the same time
« on: October 04, 2011, 04:59:25 PM »
hello
how can i connect many microcontrollers to one pc in the same time via one serial port
these microcontrollers will give data to computer it will be a code like 1234
this will determine the place of microcontroller and what does he want there will be a program in computer to translate this code

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
    • http://www.garrettgalloway.com/
Re: connect many microcontrollers to one pc in the same time
« Reply #1 on: October 05, 2011, 06:53:39 AM »
I would say the best option might be to create a 'master' microcontroller and set up a small bus (TWI, SPI, etc.) network amongst the microcontrollers. The master controller could then relay the data/commands in either direction.

-garrett

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: connect many microcontrollers to one pc in the same time
« Reply #2 on: October 05, 2011, 05:01:04 PM »
Hi,

how can i connect many microcontrollers to one pc in the same time via one serial port
these microcontrollers will give data to computer it will be a code like 1234
this will determine the place of microcontroller and what does he want there will be a program in computer to translate this code
You cannot do this with EIA/TIA-232, as that protocol are for one transmitter and one receiver only.
You could look at EIA/TIA422 or EIA/TIA485, but you'd need the relevant serial port for that.

Depending on the distance from PC to the controller farthest away, you may be able to use a CAN network, IIC or similar.

IR or radio could be possible candidates as well.


What's the purpose of having "many" microcontrollers send single sequences and how many is "many"?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline MahmoudTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: connect many microcontrollers to one pc in the same time
« Reply #3 on: October 06, 2011, 03:51:40 AM »
i want to make a smart restaurant so  a customer can demand his order via a lcd exsist on the table
there will be many lcds connected in the end to one computer in the kitchen this computer will display the order to the chief who will prepare the order and when he finish ,the order will be sent to the customer via a robot  
the robot will move in straight forward path surrounded by tables and will stop in front of  a certain table depending on the information in the computer
so if u can help me on this subject please support me
« Last Edit: October 06, 2011, 06:15:22 AM by Mahmoud »

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
    • http://www.garrettgalloway.com/
Re: connect many microcontrollers to one pc in the same time
« Reply #4 on: October 06, 2011, 05:31:10 AM »
Sounds like this might be a good candidate for ethernet enabled microcontrollers. Wire the resturaunt up as if it were to have wired computers on every table and put the microcontroller with ethernet and LCD on each. Statically assign IP addresses to each of the micros so that you know who ordered what.

http://www.instructables.com/id/A-credit-card-sized-Ethernet-Arduino-compatable-co/
Something like that would be relatively inexpensive and easy to make.
-garrett

Offline MahmoudTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: connect many microcontrollers to one pc in the same time
« Reply #5 on: October 06, 2011, 06:14:04 AM »
can i do this with i2c interface or spi

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
    • http://www.garrettgalloway.com/
Re: connect many microcontrollers to one pc in the same time
« Reply #6 on: October 06, 2011, 06:27:32 AM »
can i do this with i2c interface or spi

I believe i2c is limmited to approximately one meter (~ three feet). I'm not sure but a quick google shows spi to be the same unless the clock speed is brought down to the low khz range, and then some have stated 10ft (~3 meters) as the maximum length of the bus. Both lengths are maximum lengths of the ENTIRE bus - not from node to node.

You could use a daisychained bus and have each micro be both a master and slave device on either protocol to the next micro and simply relay messages from each side. This would not be optimal in my opinion and most cheap micros do not have multiple SPI or i2c controllers. That is not to say it can't be implemented via software, but it would be much easier to use the controller features themselves.


I think ethernet would be the best way to go.
-garrett

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: connect many microcontrollers to one pc in the same time
« Reply #7 on: October 06, 2011, 11:07:34 AM »
Hi,

i want to make a smart restaurant so  a customer can demand his order via a lcd exsist on the table
there will be many lcds connected in the end to one computer in the kitchen this computer will display the order to the chief who will prepare the order and when he finish ,the order will be sent to the customer via a robot  
the robot will move in straight forward path surrounded by tables and will stop in front of  a certain table depending on the information in the computer
so if u can help me on this subject please support me
OK, but is this a school project or something that you want to make for real?

Ethernet, as garrettg8 suggest, will probably be a sensible way of doing it in a real life setting, but if it's a school project and/or a low budget job, current signaling will perhaps be a better way, as it's cheap, takes a single signal wire (+ground) and you don't need to move large amounts of data anyway.
Each controller only need to use a single I/O pin for this.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: connect many microcontrollers to one pc in the same time
« Reply #8 on: October 10, 2011, 08:56:32 AM »
Also, consider my Axon Mote. You can hook up as many as you want wirelessly, with one master Axon Mote connected to your laptop (to control them all hehe).

http://www.societyofrobots.com/axon_mote/

 

SMF spam blocked by CleanTalk