Networking a Mega 2560 and three Uno processors

I am attempting to network the following configuration -

Mega 2560 as Master - communicating to three Uno as Slave units.

Can I do this with the I2C? Or is there another method that I am not aware of. I did research this - but only came up with networking two processor.

Thank you for your time helping me in this project. I’ll work out the programming after I know how to hardware the units together.

Greg

I guess it depends on what the Unos are up to, but the simplest approach is to use serial connections. The Mega has four ports.

In general terms - the Mega will be sending commands to the Uno for running motor control sketchs. Another way of looking at it - the Mega does not know how to move a motor - but it knows how to send the command to the Uno which will control the motor. Each Uno has it’s own motor controller. The Mega will be running sketchs that will coordinate motor movement ( Uno job ) with lights and sounds ( Mega job ).

I hope this helps - serial connections would be a lot easier to hook up.

Thank You for the idea.

Greg

B9Greg:
The Mega will be running sketchs that will coordinate motor movement ( Uno job ) with lights and sounds ( Mega job ).

serial connections would be a lot easier to hook up.

Sounds good to me! I assume you have already concluded that the Mega cannot do the job by itself.

I read a couple of posts in different areas of the forum - indicating that it is possible to connect more than two processors together using the I2C - but the posts didn't say how. That is the piece of the puzzle that I am missing.

Can someone who has hooked up more than two processors together - please post how you did it? Where do you put the connectors on each?

Thank You,

Greg

What type of motors? Brushed or brushless?

The motors are brushless - How would I connect the processors together to get the I2C network to work.

You mean like a brushless motor with an ESC as the speed control?

No, the Uno has the motor controllers. I have the motors working on each of the Uno processors already. I want to control the motors with the Mega 2560 giving commands to the slave Uno processors. I just don’t know how to run the wires. My previous processors were OOPic - they had two connectors on each - so you just daisy chained.

Greg

According to a diagram I just found in the THE I 2C-BUS SPECIFICATION VERSION 2.1 JANUARY 2000

All of the SLC lines are connected together and all of the SDA lines are connected together.

Is this correct for my configurations?

Thanks,

Greg

B9Greg:
According to a diagram I just found in the THE I 2C-BUS SPECIFICATION VERSION 2.1 JANUARY 2000

All of the SLC lines are connected together and all of the SDA lines are connected together.

Is this correct for my configurations?

Yes.

Thank You - I can now move forward on my electronics upgrade on B9Greg - Robot from Lost In Space.

Greg

Remember you need a common digital ground connection also.

Mega 2560 as Master - communicating to three Uno as Slave units.

Should be easy to do just using the single serial port on the mega and unos.