Arduino pro mini 5V, I2C master/slave not working

Hello,

I am having problems making 2 arduino pro mini boards communicate. I connected A4 to A4 and A5 to A5 on the boards. I also connected the ground from the 2 boards together.

5V from power supply is connected to the master VCC and from there to the slave VCC. GND from power supply is connected to the master GND and from there to the slave VCC.

I am using this code http://www.instructables.com/id/I2C-between-Arduinos/?ALLSTEPS

What am I doing wrong? I found some info saying that I should connect the A4 and A5 pins to 4.7K resistors and VCC. Also I read that the slave 5V should be connected to RAW, not VCC.

Any help would be appreciated.

“GND from power supply is connected to the master GND and from there to the slave VCC.”
That would be a problem - likely a cut & paste error?

" I found some info saying that I should connect the A4 and A5 pins to 4.7K resistors and VCC"
Yes, pullups are needed on SCL and SDA.

“Also I read that the slave 5V should be connected to RAW, not VCC.”
Incorrect. RAW goes thru the 5V regulator to make VCC. You won’t get a good 5V that way.

Hello,

Thank you for the reply. Yes, that is a copy/paste error. The boards power up and I did not connect GND to VCC.

Are there any resistor values that would work besides 4.7K? Like 1K or 10K. I am asking because I don't have any 4.7K resistors. I will go buy some tomorrow but I would like to keep working on the project until then, if possible.

The pullup value is not critical. Try 10K first and if communication is not reliable lower the resistance. You should not have to go as low as 1K, though.

How far apart are the master and slave. That can have a effect on the required value of the resistors. The longer the distance the more noise is potentially picked up and the lower the pullup resistor value (AKA stronger pullup).

1K should be fine for 328P to 328P, that's just 5mA of pulldown current needed. Or use 2 in series to get 2K. Or 2 10ks in parallel.

I tried 10K and it does not work.

I found another topic mentioning 10K resistors and OP blamed them for the problems but did not give extra details http://forum.arduino.cc/index.php?topic=397931.0

I will buy 4.7K tomorrow and see if it works.

What exactly does not work? Is the 5V power okay, on both controllers? Can you detect pulses on the SCL line?

You can run the I2C sniffer code on the master controller, to find out whether and on which address the slave responds.