Hi. I am pretty new to Arduino but not to programming. I will explain what I want and I want somebody to tell me if it can be done.
I have a signal cable input which it has a voltage in it. Not sure what voltage but around 1-29V top.
I will name it KeyON 1-24V Input
Next I have a pulse switch which if you press it for 3 seconds, it starts a device. (It shorts 2 cables for 3 seconds).
What I want is that when I receive a voltage or signal on KeyON, the Arduino board act like that switch and activate the device. The switch needs to be pushed 3 seconds in order to activate a device.
I think I need to use one analogic pin and 2 digital pins. Not sure. Any advice is greatly apreciated.
Thanks.
What voltage? What signal? The answer to your question about whether an Arduino can do this very much depends on that. Is it an analog signal or a digital signal? Is it a steady voltage or a signal with a frequency?
Certainly you should not connect a voltage which could be > 5V to any Arduino input pin.
I'm going to leave this conversation now because I can help no further.
I will say that in theory it is certainly possible for an Arduino to do this. In practice, if the circuit is not designed correctly, the BMS and the Arduino could be damaged, catch fire, explode or injure someone.
Thanks for advices. I am lithium battery expert. I need to replace a special bms with my own, maintaining the same functions in order the machine to work. U helped me a lot by asking me those questions.
You should note, that Arduino can't shorts two wires, it only can pull a signal to GND or to power. So we need to know, what are signals in two wires that you want to connect each other.
In case the signal in the wires is unknown, you need an isolated switching device, such as a relay.
What about my input? If there is present a DC voltage on a cable but I dont know what voltage is that, how do I do it? Can be used a relay module as well on the input side? This cable is the trigger for the output relay switch.
The voltage on Arduino analog pin MUST NOT exceed a 5v level, otherwise you have a risk to damage the board. So you need to convert it level to 0 - 5v range, say, by resistor divider.
To choose a proper resistor values, you need to know an actual voltage level of the input signal.