Cheap and good way to feed 12v digital input

How's this?