ttl logic from wide range of voltages

I'm looking for only strategy at this point of how to get ttl logic from a wide range of voltages. The idea is that 0V to maybe 1V is zero and anything above 3V on up to 24ishV is one. I'm going to try to read signals on a cnc machine such as power on, spindle on, etc. I have different machines and the signals levels could vary depending on where I can pick them off. It would be ideal to have a circuit that is able adapt to the level without building individual circuits for each scenario. Is there a feasible way to do this and what type of strategy would be best?

Let's start with this- The ATmega chip reads anything below 1.5V (0.3Vcc) as low and anything above 3V (0.6Vcc) as high. (In-between is undefined and may read high or low.)

So, with an [u]over-voltage protection circuit[/u] you should be ready to go.

Some other options might be a [u]comparator[/u] (where you can adjust the switching voltage with resistors) or you can use an Arduino analog-input and make a comparator in software. (In both cases, you'd need a [u]voltage divider[/u] or protection circuit.)

That's a good read. Thanks!