Connect both arduinos with ground

Hey,

I have the following test-circuit and I was wondering if I should connect both arduinos to ground or if it’s sufficient to just use one. Now I only put the arduino UNO ground on the breadboard. Should I also connect the breadboard ground to a DUE ground pin?

Information about the circuit:
I am outputting a square wave signal from pin nine of the uno (red wire). The signal gets to a voltage divider of 3x560ohm resistors. I get the signal after the first resistor (3.32V) and detect it on pin51 of the due. The due calculates the frequency and outputs a DAC voltage according to the frequency [0-2MHz] which lights up the LED.

Hi,
Connect both gnds together.
If they are sending signals/voltage levels/data they both need the same gnd to reference ALL the signals.
Can you post a circuit diagram please?
What is the application or just an experiment?

Thanks… Tom… :grinning: :+1: :coffee: :australia:

If both are connected to the same computer, USB port, or power supply, they already share a ground. :wink:

True of course but via a rather long loop of possibly 4m or so depending how long the USB cables are, which is not good. Also a trap later when one of the boards is powered from a separate PSU.

OP, I agree with Tom, I’m just giving you more reasons.

Hey @jannik_b, I would also recommend connecting the ground pins of the two MCU´s as close as possible.
I am also wondering why you are using such low resistor values as a voltage divider. I mean it will of course work, but considering power consumption (especially if your goal is something battery operated). It would be better to go with a combination of 1and 2k or as I would prefer 10 and 20k.

I would also reconsider the approach of powering the LED´s. Is there any reason why you sacrifice you DAC pin ? The easier way would be to use any PWM pin and use pulse width modulation for dimming the LED corresponding to the measured frequency.