Hello everyone again,
Today I have tested these solutions presented here and both work fine.
I will use the solution using the TRIS bit of my PIC pin to switch from 5V to 8V and produce the signal that I want.
However it is important for me to have a solution to prevent a circuit failure if the signal wire has a short circuit to ground.
I have already tried many Fuses but I am not being able to use them correctly. It seems that LM317 is protecting against the short circuit and the fuse doesn´t blow. However LM317 gets very hot and I think that if it stays in this short circuit state for a long time it will fail.
So, I have been thinking about another solution.
Please check the following image.
Note that I only have 1 free pin on my PIC to use. If I had two Pins available I would use one pin as ADC to check if there is a short circuit on the
Signal Line and with the other pin I would enable or disable a Voltage regulator with this function.
But I only have 1 free Pin to use and don´t want to use a bigger Pic.
So, my solution is: When the system is turned ON the pic will have 5V output for 2 seconds. This will turn ON both transistors and the current will flow from
the LM317 to the Signal Line output. After 2 seconds the PIC turns OFF this output. But as you can see on my image if the Signal Line is high it will also turn ON both transistors.
So, the transistors will always be ON until a short circuit to ground happens.
If a short to ground happens, both transistors will be OFF and no current will flow from LM317 to the Signal Line.
Then, only when the system is turned OFF and ON it will work again.
I have tested this solution and it works.
However I am sharing with you to know your opinion and to know if you are seeing a simpler solution ?
A simpler solution was to use a voltage regulator with enable Pin but all that I found the enable Pin is ON when you have ground. And was looking for the opposite but could not find.
Again, many thanks for your help.