12 volt input

I would prefer an opto coupler over a relay or voltage divider.
A relay on a vibrating generator might have a lot of contact bounce (which to can bridge with code).
And a voltage divider could have unwanted groundloops (depending on how you power the Arduino).
Leo..