I recently bought in arduino mega. In the project I want to connect the output of this first arduino to an input of a second Arduino. Unfortunately on trying I found that the second Arduino input was behaving as always on. On further investigation I found that pin 51 output gives 2.5 volts approximately from the time I power the first arduino.
All other pins are 0 or nearly 0.
I read through the forums and found that input pins need to be pulled down for stopping them from floating, but should it be required when connected to output of the first arduino?
Should I use a pull down resistor to the rogue output? I if I add a 5kohm resistor grounded between this output and input of second Arduino should it be ok?
Weirdly in the ide this pin (51) variable name "L" shows up as green while others are black.
if you want to add a pulldown or a pullUp resistor you should use a 10K resistor or higher.
I don't have a lot of information to work with.
could you post more information about your project, so I and others can take a look at it?
like code of your project or a wiring diagram.
why do you want to connect 2 arduino's together?
for serial communication?
Is it ok if I use 5kohm? 5v/50000hm = 1 milli amp (using V=IR). Any long term disadvantage of this?
You can see that "L" is in green (in attachment). However others (R & T) in green don't show the 2.5 volts.
I want to use 1st arduino as the main controller and second arduino as slave to turn on a few relays in a sequence and give feedback when it successfully executes those relays.
Eventually project will include 1st Arduino to control a stepper motor and other relays.
In the attached diagram
On Uno -
Pin 2 is input
Pin 7 is feedback output (for when sequence is completed)
johnwasser:
You MUST have a pull-up or pull-down resistor to read a button so using the internal pull-up resistors (INPUT_PULLUP) would be 'more suited' than not using any pull-up or pull-down resistors.
riju994:
Is it ok if I use 5kohm? 5v/50000hm = 1 milliamp (using V=IR). Any long term disadvantage of this?
yes but here are some rules of thumb when guessing at a good pullup/down resistor value:
For most things, 3.3k to 10k ohms works just fine.
For power-sensitive circuits, use a higher value. 50k or even 100k ohms can work for many applications (but not all).
For speed-sensitive circuits, use a lower value. 1k ohms is quite common, while values as low as 200 ohms are not unheard of.
Sometimes, like with I2C, the "standard" specifies a specific value to use. Other times the chips application notes might recommend a value.
For the communication between the Arduino's looks for me just like Serial communication.
I think that would be easier to do it like this. here a video about Serial communication