0

I want to use a raspberry pi to pick up some 24v DC inputs. I would ideally like to use an off the shelf module to add this functionality to my Pi (v3 model B).

I have come across this range of relay cards - http://denkovi.com/relay-cards-24v which feature circuits like this:

enter image description here

These are obviously intended for allowing the Raspberry Pi to drive 24V outputs. But could I could I use my 24V input as the Input and then have +5V on C and connect NO to the Raspberry Pi terminal?

  • 1
    Remember the Pi GPIO must not be exposed to more than 3V3. – joan Apr 22 '17 at 20:07
3

It would be simpler just to use a voltage divider to bring the 24v down to 3.3v for the Raspberry Pi or safer still use an optocoupler such as the 4N35 which is what I would use personally. Example circuits are on the 4N35 datasheet which is readily available.

schematic

simulate this circuit – Schematic created using CircuitLab

4N35 Pinout

4N35 Pinout

| improve this answer | |
  • I can't seem to find any off the shelf modules which break out the Pi GPIO with opto-isolators – George Edwards Apr 22 '17 at 20:20
  • No you'd need to add the 2 resistors yourself, surely simple enough to do ? – Bra1n Apr 22 '17 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.