I use the new uccb 24v io boards (cncdrive)
Very easy and very robust
Can handle 24v and 5v inputs