Answer the question
In order to leave comments, you need to log in
How to connect external device to Arduino?
Greetings. There is an Arduino, there is a certain device powered by its own power source.
The task is to receive 5V to the Arduino INPUT port from one of the outputs of the device.
The output can be from 12V to 24V. Arduino needs to know if there is voltage there or not, that's all.
How easier to implement?
Thank you.
Answer the question
In order to leave comments, you need to log in
If the frequency of the signal change is not very high, then optocouplers can be used (in general, it is a good practice to galvanically decouple the "brain" and actuators and sensors)
You need optical isolation. Although with a plug of 12 - 24 volts, you will also have to install a voltage stabilizer, such as 7805.
optical isolation is needed when the grounds of different circuits have different potentials or there is a possibility of overshooting high-voltage noise, etc.
If the grounds of these two circuits can be combined, then the +24V signal can be connected through a ~100kΩ resistor directly to the Arduino input.
An input voltage higher than VCC will cut off the internal protection diode, 100 kΩ will limit the passing current, the kmop input will accept the signal with a bang.
Ideal galvanic isolation.
You can use a divider on a zener diode 4.7-5.1V
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question