Can you daisy chain Arduinos?

Using Mega 2560s, is it possible to link up Arduinos with the VIN pins or I2C or something else so that only the "Master" has DC input and the rest use power from it? I'm trying to make a modular lockout buzzer (AKA "quiz box"), so it would be easier to use if only one box had to be plugged in.

In theory, the Master would be receiving power, and just being told from the other boxes (via I2C) whether or not a different box had been switched.

The chain would have to support at least 3 boxes connected.

Post your schematic.

You could have one Mega controlling the power to the others but one has to wonder why you need that. Indeed, it seems that you have more money than you know what to do with, or you simply aren't trying hard enough. Seeing that you apparently don't mind running wires all over the place, I'm sure you should be able to get one mega to control a lot more than three boxes.

No problem if I2C works in your environment and for your intended distances.

@DrDiettrich I'm fairly new to Arduino and I2C. The boxes are 6x6 inches, so I don't think distance should be a problem? Max of less than 2 feet.

@Nick_Pyner The idea is for these boxes to replace ones that we already have, so they need to be very user-friendly, and closely mimic the original in user input and function.

UNO doesn't have enough pins so I'm using Mega (is there one in-between? The mega is a little overkill, but UNO isn't enough). The boxes need to be able to be used separately or combined, so using the power off one is a convenience.

Find out yourself.

Where do you see a difference between power wires from a wall wart or from another Arduino?

They will snap together (like legos), so the wires won’t be exposed.

You can use male+female connectors (MATE-N-LOK...) to stick one box to another one.

The Mega almost always is "overkill". This suggests you may not understand how to use the pins. Care to explain?

I can's see why you would not just reticulate the power - 5 V - as such to all the boxes via the interconnects.

As always, Nanos would be more practical, but do you need USB connections? I doubt it, particularly for the slaves, so Pro Minis would be the choice. :+1:

1 Like

Can I talk you out of the idea to use the I2C bus ?
An Arduino can be a Slave on a I2C bus, but it will only work reliable if you do everything right. Most Arduino users are not willing to go that far. It also means that you can no longer use a number of libraries that turn of interrupts or use interrupts intensively themselves.

The Arduino Mega has 4 serial ports, and only one is in use. Perhaps you need to add hardware (resistors, diodes) to protect or combine the signals.

Much more data is needed.

How do the boxes connect
What information needs to be passed.

As i see this thread there are two topics.
One about power
One about redesign of the project without knowing what it is doing.
Because there should be simple way to get results and the nonexistent information leaves us in a mystery.

You should be able to pass power from one box to the next. And pass data on some form of robust network.
1wire. CAN bus, RS485, etc, etc...

In answer to your first question.
The sum of all powered devices and sensors outputs etc cannot exceed the available power or the connector ratings.

Which other built-in connection is bidirectional on one bus?

Ok, I will try to explain the purpose of the project. Again, I am very new to Arduino, so I appreciate your patience.

The project is supposed to replace this.

It is a lockout buzzer system that shows who was the first to stand (5 quizzers) and keeps anyone else’s input from registering. Quizzers can jump (the mechanics of jumping don't really matter; by jumping, a circuit is connected) which sounds a tone, and an LED turns on to indicate to the quizzers and to the "Quizmaster" who jumped. The quizmaster hears their answer, then determines if it is correct and the quiz moves on to the next question.

Each box needs to have:

  • 1 PS/2 connector so that the lights that we already have from the old boxes work
    *Pin 1 to seat 1, pin 2 to seat 2 ... Pin 6 is common
  • A sliding switch to disable any seat
  • 12 LEDs (2 pairs of 5 LEDs for the quizzers and the quizmaster to see who jumped, and 2 more so that both quizzer and quizmaster can see the state of the box (See next point)
  • One momentary push-button for the quizmaster to change the state of the box. The box can be in 1 of 2 states:
    ** 1: Default; no buttons pressed or the "Reset" button is being held: All quizzers are unlocked to test their lights. If the quizmaster is holding down the button, the "state" LEDs change color
    ** 2: The quizmaster has released the "Reset" button: Quizzers can jump to answer the question. If they jump, a 32-second timer is started and a tone sounds.
  • A way for the boxes to connect with each other.

Each box is the same, and can be used separately, or in combination with the other boxes. There will be 6 of them.


@dave-in-nj You're right sorry about the lack of details previously.

@Koepel I really know almost nothing about I2C, so I just saw it as a way to connect lots of devices, so yes you can easily convince me otherwise, and I think you have.

@Paul_B Each LED must use one digital pin (x5 + 2 4-pin (one ground) LEDs for a total of 11 digital pins), the seat pads use 5 analog inputs, and the switches to disable the seats. The switches can be in series with the inputs from the seat pads, but that's a total of 16 pins of which the UNO only has 14. I'd be interested in another board, esp. with IoT or something, but I don't think I have a choice.

@DrDiettrich I'll come back to the actual terminal between the boxes once I decide on a protocol for communication.

Sorry for the book... That should be all the relevant data.

That is a somewhat confused description. 12 single-colour LEDs in a matrix is seven pins. 12 RGB LEDs in a matrix would indeed be 12 pins but 12 (or 24, 36 etc.) WS2812 individually addressable any-colour-at-all LEDs all connect to only one pin. :face_with_raised_eyebrow:

The project appears to be possible without a microntroller.

The remotes could be switches.
Internal logic could be relays or ICs

The scoreboard would certainly be an Arduino.

Using an Arduino mega mini would be easiest to allow all the I/O to have simple terninations.

Some changes could be incorporated to enhance the project.


At this point i would recommend that you create a list of switch inputs on the left
Outputs on the right
And PS2 connection requirements

If you need 6 remotes, then you will have 6 copies of the sketch and 6 megas

Why is everyone so keen on selling Megas? :roll_eyes:

Well, I had all of this typed out, and then I made an actual schematic and... um... I'm not sure where I got

from. With all 5 seats, 5 addressable Single colors LEDs (with each address controlling 2 LEDs), and two 4 pin RGB LEDs, that leaves me with one to spare... I can use UNO. I wouldn't mind having some more spare pins to add more switches, but it looks like I can use this.

@dave-in-nj Thanks for suggesting making a diagram... that saved a lot of time.

You are absolutely correct, but I'm new to all of this... If I have a parts list and a schematic, I could figure it out. I looked down the "all logic ICs" path, but I don't know it well enough, and I already needed an Arduino in it anyway. I used to test it out and ended up with a 5 input NAND gate, and if they exist, I don't know where they are. I'd love the (marginal) added precision huge reliability boost, but I'd have almost no idea what I'm doing.

Shift registers and port expanders have a much steeper learning curve than a board with inputs.

The ESP32 has only about 30 I/O ports and is 3.3 volts.

No idea of the existing but it seems to be a safe bet it is 5volts or more.

And the OP seems to be a beginner, so keeping it simple is much better than having multiple interfaces to deal with and learn.

A Wemos D1 mini would have greater speed more memory and a smaller footprint.

I would be very reluctant to suggest such a solution due to complexity of managing interfaces.