[Closed] Multi Arduino Communication  

  RSS

jrbdeveloper
(@jrbdeveloper)
Active Member
Joined: 3 months ago
Posts: 14
2020-01-11 7:52 pm  

I'd like to suggest covering Multi Arduino communication for PIN expansion and delegation of duties. I am currently experiencing the need to expand on the amount of PINs I can take advantage of on one board. For instance I am using an UNO for an ultrasonic sensor, LCD display, Motor Controller, etc and would like to expand it to add more sensors. I realize that there is the MEGA Arduino but it would be cool to say connect 1 UNO to multiple NANOs and have the UNO serve as the master controller while the NANOs are used as slave controllers to perform other duties. 

Pragmatically the master could issue a request to one of the slaves to report back values is has for a sensor connected to it. Naturally I would scale this up to as many NANOs/Sensors I have needs for. I have been doing a bit of research and came across a few promising things. Turns out there is a library called Wire that could work for me but having you give a deep dive would be really cool!!

 

Thanks for your consideration.

The unexamined life is not worth living - Socrates


Robotics Lab
(@robotics-lab)
Active Member
Joined: 6 months ago
Posts: 15
2020-01-11 8:07 pm  

I would like to see how to code Arduino and raspberry pi


Robotics Lab
(@robotics-lab)
Active Member
Joined: 6 months ago
Posts: 15
2020-01-11 8:11 pm  

 could you do a vid on Arduino due? it is a harder board to deal with it and it would be nice to have avideo on it like the video for "how to code Arduino mini".


byron
(@byron)
Estimable Member
Joined: 10 months ago
Posts: 201
2020-01-11 8:34 pm  

@jrbdeveloper - Once you get to that level of sophistication maybe you are better off working with a board such as the Teensy 4 or the like.  Compared to the uno  humungous power that can still use most of the arduino libraries.  As for communicating master/slave with other boards would not i2c do it for you?   


jrbdeveloper
(@jrbdeveloper)
Active Member
Joined: 3 months ago
Posts: 14
2020-01-11 8:51 pm  

@byron

Thanks for the reply. I had no idea the Teensy 4 existed. That's pretty much where I'm at. I'm really new to the Arduino world of microcontrollers so I suffer from a bit of, I don't know what I don't know. After doing some research it does seem like I2C is the proper route to take which as I understand is Serial communication. At least I'm somewhat certain. I really appreciate the input here because I could use all the direction I can get. 

The unexamined life is not worth living - Socrates


Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 10 months ago
Posts: 1602
2020-01-11 10:26 pm  

@dronebot-workshop

On Topic:

I second a motion for multiple microcontroller communications.   Perhaps the following could all be done in a single episode?

  1.  Serial to Serial communication between microcontrollers.
  2. I2C to I2C communications between microcontrollers
  3. SPI to SPI communications between microcontrollers.
  4. Are there any other methods?

Also could the microcontrollers include both:

  1. Arduino to Arduino
  2. Arduino to Raspberry Pi

This might be too much content for a single episode, but if you could fit it all in it would be a great one to watch!

On The Side:

@jrbdeveloper

John, there are actually many simpler methods of increasing I/O pin capacities for a single controller.  Look into 74HC595 Shift Register and Arduino on YouTube.  There are tons of videos out there for how to increase I/O capacity using these chips. If you need more analog I/O pins, search for videos on 74HC4051 multiplexer chips and Arduino.   You're basically unlimited in the number of I/O you can use with a single Arduino.   At least if you are willing to use some external shift registers or multiplexers.

This post was modified 3 months ago 3 times by Robo Pi

DroneBot Workshop Robotics Engineer
James


jrbdeveloper
(@jrbdeveloper)
Active Member
Joined: 3 months ago
Posts: 14
2020-01-11 10:34 pm  

@robo-pi, sweet!! Thank you for the info! Definitely going to look into this.

 

The unexamined life is not worth living - Socrates


casey
(@casey)
Reputable Member
Joined: 10 months ago
Posts: 363
2020-01-11 11:34 pm  
Posted by: @jrbdeveloper

After doing some research it does seem like I2C is the proper route to take which as I understand is Serial communication. At least I'm somewhat certain. I really appreciate the input here because I could use all the direction I can get. 

Yes the I2C is something I also have to get up to speed on if I want to make use of the hardware modules that use it and I see Bill has an I2C tutorial at the dronebot workshop.  I used to do something similar pumping data out of the bidirectional ports on the old DOS computers but of course I had my own protocol.

 


byron
(@byron)
Estimable Member
Joined: 10 months ago
Posts: 201
2020-01-12 7:25 am  
Posted by: @robo-pi

 

  •  
  • Are there any other methods?

 

If the inter board link is ethernet then mqtt or the newer micro- mqtt might be a good topic

 


byron
(@byron)
Estimable Member
Joined: 10 months ago
Posts: 201
2020-01-12 9:01 am  

And following my mention of mqtt,  the OpenMQTTGateway project linking 433mhz/315mhz protocols, infrared (IR), bluetooth, LoRa, GPS etc. may also be worth a topic.


DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 10 months ago
Posts: 466
2020-01-16 10:00 pm  
Posted by: @robo-pi

This might be too much content for a single episode, but if you could fit it all in it would be a great one to watch!

Yes, it would be the longest video I've ever done, and I've already exceeded an hour on a couple.

I actually have done I2C between controllers already. And I'm planning some SPI tutorials.

"Never trust a computer you can’t throw out a window." — Steve Wozniak


Please Login or Register