But if you just need to convert a 24vdc input to 5vdc you should be able to use a simple voltage divider circuit.