L
L
LuigiVampa922016-03-10 02:05:38
Arduino
LuigiVampa92, 2016-03-10 02:05:38

How to connect a signal from another device to an Arduino pin?

Hello, please help the kettle in electronics.
There is a diagram:
ccbe4351cf2847e9b34bd1b7dae13716.jpg
It is necessary to read the signal coming from another device on the arduino (in the diagram - a battery, in reality a separate device). 5 volts comes from it, and I'm worried that there is its own food. Will the arduino be damaged if I just plug 5 volts into the input pin and minus another device to GND?
According to my assumptions, the scheme looks like this. A 10 kΩ resistor is a pull-down resistor so that the input shows an honest zero while there is no signal, and a small resistance resistor (300 ohms) to limit the current at the input to an acceptable 16.6 mA (5 / 300 * 1000) and not burn the arduino when 5 volts with appliance will come.
Tell me if I think right? Or do I need to add something to the scheme or remove something?
Thank you very much in advance.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
Alexander Gusev, 2016-03-10
@Sanchogus

Connect both ground lines and everything should be normal, provided that there is no more than 5 V, it does not kill itself with its 5V.
arduino.ru/Tutorial/DigitalPins
Your hundreds of ohms will not care if the input port is set in setup() (although they are already on input by default)

A
Alexey S., 2016-03-10
@Winsik

for arduino 5v are not terrible

I
Ivan, 2016-03-10
@LiguidCool

I will supplement the answers that Arduins can communicate through serial ports, or via protocols such as RS485 or I2C. Perhaps you should not occupy extra ports if there are a lot of commands.

L
LuigiVampa92, 2016-03-10
@LuigiVampa92

I understand, I'm still more worried about the current.
Will too much go through the pin? Is an input resistor needed? What value to take? Or maybe in arduino at the inputs there is already some kind of protection on the board itself?

T
TyzhSysAdmin, 2016-03-10
@POS_troi

If there is a chance that something will go wrong - we take an optocoupler.

V
vanyamba-electronics, 2016-03-24
@vanyamba-electronics

A problem may arise if the supply voltage is taken not through a transformer, but directly from the 220 V network through a rectifier and a voltage divider. You can read more in the article Capacitor power .
To make sure that 2 devices can be safely interconnected, you need to take a voltmeter and measure the voltage between the grounds. If it is not equal to zero, then you cannot connect them directly, you need to transmit a signal through an optocoupler.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question