24 volt on microprocessor input pin
A voltage divider and a tiny bit of software is the cheapest and smallest PCB space I can think of. Shown below is a 1/10 divider, so you should be safe up to 33V on the input, and perhaps even more if the Edison has [any?] good clamping protection diodes. The capacitor is there for simple noise reduction, it is optional if you are good with firmware. 







simulate this circuit &ndash; Schematic created using CircuitLab

Otherwise, give this a go! The NPN BJT called Q1 in the schematic diagram acts as a switch, taking the node below R1 to 0V when the 24V signal becomes "high". The diode D1 protects Q1 from nasty voltages, and the 10K resistor R2 can be higher if you wanted. Currently it will put 2.4mA into the base of Q1. The capacitor is there to act as a minor RC filter to help with bouncy/noisy goodness.







simulate this circuit