I'm looking to drive 12v logic signals (logic level shift) from a PIC24FJ MCU, which can do 3.3v and 5v logic. In one instance, I need to switch a 12v line to LOW, and in an other, I need to provide a pretty constant HIGH 12v. Both of these lines appear to sink a couple mA at most.
Would a relay be my best option for driving these lines? If so, are there any small SMD relays suitable for the job?
Response should be within milliseconds and they do not necessarily need to be low power consumption.
Best Answer
This will drive a 0-12V digital signal from a 0-3.3V processor pin, by pulling a resistor low. It may not achieve 1ms rise times, depending on the capacitance you need to drive, and if you need to supply current, it'll have problems there, too. But it's simple.
Circuit on the left:
Circuit on the right:
simulate this circuit – Schematic created using CircuitLab